Ticket #48 (closed defect: fixed)

Opened 19 months ago

Last modified 10 months ago

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;

}

Change History

Changed 19 months ago by bjornroche

  • status changed from new to assigned

The patch seems reasonable, but since there's more than one way to stop the stream, I'll have to review it a bit to make sure. I'll also have to make sure it conforms to the spec.

Changed 10 months ago by bjornroche

  • status changed from assigned to closed
  • resolution set to fixed

Changed 10 months ago by bjornroche

This was resolved by adding a callback from the mac OS so no matter how playback stops, the callback should be called.

Note: See TracTickets for help on using tickets.