#! /bin/sh /usr/share/dpatch/dpatch-run ## 40_wordsize.dpatch by Peter De Wachter ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix portaudio for 64 bit platforms @DPATCH@ diff --git a/pa_common/pa_host.h b/pa_common/pa_host.h index db898fe..db12e51 100644 --- a/pa_common/pa_host.h +++ b/pa_common/pa_host.h @@ -48,17 +48,19 @@ extern "C" #define SUPPORT_AUDIO_CAPTURE (1) #endif +#include + #ifndef int32 - typedef long int32; + typedef int32_t int32; #endif #ifndef uint32 - typedef unsigned long uint32; + typedef uint32_t uint32; #endif #ifndef int16 - typedef short int16; + typedef int16_t int16; #endif #ifndef uint16 - typedef unsigned short uint16; + typedef uint16_t uint16; #endif /* Used to convert between various sample formats. */ diff --git a/pa_common/pa_lib.c b/pa_common/pa_lib.c index bf97de2..b48d105 100644 --- a/pa_common/pa_lib.c +++ b/pa_common/pa_lib.c @@ -498,10 +498,10 @@ internalPortAudioStream* PaHost_GetStreamRepresentation( PortAudioStream *stream #define PA_DITHER_SCALE (1.0f / ((1<>DITHER_SHIFT) + (((long)randSeed2)>>DITHER_SHIFT); + current = (((int32)randSeed1)>>DITHER_SHIFT) + (((int32)randSeed2)>>DITHER_SHIFT); /* High pass filter to reduce audibility. */ highPass = current - previous; previous = current;