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

audiounit_ios: fix audio unit handling in pause state (close #10480)

parent 945d6f4c
......@@ -88,6 +88,7 @@ static void Flush (audio_output_t *, bool);
static int TimeGet (audio_output_t *, mtime_t *);
static OSStatus RenderCallback (vlc_object_t *, AudioUnitRenderActionFlags *, const AudioTimeStamp *,
UInt32 , UInt32, AudioBufferList *);
vlc_module_begin ()
set_description(N_("AudioUnit output for iOS"))
......@@ -328,10 +329,21 @@ static void Pause (audio_output_t *p_aout, bool pause, mtime_t date)
p_sys->b_paused = pause;
if (pause)
/* we need to start / stop the audio unit here because otherwise
* the OS won't believe us that we stopped the audio output
* so in case of an interruption, our unit would be permanently
* silenced.
* in case of multi-tasking, the multi-tasking view would still
* show a playing state despite we are paused, same for lock screen */
if (pause) {
} else {
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory);
static void Flush(audio_output_t *p_aout, bool wait)
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