[sound] Don't free channels when allocating

SND_AllocChannel is a little too aggressive in freeing channels that
have finished as the channel may be externally owned (eg, by cd_file).
Get bgm looping working again.
This commit is contained in:
Bill Currie 2022-06-04 18:29:37 +09:00
parent 632226dd32
commit 855b9dccc0

View file

@ -164,14 +164,6 @@ SND_AllocChannel (snd_t *snd)
{
channel_t *chan;
// chech for any channels that have become available as the mixer thread
// has finished with them
for (int i = 0; i < MAX_CHANNELS; i++) {
channel_t *ch = &snd_channels[i];
if (ch->done) {
snd_free_channel (ch);
}
}
//Sys_MaskPrintf (SYS_snd, "SND_AllocChannel: free channels: %d\n",
// snd_num_free_channels);
if (!snd_num_free_channels) {