|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
int Mix_AllocateChannels(int numchans)
Set the number of channels being mixed. This can be called multiple times, even with sounds playing. If numchans is less than the current number of channels, then the higher channels will be stopped, freed, and therefore not mixed any longer. It's probably not a good idea to change the size 1000 times a second though.
If any channels are deallocated, any callback set by
Mix_ChannelFinished will be called when each channel is halted to be freed.
Note: passing in zero WILL free all mixing channels, however music will still play.
Returns: The number of channels allocated. Never fails...but a high number of channels can segfault if you run out of memory. We're talking REALLY high!