From 67c3e47ed4c1a0e54e8bf8f1d0c05d38a5fa7e19 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 20 Oct 2009 09:48:09 -0700 Subject: Avoid handling NaN when scaling float samples for output --- Alc/ALu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index 26532091..755c8bf0 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -61,9 +61,9 @@ ALboolean DuplicateStereo = AL_FALSE; static __inline ALfloat aluF2F(ALfloat Value) { - if(Value < 0.f) Value /= 32768.f; - else Value /= 32767.f; - return Value; + if(Value < 0.f) return Value/32768.f; + if(Value > 0.f) return Value/32767.f; + return 0.f; } static __inline ALshort aluF2S(ALfloat Value) -- cgit v1.2.3