diff --git a/engine/client/renderer.c b/engine/client/renderer.c index ad39ee68d..6949a7b7c 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -1703,7 +1703,7 @@ TRACE(("dbg: R_ApplyRenderer: efrags\n")); TRACE(("dbg: R_ApplyRenderer: S_Restart_f\n")); if (!isDedicated) - S_Restart_f(); + S_DoRestart(); TRACE(("dbg: R_ApplyRenderer: done\n")); diff --git a/engine/client/snd_dma.c b/engine/client/snd_dma.c index f97e72c33..e27538f2f 100644 --- a/engine/client/snd_dma.c +++ b/engine/client/snd_dma.c @@ -318,10 +318,10 @@ void SNDDMA_SetUnderWater(qboolean underwater) sc->SetWaterDistortion(sc, underwater); } -void S_Restart_f (void) +//why isn't this part of S_Restart_f anymore? +//so that the video code can call it directly without flushing the models it's just loaded. +void S_DoRestart (void) { - Cache_Flush();//forget the old sounds. - if (COM_CheckParm("-nosound")) return; @@ -337,6 +337,13 @@ void S_Restart_f (void) S_StopAllSounds (true); } +void S_Restart_f (void) +{ + Cache_Flush();//forget the old sounds. + + S_DoRestart(); +} + void S_Control_f (void) { int i; diff --git a/engine/client/sound.h b/engine/client/sound.h index d3939f7b4..d8ec718e8 100644 --- a/engine/client/sound.h +++ b/engine/client/sound.h @@ -139,8 +139,8 @@ channel_t *SND_PickChannel(soundcardinfo_t *sc, int entnum, int entchannel); // spatializes a channel void SND_Spatialize(soundcardinfo_t *sc, channel_t *ch); -// restart entire sound subsystem -void S_Restart_f (void); +// restart entire sound subsystem (doesn't flush old sounds, so make sure that happens) +void S_DoRestart (void); //plays streaming audio void S_RawAudio(int sourceid, qbyte *data, int speed, int samples, int channels, int width);