From b17b8afa3cb8fe6e6bcf5444bd4c37dd2a889313 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 6 Oct 2000 18:42:03 +0000 Subject: [PATCH] turns out some like interpolated, others don't. snd_interp conrols this. Defaults to on so those used to 11k sampling won't be too suprised. --- include/sound.h | 2 ++ source/snd_dma.c | 2 ++ source/snd_mem.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sound.h b/include/sound.h index cdf7208..b89bcaf 100644 --- a/include/sound.h +++ b/include/sound.h @@ -172,6 +172,8 @@ extern cvar_t *loadas8bit; extern cvar_t *bgmvolume; extern cvar_t *volume; +extern cvar_t *snd_interp; + extern qboolean snd_initialized; extern int snd_blocked; diff --git a/source/snd_dma.c b/source/snd_dma.c index b3a4914..2b57abd 100644 --- a/source/snd_dma.c +++ b/source/snd_dma.c @@ -99,6 +99,7 @@ cvar_t *ambient_level; cvar_t *ambient_fade; cvar_t *snd_noextraupdate; cvar_t *snd_show; +cvar_t *snd_interp; cvar_t *_snd_mixahead; @@ -205,6 +206,7 @@ void S_Init (void) ambient_fade = Cvar_Get("ambient_fade", "100", CVAR_NONE, "None"); snd_noextraupdate = Cvar_Get("snd_noextraupdate", "0", CVAR_NONE, "None"); snd_show = Cvar_Get("snd_show", "0", CVAR_NONE, "None"); + snd_interp = Cvar_Get("snd_interp", "1", CVAR_ARCHIVE, "control sample interpolation"); _snd_mixahead = Cvar_Get("_snd_mixahead", "0.1", CVAR_ARCHIVE, "None"); if (COM_CheckParm("-nosound")) diff --git a/source/snd_mem.c b/source/snd_mem.c index 26fd387..2f37e19 100644 --- a/source/snd_mem.c +++ b/source/snd_mem.c @@ -99,7 +99,7 @@ void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, byte *data) } } else { // general case - if (stepscale < 1) { + if (snd_interp->int_val && stepscale < 1) { int points = 1/stepscale; int j;