[SDL] Some sounds not played by SDL_mixer, but channels not exhausted
sarrazip at sympatico.ca
Fri Jan 10 06:24:01 PST 2003
From: "Pierre Sarrazin" <sarrazip at sympatico dot ca>
Sent: Thursday, January 09, 2003 11:03 PM
> > I inserted trace code in the sources of SDL_mixer 1.2.4
> > (mix_channels() in mixer.c) and saw that channel 2 always has a
> > volume of 1 (instead of MIX_MAX_VOLUME (128)), while channels 0
> > and 1 have a volume of MIX_MAX_VOLUME as expected.
> > At first glance, I seem to have solved my problem with this patch
> > to make sure that sounds played on channel 2 are heard:
Dixit Atrix Wolfe <atrix2 at cox dot net> (2003-01-09 23:32):
> i know almost nothing about sound programming but a stab in the dark would
> be that your hardware or sound driver only supports channels 0 and 1. This
> is a random guess and i appologize in advance for this question but does
> channel 0 sound come out of the left speaker and channel 1 comes out of the
The mono/stereo channels have nothing to do with the mixing channels.
The terminology used in the SDL programming interface is a bit
misleading on that point.
The patch I described actually solves the problem: I can now hear
all three sounds on both speakers. The problem seems to be purely
in software. When I wrote a small program to try to reproduce the
problem, I could not: this small program played three simultaneous
sounds on the first try. Apparently, something in the dynamics of
my video game could be disrupting something in SDL_mixer.
Pierre Sarrazin <sarrazip at sympatico dot ca>
More information about the SDL