Ticket #48 (closed defect: fixed)
streamFinishedCallback not invoked on the mac
| Reported by: | bjornroche | Owned by: | bjornroche |
|---|---|---|---|
| Priority: | major | Milestone: | V19-PREVIEW1 |
| Component: | host-api-coreaudio | Version: | |
| Keywords: | streamFinishedCallback | Cc: |
Description
Hello,
I'm trying to get a portaudio application that runs on Windows to run on the Mac, and it seems like the registered streamFinishedCallback function does not get invoked when the stream is finished. I grep'd through the source base (v19_061121) and I don't see any references to the streamFinsihedCallback in the src/hostapi/coreaudio directory or any other mac place.
I'm pretty mac-ignorant, but the following patch seems to make it work. Hopefully somebody with more mac knowledge then me can review it and make sure this it's doing the right thing.
Thanks.
Scott
Index: pa_mac_core.c =================================================================== --- pa_mac_core.c (revision 17223) +++ pa_mac_core.c (working copy) @@ -1851,6 +1851,8 @@
AudioOutputUnitStop?(stream->outputUnit);
if( stream->inputUnit )
AudioOutputUnitStop?(stream->inputUnit);
+ if( stream->streamRepresentation.streamFinishedCallback ) + stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
break;
}
