diff options
author | Chris Robinson <[email protected]> | 2011-04-27 19:26:27 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-04-27 19:26:27 -0700 |
commit | 8586aeabe8df1049ffe15612ee5c1e98a4c09313 (patch) | |
tree | 73ba929611b3f8a49bf2cef2e452b381f4f77497 | |
parent | c031b4d5d07703e179f258e74fdfbd8e6b66e9ef (diff) |
Minor fix for 24-bit conversions to float and double
-rw-r--r-- | OpenAL32/alBuffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index c4cd4252..a1af0858 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -1443,9 +1443,9 @@ static __inline ALfloat Conv_ALfloat_ALdouble(ALdouble val) static __inline ALfloat Conv_ALfloat_ALmulaw(ALmulaw val) { return Conv_ALfloat_ALshort(DecodeMuLaw(val)); } static __inline ALfloat Conv_ALfloat_ALbyte3(ALbyte3 val) -{ return DecodeByte3(val) * (1.0/8388608.0); } +{ return DecodeByte3(val) * (1.0/8388607.0); } static __inline ALfloat Conv_ALfloat_ALubyte3(ALubyte3 val) -{ return (DecodeUByte3(val)-8388608) * (1.0/8388608.0); } +{ return (DecodeUByte3(val)-8388608) * (1.0/8388607.0); } static __inline ALdouble Conv_ALdouble_ALbyte(ALbyte val) { return val * (1.0/127.0); } @@ -1466,9 +1466,9 @@ static __inline ALdouble Conv_ALdouble_ALdouble(ALdouble val) static __inline ALdouble Conv_ALdouble_ALmulaw(ALmulaw val) { return Conv_ALdouble_ALshort(DecodeMuLaw(val)); } static __inline ALdouble Conv_ALdouble_ALbyte3(ALbyte3 val) -{ return DecodeByte3(val) * (1.0/8388608.0); } +{ return DecodeByte3(val) * (1.0/8388607.0); } static __inline ALdouble Conv_ALdouble_ALubyte3(ALubyte3 val) -{ return (DecodeUByte3(val)-8388608) * (1.0/8388608.0); } +{ return (DecodeUByte3(val)-8388608) * (1.0/8388607.0); } #define DECL_TEMPLATE(T) \ static __inline ALmulaw Conv_ALmulaw_##T(T val) \ |