Telling playsound what format to use

Ryan C. Gordon icculus at
Fri Oct 12 14:22:35 EDT 2001

> Aha? Out of curiosity, what are the issues with SDL_MixAudio?

It clamps everytime you mix two samples, which is fine if you're only mixing 
two, but for something like SDL_mixer, we'll need to clamp after an abitrary 
number of samples. I'm thinking there should be something like

  SDL_MixNSamples(Uint8 **samples, int numsamples, Uint *dst, Uint32 len, int 

And SDL_MixAudio() becomes:

  void SDL_MixAudio(Uint8 *dst, Uint8 *src, Uint32 len, int volume)
     Uint8 *samples[2] = { dst, src };
     SDL_MixAudio(samples, 2, dst, len, volume);


More information about the sdlsound mailing list