如何在Android的蜂鸣声? [英] How to make a beep in android?

查看:740
本文介绍了如何在Android的蜂鸣声?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我有一个特定的频率和持续时间的应用程序的响声。在windows相当于这个应用程序(用C#)我用C ++ DLL的功能

I would like my app beep with a specific frequency and duration. In the windows equivalent of this app (written in c#) I used a c++ dll with the function

beep(frequency, duration); 

这是android系统中的一样吗?或者至少,我怎样才能把我的C ++ DLL项目?

Is this the same in android? Or at least how can I put my c++ dll in the project?

我想preFER不使用pre-内置的MP3或系统的声音,因为我想给用户的频率和持续时间的选择。

I would prefer not to use pre-built mp3's or system sound because I would like to give the user the choice of the frequency and duration.

推荐答案

如果你想用你的C ++ code在Android应用程序,这是可能的。你需要看的Andr​​oid NDK,它允许您使用与JNI(Java本地接口)的帮助下完成的C ++ code。

If you want to use your C++ code in the android app which is possible. You need to look at Android NDK which allows you to use execute C++ code with the help of JNI (Java Native Interface).

的Andr​​oid NDK

这篇关于如何在Android的蜂鸣声?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆