From 4659b691e6d94f77b15c43d6512c0dfb01ae3a3c Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 10 Mar 2012 21:21:42 +0000 Subject: [PATCH] Some sound source cleanup, no functional changes. - make a couple variables static in sounds_mapster32.c - KHz --> Hz in initialization text git-svn-id: https://svn.eduke32.com/eduke32@2439 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/astub.c | 8 +------- polymer/eduke32/source/sounds.c | 2 +- polymer/eduke32/source/sounds_mapster32.c | 4 ++-- polymer/eduke32/source/sounds_mapster32.h | 3 +++ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 23584669a..77512e1ed 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -2315,7 +2315,6 @@ ENDFOR1: } #define SOUND_NUMDISPLINES IHELP_NUMDISPLINES -//extern char SoundToggle; static int32_t compare_sounds_s(int16_t k1, int16_t k2) { @@ -2463,8 +2462,6 @@ static void SoundDisplay(void) static int32_t cursnd=0, curofs=0; char disptext[SOUND_NUMDISPLINES][80]; - // SoundToggle = 1; - while (keystatus[KEYSC_ESC]==0 && keystatus[KEYSC_Q]==0 && keystatus[KEYSC_F2]==0 && keystatus[buildkeys[BK_MODE2D_3D]]==0) // quickjump to 3d mode { @@ -2645,7 +2642,6 @@ static void SoundDisplay(void) FX_StopAllSounds(); S_ClearSoundLocks(); - // SoundToggle = 0; keystatus[KEYSC_ESC] = keystatus[KEYSC_Q] = keystatus[KEYSC_F2] = 0; } @@ -2668,9 +2664,7 @@ static int32_t dist(spritetype *s1,spritetype *s2) } } -extern int32_t NumVoices; -extern int32_t g_numEnvSoundsPlaying; -int32_t AmbienceToggle = 1; //SoundToggle; +int32_t AmbienceToggle = 1; int32_t ParentalLock = 0; #undef T1 #define T1 (s->filler) diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index d05e40def..07e047c7d 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -65,7 +65,7 @@ void S_SoundStartup(void) return; } - initprintf("%d voices, %d channels, %d-bit %dKHz\n", ud.config.NumVoices, ud.config.NumChannels, + initprintf("%d voices, %d channels, %d-bit %d Hz\n", ud.config.NumVoices, ud.config.NumChannels, ud.config.NumBits, ud.config.MixRate); for (i=g_maxSoundPos; i >= 0 ; i--) diff --git a/polymer/eduke32/source/sounds_mapster32.c b/polymer/eduke32/source/sounds_mapster32.c index d61de4f1a..79aba3457 100644 --- a/polymer/eduke32/source/sounds_mapster32.c +++ b/polymer/eduke32/source/sounds_mapster32.c @@ -48,11 +48,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static char SM32_havesound = 0; -char SoundToggle = 1; +static char SoundToggle = 1; int32_t NumVoices = 32; int32_t MixRate = 44100; -int32_t backflag,g_numEnvSoundsPlaying; +int32_t g_numEnvSoundsPlaying; void MUSIC_Update(void) {} // needed when linking diff --git a/polymer/eduke32/source/sounds_mapster32.h b/polymer/eduke32/source/sounds_mapster32.h index b393dcda5..8c5e719b5 100644 --- a/polymer/eduke32/source/sounds_mapster32.h +++ b/polymer/eduke32/source/sounds_mapster32.h @@ -46,6 +46,9 @@ typedef struct { #define MAXSOUNDS 4096 extern sound_t g_sounds[MAXSOUNDS]; +extern int32_t g_numEnvSoundsPlaying; +extern int32_t NumVoices; + int32_t S_SoundStartup(void); void S_SoundShutdown(void); int32_t S_PlaySound3D(int32_t, int32_t, const vec3_t*);