aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-04-27 19:26:27 -0700
committerChris Robinson <[email protected]>2011-04-27 19:26:27 -0700
commit8586aeabe8df1049ffe15612ee5c1e98a4c09313 (patch)
tree73ba929611b3f8a49bf2cef2e452b381f4f77497 /OpenAL32/alBuffer.c
parentc031b4d5d07703e179f258e74fdfbd8e6b66e9ef (diff)
Minor fix for 24-bit conversions to float and double
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c8
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) \