From: divverent Date: Fri, 14 Oct 2011 18:53:03 +0000 (+0000) Subject: fix decay calculation in snd_softclip X-Git-Tag: xonotic-v0.6.0~163^2~141 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2b6658ae80858652e17ad3489e4bf5df6a7b8106;p=xonotic%2Fdarkplaces.git fix decay calculation in snd_softclip git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11416 d7cf8633-e32d-0410-b094-e92efae38249 --- 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;