Hi, the buffer won't play in stream mode until you have filled it all
the way the first time. So make sure you are writing at least 256K of
data in the first write call.

You can actually create the AudioTrack object, then say "Play()" and
write data to it after it's "playing" (in stream mode). Once the
buffer reaches the buffer size, it will start to play. Then just keep
the buffer full.

-niko




On Apr 23, 12:24 pm, Moto <medicalsou...@gmail.com> wrote:
> I'm currently initiating the AudioTrack() for MODE_STREAM.
>
> I load some bytes using the write() and I see that it is working but
> once hit the play() call nothing happens... what is the matter? should
> I do something else that is not obvious??  Any tips Google friends?
>
> My settings:
> streamType - STREAM_MUSIC
> sampleRateInHz - 44100
> channelConfig - CHANNEL_CONFIGURATION_STEREO
> audioFormat - ENCODING_PCM_16BIT
> bufferSizeInBytes - 256K        the total size (in bytes) of the buffer where
> audio data is read from for playback. mode - MODE_STREAM
>
> thanks!
> -Moto!

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

Reply via email to