coreaudio: fixed incorrect value type used with OSAtomicOr32 API (xrunFlags were casted from long to unsigned int) which results in value truncation on systems where 'long' is 64 bits

This commit is contained in:
dmitrykos 2010-12-25 13:26:17 +00:00
commit ba1def6126
2 changed files with 3 additions and 3 deletions

View file

@ -141,7 +141,7 @@ typedef struct PaMacCoreStream
AudioBufferList inputAudioBufferList;
AudioTimeStamp startTime;
/* FIXME: instead of volatile, these should be properly memory barriered */
volatile PaStreamCallbackFlags xrunFlags;
volatile uint32_t xrunFlags; /*PaStreamCallbackFlags*/
volatile enum {
STOPPED = 0, /* playback is completely stopped,
and the user has called StopStream(). */

View file

@ -652,10 +652,10 @@ OSStatus xrunCallback(
if( isInput ) {
if( stream->inputDevice == inDevice )
OSAtomicOr32( paInputOverflow, (uint32_t *)&(stream->xrunFlags) );
OSAtomicOr32( paInputOverflow, &stream->xrunFlags );
} else {
if( stream->outputDevice == inDevice )
OSAtomicOr32( paOutputUnderflow, (uint32_t *)&(stream->xrunFlags) );
OSAtomicOr32( paOutputUnderflow, &stream->xrunFlags );
}
}