seems to fix going from start to e1m1 in nq

This commit is contained in:
Bill Currie 2007-03-18 13:07:20 +00:00 committed by Jeff Teunissen
parent d67cbeae7f
commit d9b7ccd5e3

View file

@ -371,9 +371,9 @@ s_updateAmbientSounds (void)
} }
sfx = ambient_sfx[ambient_channel]; sfx = ambient_sfx[ambient_channel];
if (!sfx) { if (!sfx) {
if (chan && chan->sfx && !chan->stop) if (chan)
SND_ChannelStop (chan); SND_ChannelStop (chan);
ambient_channels[ambient_channel] = 0; chan = ambient_channels[ambient_channel] = 0;
continue; continue;
} }
@ -387,6 +387,7 @@ s_updateAmbientSounds (void)
sfx->retain (sfx); sfx->retain (sfx);
} else { } else {
sfx = chan->sfx; 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 // sfx will be written to chan->sfx later to ensure mixer doesn't use
// channel prematurely. // channel prematurely.