Hi,
I have compiled my game for the gp2x using SDL and SDL_mixer. I have Mk2/firmware 2.0. I use paeryn's hw sdl libs and have tried various different versions of SDL_mixer, all of which have the same issue. The sound effects I am using are uncompressed wavs and are loaded in to memory before being used.
All the sound effects I play are extremely lagged, and lag is directly proportional to the size of the buffer used when starting SDL_mixer. For 4096, the lag is about 5-10 seconds. 1024 buffer gives reasonable results, less than a second between the call to the sound effect and the sound happening. Only really small values like 32 cause the sound to seem in syncronisation with the game.
Ogg decoding also acts very unusually. It eats up the CPU power a bit and plays quite wrong (as if the cpu can't handle it), but if you also play a sound effect, during and for a few second afters it plays perfectly but hogs the CPU totally. It's as if calling the sound effect brings the mixer thread in to priority for a while.
Any suggestions would be appreciated.
Thanks,
Dr_Ian
I have compiled my game for the gp2x using SDL and SDL_mixer. I have Mk2/firmware 2.0. I use paeryn's hw sdl libs and have tried various different versions of SDL_mixer, all of which have the same issue. The sound effects I am using are uncompressed wavs and are loaded in to memory before being used.
All the sound effects I play are extremely lagged, and lag is directly proportional to the size of the buffer used when starting SDL_mixer. For 4096, the lag is about 5-10 seconds. 1024 buffer gives reasonable results, less than a second between the call to the sound effect and the sound happening. Only really small values like 32 cause the sound to seem in syncronisation with the game.
Ogg decoding also acts very unusually. It eats up the CPU power a bit and plays quite wrong (as if the cpu can't handle it), but if you also play a sound effect, during and for a few second afters it plays perfectly but hogs the CPU totally. It's as if calling the sound effect brings the mixer thread in to priority for a while.
Any suggestions would be appreciated.
Thanks,
Dr_Ian