On Wed, Feb 25, 2009 at 5:00 AM, Nikhil <[email protected]> wrote:
>
> Hi All,
>
> I am trying to play sound buffer for streaming sound(PCM sound data)
> through a library in Android framework.
>
> I am trying by using AudioTrack::write() for passing sound buffer to
> Audio Flinger and AudioTrack::start() function for playing that sound.
> But it's required to get a callback once each buffer is played before
> sending the next buffer for playing.
>
> Can anyone help me to know if there is anyway to get a callback from
> AudioTrack once the playback of given buffer is completed?

AudioTrack::write blocks until the data has been consumed by the audio
engine, so as soon as write() returns, you can write more data.

> or is there any other way to play PCM data in Android?

No. Also note that AudioTrack is a Cupcake API, so your app won't work
on most people's device currently.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to