Android:监听器在发生任何声音时记录声音
In my application I want to implement methods which record the sound if any sound occurs.
Something similar like this app: Talking Tom Cat
So what should I have to do?
Is there any demo that listens for sound and records it if any sound occurs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在您的应用程序中尝试此代码...
有关更多详细信息,您还可以查看此演示...
http://musicg.googlecode.com/files/musicg_android_demo.zip
Try this code in your application...
For more details you can also look at this demo...
http://musicg.googlecode.com/files/musicg_android_demo.zip
请访问有关音频捕获的 Android 开发者页面。
它有一个示例代码,演示如何捕获和播放声音。
Please visit the Android developers page about Audio Capture.
It has a sample code that demonstrates how to captures and play sounds.
我正在尝试类似的东西。据我所知,您必须先开始录音,然后才能读取音频电平。因此,我尝试测量振幅,然后增加录音长度,如果最大振幅达到可听点,则将文件保存到其他位置。
话虽这么说,我对编程非常陌生,并且非常感谢任何其他提示或技巧。
I am trying something similar. From what I have seen you have to start recording before you can read audio levels. So I am trying to measure the amplitude and then increase the length of recording and save the file to a different location if the MaxAmplitude reaches an audible point.
That being said I am VERY new to programming, and would really appreciate any additional tips or tricks.