Makes vid_restart not do a double flush, resulting in faster vid_restarts, or at least less stutters when loading models.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1100 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-06-18 23:52:42 +00:00
parent 2c5eeb9fa4
commit 0fb5e1dccb
3 changed files with 13 additions and 6 deletions

View File

@ -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"));

View File

@ -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;

View File

@ -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);