Skip to content
Snippets Groups Projects
Commit 1ae26b6c authored by Thomas Guillem's avatar Thomas Guillem
Browse files

audiounit_ios: fix resume from pause

Fixes #20885
parent d51941cf
No related branches found
No related tags found
No related merge requests found
...@@ -402,6 +402,14 @@ Pause (audio_output_t *p_aout, bool pause, vlc_tick_t date) ...@@ -402,6 +402,14 @@ Pause (audio_output_t *p_aout, bool pause, vlc_tick_t date)
} }
p_sys->b_stopped = pause; p_sys->b_stopped = pause;
ca_Pause(p_aout, pause, date); ca_Pause(p_aout, pause, date);
/* Since we stopped the AudioUnit, we can't really recover the delay from
* the last playback. So it's better to flush everything now to avoid
* synchronization glitches when resuming from pause. The main drawback is
* that we loose 1-2 sec of audio when resuming. The order is important
* here, ca_Flush need to be called when paused. */
if (pause)
ca_Flush(p_aout, false);
} }
static void static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment