[android-developers] Re: AudioTrack flush() does not work

2010-08-26 Thread sasq
Actually, flush() is for discarding unplayed data. It's not clear at all from the documentation but if you read the source it becomes clearer. Anyway, I found a workaround - a call to Thread.sleep() after flushing forces the flush to take effect. play() directly after flush() seems to cancel the f

[android-developers] Re: AudioTrack flush() does not work

2010-08-26 Thread niko20
You'll have to create a new instance of the AudioTrack I think. Flush doesn't erase data, it simply finishes writing out any data that was in the internal buffers. -B On Aug 26, 4:08 pm, sasq wrote: > I am calling stop(), flush(), start() on my audiotrack when changning > songs. > > This seems t