- fixed int24 Mono to Stereo mixer (affects Mono streams starting in Exclusive mode)
pa_converters: 
 - avoid using 64-bit integer math for Int24_To_Float32 and Int24_To_Int32 under x64 Posix platforms (long is 64-bit there), now using explicit PaInt32 type
This commit is contained in:
dmitrykos 2010-03-25 23:27:27 +00:00
commit d714962621
2 changed files with 15 additions and 18 deletions

View file

@ -1073,13 +1073,13 @@ static void Int24_To_Float32(
{
#if defined(PA_LITTLE_ENDIAN)
temp = (((long)src[0]) << 8);
temp = temp | (((long)src[1]) << 16);
temp = temp | (((long)src[2]) << 24);
temp = (((PaInt32)src[0]) << 8);
temp = temp | (((PaInt32)src[1]) << 16);
temp = temp | (((PaInt32)src[2]) << 24);
#elif defined(PA_BIG_ENDIAN)
temp = (((long)src[0]) << 24);
temp = temp | (((long)src[1]) << 16);
temp = temp | (((long)src[2]) << 8);
temp = (((PaInt32)src[0]) << 24);
temp = temp | (((PaInt32)src[1]) << 16);
temp = temp | (((PaInt32)src[2]) << 8);
#endif
*dest = (float) ((double)temp * const_1_div_2147483648_);
@ -1106,13 +1106,13 @@ static void Int24_To_Int32(
{
#if defined(PA_LITTLE_ENDIAN)
temp = (((long)src[0]) << 8);
temp = temp | (((long)src[1]) << 16);
temp = temp | (((long)src[2]) << 24);
temp = (((PaInt32)src[0]) << 8);
temp = temp | (((PaInt32)src[1]) << 16);
temp = temp | (((PaInt32)src[2]) << 24);
#elif defined(PA_BIG_ENDIAN)
temp = (((long)src[0]) << 24);
temp = temp | (((long)src[1]) << 16);
temp = temp | (((long)src[2]) << 8);
temp = (((PaInt32)src[0]) << 24);
temp = temp | (((PaInt32)src[1]) << 16);
temp = temp | (((PaInt32)src[2]) << 8);
#endif
*dest = temp;