录制/捕获的Andr​​oid应用程序和出口MP3的内部声音播放? [英] Record/capture internal sound playback of Android app and export mp3?

查看:124
本文介绍了录制/捕获的Andr​​oid应用程序和出口MP3的内部声音播放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能记录由应用程序产生的内部声音?

我的应用程序允许您创建和播放音乐序列。

  soundPool.play(soundIds [I],1楼,1楼,1,0,Constants.TIME_RATE);
 

我希望能够记录的顺序,并出口到MP3。

我已经研究过的 音频捕获 但是setAudioSource(INT audio_source)似乎只接受MIC录音。

感谢

解决方案

没有,还有用于获取音频输出,即使对自己的应用程序没有API(实际上这是不完全正确的,因为你可以通过的 可视化 API,但它是如此低质量的,我怀疑这将是对你的任何使用)。

如果你想那样的功能,你就必须实现它自己。那是;当你开始播放的声音,将它们混合,并把结果写入到一个文件中。如果声音是COM pressed你也必须考虑自己的情况下进行解码他们。

请注意,有没有MP3连接codeR包括与Android,所以你必须提供你自己的MP3连接codeR无论如何,如果这就是你要导出的格式。

Is it possible to record the internal sound generated by the app?

My app allows you to create and play back musical sequences.

soundPool.play(soundIds[i], 1f, 1f, 1, 0,  Constants.TIME_RATE);

I'd like to be able to record the sequence and export to mp3.

I've looked into Audio Capture but setAudioSource (int audio_source) only seems to accept MIC recording.

Thanks

解决方案

No, there's no API for getting the audio output, even for your own app (actually that's not entirely true, because you can get it through the Visualizer API, but it would be of such low quality that I doubt it would be of any use for you).

If you want that kind of functionality you'll have to implement it yourself. That is; as you start playback of sounds, mix them and write the result to a file as well. If the sounds are compressed you'll also have to take case of decoding them yourself.

Note that there's no MP3 encoder included with Android, so you'd have to supply your own MP3 encoder anyway if that's the format you want to export in.

这篇关于录制/捕获的Andr​​oid应用程序和出口MP3的内部声音播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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