Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record/capture internal sound playback of Android app and export mp3?

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

like image 391
fxfuture Avatar asked Aug 08 '13 00:08

fxfuture


People also ask

How do I record Android gameplay with internal sound?

Swipe down from the top of your screen to see the quick settings tiles and tap the screen recorder button. A floating bubble will appear with a record and microphone button. If the latter is crossed out, you're recording internal audio, and if it's not, you get sound straight from your phone's mic.

Is there an app that records internal audio?

Internal sound (record within the device) From Android OS 10, Mobizen offers vivid and crisp recording that captures only the game or video sound on the smartphone/tablet directly without external sounds (noise, interference, etc.) or voice using the internal sound (device internal recording).

Is there a screen recorder that record internal audio?

Mobizen Screen Recorder - for Android It is an internal audio screen recorder that records system audio with screen for Android users. This app has so many essential tools.

How do I record internal audio?

Open the sidebar menu and tap on "Settings." Scroll down to Video Settings and make sure that "Record audio" is checked and that "Audio source" is set to "Internal sound." Change the other options, such as video recording quality, as you see fit.


2 Answers

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.

like image 124
Michael Avatar answered Oct 01 '22 14:10

Michael


As the michael said , u need to implement your own encoder and decoder for that . Visualizer is providing very low quality of data becaz we can use it to show on custom views and effects which are synchronized with equalizer.

This is the link where u will find simple decoder and encoder for MP3 file. Where they are reading data from MP3 file and putting it into new MP3 file. They had created support for some other extension too.

http://code.google.com/p/ringdroid/source/browse/#svn%2Fbranches%2Fgingerbread%2Fsrc%2Fcom%2Fringdroid

like image 27
Pranav Jadav Avatar answered Oct 01 '22 16:10

Pranav Jadav