How to capture output stream of audio in Android?

2019-02-26 11:03发布

问题:

I am a newbie in development and I trying to create an equalizer on Android platform.

How I can capture output audio stream on android? I just need to take audio information that goes out from my application. (I already searched www.developers.android.com and i have not found any information)

回答1:

There's currently no functionality in Android for recording audio output (well, there's the Visualizer API that let's you grab partial, low-quality audio for audio visualization purposes).
If you only need to apply the effect to the audio from your own app then you could do the "recording" internally. I.e., in your app, send the decoded audio data to your effect to be processed, and then send the processed data to your AudioTrack or OpenSL ES buffer queue.