From 1f8541cabc8748e3615ebf261d071ad5cdceeaf0 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 14 Oct 2011 18:53:03 +0000 Subject: [PATCH] fix decay calculation in snd_softclip git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11416 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=2b6658ae80858652e17ad3489e4bf5df6a7b8106 --- snd_mix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snd_mix.c b/snd_mix.c index 3495d86d..50c07bcc 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -64,7 +64,7 @@ static void S_SoftClipPaintBuffer(portable_sampleframe_t *painted_ptr, int nbfra // let's do a simple limiter instead, seems to sound better static float maxvol = 0; - maxvol = max(1.0f, maxvol * (1.0f - nbframes / snd_renderbuffer->format.speed)); + maxvol = max(1.0f, maxvol * (1.0f - nbframes / (0.4f * snd_renderbuffer->format.speed))); #define SOFTCLIP(x) if((x)>maxvol) maxvol=(x); (x) /= maxvol; portable_sampleframe_t *p = painted_ptr; -- 2.39.2