Browse Source

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.
tags/pa_stable_v190600_20161030
Phil Burk 2 years ago
parent
commit
339e875f42

+ 3
- 3
src/hostapi/coreaudio/pa_mac_core.c View File

@@ -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 );

+ 5
- 4
src/hostapi/coreaudio/pa_mac_core_blocking.c View File

@@ -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;
}
}


+ 1
- 0
test/patest_write_stop_hang_illegal.c View File

@@ -43,6 +43,7 @@
*/

#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <memory.h>
/* pthread may only be available on Mac and Linux. */

Loading…
Cancel
Save