From d9b7ccd5e35b2351644138136997130c1b8c07b4 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 18 Mar 2007 13:07:20 +0000 Subject: [PATCH] seems to fix going from start to e1m1 in nq --- libs/audio/renderer/snd_channels.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/audio/renderer/snd_channels.c b/libs/audio/renderer/snd_channels.c index 5d077cc2c..ba1e6b569 100644 --- a/libs/audio/renderer/snd_channels.c +++ b/libs/audio/renderer/snd_channels.c @@ -371,9 +371,9 @@ s_updateAmbientSounds (void) } sfx = ambient_sfx[ambient_channel]; if (!sfx) { - if (chan && chan->sfx && !chan->stop) + if (chan) SND_ChannelStop (chan); - ambient_channels[ambient_channel] = 0; + chan = ambient_channels[ambient_channel] = 0; continue; } @@ -387,6 +387,7 @@ s_updateAmbientSounds (void) sfx->retain (sfx); } else { sfx = chan->sfx; + sfx->retain (sfx);//FIXME why is this needed? } // sfx will be written to chan->sfx later to ensure mixer doesn't use // channel prematurely.