Sdl Mixer Help Please!


iatneH

Still Fresh
Joined
Dec 21, 2005
Messages
62
Location
Vancouver, BC, Canada
Website
Visit site
Hi, I've just started adding sound effects to my project, and it seems like SFX are severely delayed, like ~0.3 or 0.4 seconds after it is triggered.

I have this
Code:
Mix_OpenAudio(22050, AUDIO_S16, 1, 1024);
early on, and then play a sound with something like this
Code:
Mix_PlayChannel(-1, coin, 0);
e.g. when I press a button to insert a coin. Other things like explosions etc. are way late too.

The samples themselves are 22050 Hz, 16 bit, mono .wav files.

Is there anything I am missing?

Thanks in advance!
 
128 gives me distorted sound in the PC build while 256 seems to be fine. Will it be fine on the gp2x? (currently dont have my gp2x with me).
 
128 works fine on the GP2X and if you need to just #ifdef around your MY_LOCAL_BUFSIZE #define for your target (PC /GP2X) platform so you can use 512 on your PC ..
 
Back
Top