From 396ff706ed3e01e2be1ccf2259dc20dc70a91e6f Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 19 Jan 2011 14:02:42 -0700 Subject: [PATCH] remove some unneeded stuff --- Quake/snd_dma.c | 2 -- Quake/snd_mix.c | 28 ---------------------------- Quake/sound.h | 3 --- 3 files changed, 33 deletions(-) diff --git a/Quake/snd_dma.c b/Quake/snd_dma.c index 05035f52..fca9a868 100644 --- a/Quake/snd_dma.c +++ b/Quake/snd_dma.c @@ -182,8 +182,6 @@ void S_Init (void) Con_Printf ("loading all sounds as 8bit\n"); } - SND_InitScaletable (); - known_sfx = (sfx_t *) Hunk_AllocName (MAX_SFX*sizeof(sfx_t), "sfx_t"); num_sfx = 0; diff --git a/Quake/snd_mix.c b/Quake/snd_mix.c index 4f6512dd..3aa70c86 100644 --- a/Quake/snd_mix.c +++ b/Quake/snd_mix.c @@ -237,24 +237,6 @@ void S_PaintChannels (int endtime) } } -void SND_InitScaletable (void) -{ - int i, j; - - for (i = 0; i < 32; i++) - { - for (j = 0; j < 256; j++) - /* When compiling with gcc-4.1.0 at optimisations O1 and - higher, the tricky signed char type conversion is not - guaranteed. Therefore we explicity calculate the signed - value from the index as required. From Kevin Shanahan. - See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719 - */ - // snd_scaletable[i][j] = ((signed char)j) * i * 8; - snd_scaletable[i][j] = ((j < 128) ? j : j - 0xff) * i * 8; - } -} - void SND_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count) { @@ -298,21 +280,11 @@ void SND_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count) for (i = 0; i < count; i++) { - if ((ch->pos + i) >= sc->length) - { - Con_Printf("Overran Sample!\n"); - } - data = sfx[i]; left = (data * leftvol) >> 8; right = (data * rightvol) >> 8; paintbuffer[i].left += left; paintbuffer[i].right += right; - - if (paintbuffer[i].left > (1 << 24)) - { - Con_Printf("Clipping!\n"); - } } ch->pos += count; diff --git a/Quake/sound.h b/Quake/sound.h index ba22b0c6..239f69ee 100644 --- a/Quake/sound.h +++ b/Quake/sound.h @@ -215,9 +215,6 @@ extern int snd_blocked; void S_LocalSound (const char *s); sfxcache_t *S_LoadSound (sfx_t *s); -wavinfo_t GetWavinfo (const char *name, byte *wav, int wavlength); - -void SND_InitScaletable (void); void S_AmbientOff (void); void S_AmbientOn (void);