Question

I have already developed Streaming Audio application using MediaPlayer API. All the features are works fine, expect it takes more time to start the playback (buffer time is more).

i want to add recording live audio stream(save the live stream data in disk, not the recording from MIC). as MediaPlayer does not provide any API to access the raw data stream, i am planning to build custom audio player.

i want to control the buffering time, access to the raw audio stream, should able to play all the audio format which are supported in android natively. which api (libPd or OpenSL ES or AudioTrack) will be suitable to build the custom audio player in Android?

Was it helpful?

Solution

In my experience OpenSL_ES would be the choice, here there is a Link that explains how to do audio streaming that you may find useful. bufferframes determines how many samples you will collect before playing, so smaller bufferframes faster response time, but you have to balance that with your device processing capabilities.

OTHER TIPS

You can record with libpd (pd-for-android) too. All the recording process is managed by libpd. Check the ScenePlayer project, it uses libpd and lets you record audio into a folder on sdcard:

https://github.com/libpd/pd-for-android/tree/master/ScenePlayer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top