From fb468107b060a8807014662ed251ab6e82ec7f7a Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 22 May 2007 20:07:56 +0000 Subject: [PATCH] renamed snd_reload to snd_unloadallsounds to clarify its purpose git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7339 d7cf8633-e32d-0410-b094-e92efae38249 --- darkplaces.txt | 2 +- fs.c | 4 ++-- snd_main.c | 6 +++--- snd_null.c | 2 +- sound.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/darkplaces.txt b/darkplaces.txt index 18ab371e..c5e96e89 100644 --- a/darkplaces.txt +++ b/darkplaces.txt @@ -1200,7 +1200,7 @@ setinfo modifies your userinfo sizedown decrease view size (decreases viewsize cvar) sizeup increase view size (increases viewsize cvar) skins downloads missing qw skins from server -snd_reload reload all sound files +snd_unloadallsounds unload all sound files snd_restart restart sound system soundinfo print sound system information (such as channels and speed) soundlist list loaded sounds diff --git a/fs.c b/fs.c index 89e290ae..6df06121 100644 --- a/fs.c +++ b/fs.c @@ -1230,8 +1230,8 @@ qboolean FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qboolean // exec the new config Host_LoadConfig_f(); - // reinitialize the loaded sounds - S_Reload_f(); + // unload all sounds so they will be reloaded from the new files as needed + S_UnloadAllSounds_f(); // reinitialize renderer (this reloads hud/console background/etc) R_Modules_Restart(); diff --git a/snd_main.c b/snd_main.c index 1734baea..e29b55eb 100644 --- a/snd_main.c +++ b/snd_main.c @@ -724,7 +724,7 @@ void S_Init(void) Cmd_AddCommand("soundlist", S_SoundList_f, "list loaded sounds"); Cmd_AddCommand("soundinfo", S_SoundInfo_f, "print sound system information (such as channels and speed)"); Cmd_AddCommand("snd_restart", S_Restart_f, "restart sound system"); - Cmd_AddCommand("snd_reload", S_Reload_f, "reload all sound files"); + Cmd_AddCommand("snd_unloadallsounds", S_UnloadAllSounds_f, "unload all sound files"); Cvar_RegisterVariable(&nosound); Cvar_RegisterVariable(&snd_precache); @@ -773,10 +773,10 @@ void S_Terminate (void) /* ================== -S_Reload_f +S_UnloadAllSounds_f ================== */ -void S_Reload_f (void) +void S_UnloadAllSounds_f (void) { int i; diff --git a/snd_null.c b/snd_null.c index 6eb6b94c..df7463fc 100755 --- a/snd_null.c +++ b/snd_null.c @@ -91,7 +91,7 @@ qboolean S_IsSoundPrecached (const sfx_t *sfx) return false; } -void S_Reload_f (void) +void S_UnloadAllSounds_f (void) { } diff --git a/sound.h b/sound.h index fbd5755b..b1e0cb09 100644 --- a/sound.h +++ b/sound.h @@ -60,7 +60,7 @@ void S_Terminate (void); void S_Startup (void); void S_Shutdown (void); -void S_Reload_f (void); +void S_UnloadAllSounds_f (void); void S_Update(const matrix4x4_t *listenermatrix); void S_ExtraUpdate (void); -- 2.39.2