summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-12-09 22:47:06 -0800
committerChris Robinson <[email protected]>2010-12-09 22:47:06 -0800
commit5a548f836693b6988e2728b045888848097ecc44 (patch)
treec235b526cb48adca8397f71dac87002439b03617
parent023658605ed6f64871318c5143d48c8838be70d1 (diff)
Another fix for float-to-int conversions
-rw-r--r--OpenAL32/alBuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index f279ac28..f8f30685 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -1104,13 +1104,13 @@ static __inline ALint Conv_ALint_ALuint(ALuint val)
static __inline ALint Conv_ALint_ALfloat(ALfloat val)
{
if(val > 1.0f) return 2147483647;
- if(val < -1.0f) return 0u-2147483648u;
+ if(val < -1.0f) return -2147483647-1;
return (ALint)(val * 2147483647.0);
}
static __inline ALint Conv_ALint_ALdouble(ALdouble val)
{
if(val > 1.0) return 2147483647;
- if(val < -1.0) return 0u-2147483648u;
+ if(val < -1.0) return -2147483647-1;
return (ALint)(val * 2147483647.0);
}
static __inline ALint Conv_ALint_ALmulaw(ALmulaw val)