From 339e875f42727b759bf167fa0820e099bbd2fb93 Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Sat, 24 Sep 2016 08:53:28 -0700 Subject: [PATCH] pa_mac_core: fix whitespace and missing semicolon It compiled without the semicolon because it was followed by a VDBUG, which was followed by a semicolon. The VDBUG was disabled so its semicolon finished the line above. --- src/hostapi/coreaudio/pa_mac_core.c | 6 +++--- src/hostapi/coreaudio/pa_mac_core_blocking.c | 9 +++++---- test/patest_write_stop_hang_illegal.c | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/hostapi/coreaudio/pa_mac_core.c b/src/hostapi/coreaudio/pa_mac_core.c index 3fba82a..257e9de 100644 --- a/src/hostapi/coreaudio/pa_mac_core.c +++ b/src/hostapi/coreaudio/pa_mac_core.c @@ -2789,12 +2789,12 @@ static PaError StopStream( PaStream *s ) /* Tell WriteStream to stop filling the buffer. */ stream->state = STOPPING; - if (stream->userOutChan > 0) /* Does this stream do output? */ + if( stream->userOutChan > 0 ) /* Does this stream do output? */ { - size_t maxHostFrames = MAX(stream->inputFramesPerBuffer, stream->outputFramesPerBuffer) + size_t maxHostFrames = MAX( stream->inputFramesPerBuffer, stream->outputFramesPerBuffer ); VDBUG( ("Waiting for write buffer to be drained.\n") ); paErr = waitUntilBlioWriteBufferIsEmpty( &stream->blio, stream->sampleRate, - maxHostFrames); + maxHostFrames ); VDBUG( ( "waitUntilBlioWriteBufferIsEmpty returned %d\n", paErr ) ); } return FinishStoppingStream( stream ); diff --git a/src/hostapi/coreaudio/pa_mac_core_blocking.c b/src/hostapi/coreaudio/pa_mac_core_blocking.c index 149d82c..679c6ba 100644 --- a/src/hostapi/coreaudio/pa_mac_core_blocking.c +++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c @@ -500,7 +500,7 @@ PaError WriteStream( PaStream* stream, unsigned long framesRequested ) { PaMacCoreStream *macStream = (PaMacCoreStream*)stream; - PaMacBlio *blio = & macStream -> blio; + PaMacBlio *blio = &macStream->blio; char *cbuf = (char *) buffer; PaError ret = paNoError; VVDBUG(("WriteStream()\n")); @@ -575,9 +575,10 @@ PaError WriteStream( PaStream* stream, ret = blio->statusFlags & paOutputUnderflow; /* report underflow only once: */ - if( ret ) { - OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags ); - ret = paOutputUnderflowed; + if( ret ) + { + OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags ); + ret = paOutputUnderflowed; } } diff --git a/test/patest_write_stop_hang_illegal.c b/test/patest_write_stop_hang_illegal.c index 71e17de..ed93425 100644 --- a/test/patest_write_stop_hang_illegal.c +++ b/test/patest_write_stop_hang_illegal.c @@ -43,6 +43,7 @@ */ #include +#include #include #include /* pthread may only be available on Mac and Linux. */ -- 2.43.0