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:
parent
5b6dcbe59b
commit
ba1def6126
2 changed files with 3 additions and 3 deletions
|
|
@ -141,7 +141,7 @@ typedef struct PaMacCoreStream
|
||||||
AudioBufferList inputAudioBufferList;
|
AudioBufferList inputAudioBufferList;
|
||||||
AudioTimeStamp startTime;
|
AudioTimeStamp startTime;
|
||||||
/* FIXME: instead of volatile, these should be properly memory barriered */
|
/* FIXME: instead of volatile, these should be properly memory barriered */
|
||||||
volatile PaStreamCallbackFlags xrunFlags;
|
volatile uint32_t xrunFlags; /*PaStreamCallbackFlags*/
|
||||||
volatile enum {
|
volatile enum {
|
||||||
STOPPED = 0, /* playback is completely stopped,
|
STOPPED = 0, /* playback is completely stopped,
|
||||||
and the user has called StopStream(). */
|
and the user has called StopStream(). */
|
||||||
|
|
|
||||||
|
|
@ -652,10 +652,10 @@ OSStatus xrunCallback(
|
||||||
|
|
||||||
if( isInput ) {
|
if( isInput ) {
|
||||||
if( stream->inputDevice == inDevice )
|
if( stream->inputDevice == inDevice )
|
||||||
OSAtomicOr32( paInputOverflow, (uint32_t *)&(stream->xrunFlags) );
|
OSAtomicOr32( paInputOverflow, &stream->xrunFlags );
|
||||||
} else {
|
} else {
|
||||||
if( stream->outputDevice == inDevice )
|
if( stream->outputDevice == inDevice )
|
||||||
OSAtomicOr32( paOutputUnderflow, (uint32_t *)&(stream->xrunFlags) );
|
OSAtomicOr32( paOutputUnderflow, &stream->xrunFlags );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue