diff options
author | Chris Robinson <[email protected]> | 2009-10-20 09:48:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-10-20 09:48:09 -0700 |
commit | 67c3e47ed4c1a0e54e8bf8f1d0c05d38a5fa7e19 (patch) | |
tree | 44d69bfe7848ec1a4a7a480563039e3e25dd801d /Alc/ALu.c | |
parent | f14cf8289eae832b090c4067ae66a19be08b7029 (diff) |
Avoid handling NaN when scaling float samples for output
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |