Hi! I'm developing a game with libgdx, and I've run into multiple problems with looping sounds on android device (Asus Transformer). All of them have to do with android's SoundPool, but since it is what libgdx uses for sound I guess it can be considered its problem as well.
1. The worst of all, when a sound ends and then starts again there is a very noticeable and annoying click. I.e. the sounds are not looping seamlessly. I should say that the sounds themselves are okay, they loop seamlessly in Audacity. I've tried both wav and ogg formats. I dunno it might be a problem with Transformer but I've heard of the same issues on Samsung Galaxy Tab as well.
2. There can also be clicks when looping sounds start playing or are stopped.
3. When a bunch of new sounds start playing, the "old" looping sounds are kicked out (i.e. stop playing). I think this is flawed logic (or bad logic if you prefer
) in SoundPool. Looping sounds should have priority. Maybe I could fix this by further limiting the number of simultaneously playing sounds but now I'm not sure I should even bother.
4. The one problem I've been able to resolve. By cutting and lowering the quality of the sounds which is not really nice, too. My game plays a lot of sounds, and I used to get a lot of "Audioslinger cannot create audio track" errors. This had to do with the 1MB limit on uncompressed sounds in SoundPool. Since I'm working on an HD game this seems unnecessarily restrictive. This is not strictly related to looping sounds but I thought I'd write anyway.
I wonder if anyone might have some advice for me. I don't really like the idea of giving up on the looping sounds.
Also I've heard that it's possible to write your own mixer which will take care of these issues. Is there a chance that something like that might be implemented in libgdx?