Commit bc0997a5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

audiounit: stop audio-unit before deactivating the audio session (closes #15984)

parent 4d1e77a4
......@@ -288,8 +288,6 @@ static void Stop(audio_output_t *p_aout)
struct aout_sys_t *p_sys = p_aout->sys;
OSStatus status;
[[AVAudioSession sharedInstance] setActive:NO error:nil];
if (p_sys->au_unit) {
status = AudioOutputUnitStop(p_sys->au_unit);
if (status != noErr)
......@@ -305,6 +303,8 @@ static void Stop(audio_output_t *p_aout)
}
p_sys->i_bytes_per_sample = 0;
[[AVAudioSession sharedInstance] setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];
/* clean-up circular buffer */
TPCircularBufferCleanup(&p_sys->circular_buffer);
}
......
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