{
#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_);
{
#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;
\r
// ------------------------------------------------------------------------------------------\r
#define _WASAPI_MONO_TO_STEREO_MIXER(TYPE)\\r
- TYPE * __restrict to = __to;\\r
- TYPE * __restrict from = __from;\\r
+ TYPE * __restrict to = (TYPE *)__to;\\r
+ TYPE * __restrict from = (TYPE *)__from;\\r
TYPE * __restrict end = from + count;\\r
while (from != end)\\r
{\\r
// ------------------------------------------------------------------------------------------\r
static void _MixMonoToStereo_24(void *__to, void *__from, UINT32 count)\r
{\r
-#pragma pack(push, 1)\r
- typedef struct wasapi_int24 { BYTE d[3]; } wasapi_int24; //<< 24 bit value, packed to 1 byte to avoid padding\r
-#pragma pack(pop)\r
- _WASAPI_MONO_TO_STEREO_MIXER(wasapi_int24);\r
+ _WASAPI_MONO_TO_STEREO_MIXER(int); // !!! int24 data is contained in 32-bit containers\r
}\r
\r
// ------------------------------------------------------------------------------------------\r