Sdl_mixer Delays


Incarnate

Still Fresh
Joined
Mar 11, 2006
Messages
13
Hey all,

I'm pretty new to sound coding, so I'm having trouble debugging this. I've got SDL_mixer setup and linked into my project just fine. To initialize it I do the following:

Code:
Mix_OpenAudio(22050, AUDIO_S16, 2, 2048);

I then make several calls to Mix_LoadWAV to load my sound resources, and store the Mix_Chunk pointers for future use. Whenever I play a sound effect, I just pass one of the stored pointers to a Mix_PlayChannel call. On my PC this all works fine, but on the GP2X there is about a second long delay between the function call and the sound actually being played. I've also noticed a similar delay whenever I make calls to Mix_VolumeMusic. I'm using the SDL libriaries available here: http://www.gp32x.de/board/index.php?showtopic=26376&hl=

Anyone have any idea what might be causing this delay?
 
Last edited by a moderator:
Thanks,

Had to take it all the way down to 128 to get the same results as on my PC, but sound and music both play without skipping.
 
Back
Top