[SDL] Re: SDL_mixer lib questions
megastep at lokigames.com
Wed Apr 5 18:48:48 PDT 2000
In article <38EB150D.40DA06B4 at cyberlife.co.uk>,
Ben Campbell <ben.campbell at cyberlife.co.uk> writes:
> I've recently started porting some directsound stuff, and have run into
> a few questions about the SDL_mixer library:
> 1) What is the rationale behind the maximum number of channels being set
> to 8? Would it be worth adding a function to allow apps to up this
It's already in the API :
/* Dynamically change the number of channels managed by the mixer.
If decreasing the number of channels, the upper channels are
This function returns the new number of allocated channels.
extern DECLSPEC int Mix_AllocateChannels(int numchans);
> The game I'm hacking about on would probably benefit from more channels.
> The original directsound version uses up to 32 channels, each with
> stereo panning. On a decent sound card under dsound, I think most of the
> mixing is done by the hardware. Even my crappy little no-namebrand
> soundcard can mix 8 channels in hardware.
> 2) Can SDL take advantage of hardware mixing? From looking at the audio
> code, it looks like everything is mixed in software.
That's true, the mixer uses SDL_MixAudio(), which is entirely software for
Loki Entertainment Software
"Microsoft has done to computers what McDonald's has done to gastronomy"
More information about the SDL