Commit 695dc2b9 authored by David Reid's avatar David Reid

Fix VC6 build.

parent 3acd03b1
...@@ -11197,7 +11197,8 @@ void mal_pcm_s32_to_f32(float* pOut, const int* pIn, unsigned int count) ...@@ -11197,7 +11197,8 @@ void mal_pcm_s32_to_f32(float* pOut, const int* pIn, unsigned int count)
for (unsigned int i = 0; i < count; ++i) { for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i]; int x = pIn[i];
double t; double t;
t = (double)(x + 2147483648LL); t = (double)(x + 2147483647);
t = t + 1;
t = t * 0.0000000004656612873077392578125; t = t * 0.0000000004656612873077392578125;
r = (float)(t - 1); r = (float)(t - 1);
pOut[i] = (float)r; pOut[i] = (float)r;
...@@ -11255,7 +11256,8 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count) ...@@ -11255,7 +11256,8 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
c = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); c = ((x < -1) ? -1 : ((x > 1) ? 1 : x));
c = c + 1; c = c + 1;
t = (mal_int64)(c * 2147483647.5); t = (mal_int64)(c * 2147483647.5);
r = (int)(t - 2147483648LL); t = t - 2147483647;
r = (int)(t - 1);
pOut[i] = (int)r; pOut[i] = (int)r;
} }
} }
......
...@@ -119,7 +119,8 @@ s32->s24 { ...@@ -119,7 +119,8 @@ s32->s24 {
# r = ((x + 2147483648) * 0.0000000004656612873077392578125) - 1 # r = ((x + 2147483648) * 0.0000000004656612873077392578125) - 1
s32->f32 { s32->f32 {
dbl t; dbl t;
add (dbl)t x 2147483648LL; add (dbl)t x 2147483647;
add t t 1;
mul t t 0.0000000004656612873077392578125; mul t t 0.0000000004656612873077392578125;
sub (flt)r t 1; sub (flt)r t 1;
} }
...@@ -159,5 +160,6 @@ f32->s32 { ...@@ -159,5 +160,6 @@ f32->s32 {
clip c x; clip c x;
add c c 1; add c c 1;
mul (lng)t c 2147483647.5; mul (lng)t c 2147483647.5;
sub (int)r t 2147483648LL; sub t t 2147483647;
sub (int)r t 1;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment