// mixer functions
// ----------------------------------------------------------------------------
+static void Mixer_ChannelFinished(int channel)
+{
+ if (!mixer[channel].active)
+ return;
+
+ mixer[channel].active = FALSE;
+ mixer_active_channels--;
+}
+
void Mixer_InitChannels(void)
{
int i;
for (i = 0; i < audio.num_channels; i++)
mixer[i].active = FALSE;
mixer_active_channels = 0;
+
+ Mix_ChannelFinished(Mixer_ChannelFinished);
}
static void Mixer_ResetChannelExpiration(int channel)
static void Mixer_StopChannel(int channel)
{
- if (!mixer[channel].active)
- return;
-
Mix_HaltChannel(channel);
-
- mixer[channel].active = FALSE;
- mixer_active_channels--;
}
static void Mixer_StopMusicChannel(void)