From 1b26cea514d09f4d545e823db4317ac351b8605c Mon Sep 17 00:00:00 2001 From: molivier Date: Wed, 23 Jun 2004 14:14:11 +0000 Subject: [PATCH] Removed unused functions S_AmbientOff and S_AmbientOn. Moved S_ClearBuffer declaration into "snd_dma.c" so it doesn't need an implementation in "snd_null.c" git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4251 d7cf8633-e32d-0410-b094-e92efae38249 --- snd_dma.c | 18 ++++-------------- snd_null.c | 12 ------------ sound.h | 4 ---- 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/snd_dma.c b/snd_dma.c index 871a6a69..1c6957e3 100644 --- a/snd_dma.c +++ b/snd_dma.c @@ -40,6 +40,9 @@ void S_Update_(); void S_StopAllSounds(qboolean clear); void S_StopAllSoundsC(void); +void S_ClearBuffer (void); + + // ======================================================================= // Internal sound data & structures // ======================================================================= @@ -48,7 +51,6 @@ channel_t channels[MAX_CHANNELS]; unsigned int total_channels; int snd_blocked = 0; -static qboolean snd_ambient = 1; cvar_t snd_initialized = { CVAR_READONLY, "snd_initialized", "0"}; cvar_t snd_streaming = { CVAR_SAVE, "snd_streaming", "1"}; @@ -107,18 +109,6 @@ qboolean fakedma = false; int fakedma_updates = 15; -void S_AmbientOff (void) -{ - snd_ambient = false; -} - - -void S_AmbientOn (void) -{ - snd_ambient = true; -} - - void S_SoundInfo_f(void) { if (!sound_started || !shm) @@ -814,7 +804,7 @@ void S_UpdateAmbientSounds (void) for (ambient_channel = 0 ; ambient_channel < NUM_AMBIENTS;ambient_channel++) channels[ambient_channel].sfx = NULL; - if (!snd_ambient || ambient_level.value <= 0 || !cl.worldmodel || !cl.worldmodel->brush.AmbientSoundLevelsForPoint) + if (ambient_level.value <= 0 || !cl.worldmodel || !cl.worldmodel->brush.AmbientSoundLevelsForPoint) return; cl.worldmodel->brush.AmbientSoundLevelsForPoint(cl.worldmodel, listener_vieworigin, ambientlevels, sizeof(ambientlevels)); diff --git a/snd_null.c b/snd_null.c index 5d43db07..52abac6e 100755 --- a/snd_null.c +++ b/snd_null.c @@ -36,14 +36,6 @@ void S_Init (void) Cvar_RegisterVariable(&snd_initialized); } -void S_AmbientOff (void) -{ -} - -void S_AmbientOn (void) -{ -} - void S_Startup (void) { } @@ -64,10 +56,6 @@ void S_PurgeUnused (void) { } -void S_ClearBuffer (void) -{ -} - void S_StaticSound (sfx_t *sfx, vec3_t origin, float vol, float attenuation) { } diff --git a/sound.h b/sound.h index 55eee7b2..70a350b5 100644 --- a/sound.h +++ b/sound.h @@ -113,7 +113,6 @@ void S_StopAllSounds(qboolean clear); void S_PauseGameSounds (void); void S_ResumeGameSounds (void); void S_SetChannelVolume (unsigned int ch_ind, float fvol); -void S_ClearBuffer (void); void S_Update(vec3_t origin, vec3_t forward, vec3_t left, vec3_t up); void S_ExtraUpdate (void); @@ -187,9 +186,6 @@ void S_UnloadSound(sfx_t *s); void SND_InitScaletable (void); void SNDDMA_Submit(void); -void S_AmbientOff (void); -void S_AmbientOn (void); - void *S_LockBuffer(void); void S_UnlockBuffer(void); -- 2.39.2