Reputation: 811
I'm using AudioTrack in streaming mode. About one out of 5-10 times after I stop playback of a short section of a wav file, I hear a clicking noise. It's driving me crazy because I can't consistently reproduce it. I've tried various combinations of calls to AudioTrack.flush(), AudioTrack.pause(), and AudioTrack.stop() before calling AudioTrack.release(). I've also tried calling AudioTrack.setStereoVolume() and passing in the result of AudioTrack.getMinVolume(). Nothing has worked.
Some observations:
I'm seeing this on an Acer Iconia A500 running Android 4.0.3. I would appreciate any suggestions.
Upvotes: 0
Views: 1320
Reputation: 21773
The pop is probably because the song ended on a very high sample, and then became suddenly 0. This causes a 'pop' noise. Try fading the song out over the course of even 0.01 of a second.
The pop from going from high sample to 0 volume sounds like this: https://soundcloud.com/hertzdevil/dirac
Upvotes: 1