Skip to content

Commit

Permalink
Merge pull request #417 from mikedickey/bugfix/remove-input-disconnec…
Browse files Browse the repository at this point in the history
…t-listener

Remove CoreAudio device disconnect listener when closing input mode streams
  • Loading branch information
garyscavone committed Jan 11, 2024
2 parents 36b03e2 + b0e3374 commit f2135b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RtAudio.cpp
Expand Up @@ -1981,7 +1981,7 @@ void RtApiCore :: closeStream( void )
}
}

if ( handle->disconnectListenerAdded[0] ) {
if ( handle->disconnectListenerAdded[1] ) {
property.mSelector = kAudioDevicePropertyDeviceIsAlive;
if (AudioObjectRemovePropertyListener( handle->id[1], &property, streamDisconnectListener, (void *) &stream_.callbackInfo ) != noErr) {
errorText_ = "RtApiCore::closeStream(): error removing disconnect property listener!";
Expand Down

0 comments on commit f2135b7

Please sign in to comment.