aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-10-20 09:48:09 -0700
committerChris Robinson <[email protected]>2009-10-20 09:48:09 -0700
commit67c3e47ed4c1a0e54e8bf8f1d0c05d38a5fa7e19 (patch)
tree44d69bfe7848ec1a4a7a480563039e3e25dd801d /Alc
parentf14cf8289eae832b090c4067ae66a19be08b7029 (diff)
Avoid handling NaN when scaling float samples for output
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c6
1 files 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)