[android-developers] AudioTrack - Doesn't stop playing as requested.

2009-12-22 Thread Business Talk
I've been trying to resolve the issue of the immediate termination of
the AudioTrack played in the MODE_STREAM track with no avail. To do so
I call stop and release;

audioTrack.stop();
audioTrack.release();
audioTrack = null;

I tried flushing but it made no difference.

It  finishes  playing the remaining of the buffer and than stops. It
seems like the problem renders the AudioTrack useless if one can't
stop playing at will. I can't imagine using it if I have to wait till
it finishes playing its buffer. And since this is the only sound
solution I can use for my application, the JetPlayer and the
SoundPool, do not fit my needs, I am left with the decision if I
should continue. It’s got to be a way. I assume others used it
successfully since I haven’t seen any post.  Any thoughts?

-- 
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


Re: [android-developers] AudioTrack - Doesn't stop playing as requested.

2009-12-22 Thread Fabricio
Not been very familiar with it but maybe you could pause it and then proced
to stop and release.
Salutes.
Fabricio Tuosto


On Tue, Dec 22, 2009 at 11:22, Business Talk
roman.businesst...@gmail.comwrote:

 I've been trying to resolve the issue of the immediate termination of
 the AudioTrack played in the MODE_STREAM track with no avail. To do so
 I call stop and release;

audioTrack.stop();
audioTrack.release();
audioTrack = null;

 I tried flushing but it made no difference.

 It  finishes  playing the remaining of the buffer and than stops. It
 seems like the problem renders the AudioTrack useless if one can't
 stop playing at will. I can't imagine using it if I have to wait till
 it finishes playing its buffer. And since this is the only sound
 solution I can use for my application, the JetPlayer and the
 SoundPool, do not fit my needs, I am left with the decision if I
 should continue. It’s got to be a way. I assume others used it
 successfully since I haven’t seen any post.  Any thoughts?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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