For simplicity, I just created a new stream every time I played AudioTrack.
But despite this, it does not matter. I found that when I try to play multiple AudioTrack at a time, there is a crackling / intermittent sound. I believe that this is just a problem with the Android system, not with my application.
Starting from API level 9 (gingerbread box), I can apply the session identifier to the audio track, which, I believe, would allow me to play it using SoundPool, which should make playing multiple AudioTracks at the same time smoother.
Right now, due to the number of users still on 2.2, and the fact that I donβt have a gingerbread device, I put off this project until the end.
Jakar source share