Commit 777ce9ac authored by David Fuhrmann's avatar David Fuhrmann

auhal: remove audio devices callback not before module close

parent 94dca036
......@@ -210,7 +210,14 @@ static void Close(vlc_object_t *obj)
OSStatus err = noErr;
/* remove audio device callback */
/* remove audio devices callback */
AudioObjectPropertyAddress audioDevicesAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
err = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &audioDevicesAddress, HardwareListener, (void *)p_aout);
if (err != noErr)
msg_Err(p_aout, "AudioHardwareRemovePropertyListener failed: [%4.4s]", (char *)&err);
/* remove audio device alive callback */
AudioObjectPropertyAddress deviceAliveAddress = { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
err = AudioObjectRemovePropertyListener(p_sys->i_selected_dev, &deviceAliveAddress, HardwareListener, (void *)p_aout);
if (err != noErr)
......@@ -926,12 +933,6 @@ static void Stop(audio_output_t *p_aout)
}
}
AudioObjectPropertyAddress audioDevicesAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
err = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &audioDevicesAddress, HardwareListener, (void *)p_aout);
if (err != noErr)
msg_Err(p_aout, "AudioHardwareRemovePropertyListener failed: [%4.4s]", (char *)&err);
if (p_sys->i_hog_pid == getpid()) {
p_sys->i_hog_pid = -1;
i_param_size = sizeof(p_sys->i_hog_pid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment