[vlc-commits] audiounit_ios: remove ca_Flush hack

Thomas Guillem git at videolan.org
Tue Dec 12 15:16:28 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Dec 12 13:01:35 2017 +0100| [c7e8e84b6475081aa07a79ae5bcaa0806a3f7031] | committer: Thomas Guillem

audiounit_ios: remove ca_Flush hack

Since ca_Flush() can now works when paused.

NB: Normally, ca_Flush() can't be called when paused by VLC but this module do
a pause in order to mute, and the paused state can now be set from the
interrupt notification.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7e8e84b6475081aa07a79ae5bcaa0806a3f7031
---

 modules/audio_output/audiounit_ios.m | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
index c87f3572b9..7421ecf6c6 100644
--- a/modules/audio_output/audiounit_ios.m
+++ b/modules/audio_output/audiounit_ios.m
@@ -350,15 +350,7 @@ Flush(audio_output_t *p_aout, bool wait)
 {
     struct aout_sys_t * p_sys = p_aout->sys;
 
-    if (!p_sys->b_paused)
-        ca_Flush(p_aout, wait);
-    else
-    {
-        /* ca_Flush() can't work while paused since the AudioUnit is Stopped
-         * and the render callback won't be called. But it's safe to clear the
-         * circular buffer from this thread since AU is stopped. */
-        TPCircularBufferClear(&p_sys->c.circular_buffer);
-    }
+    ca_Flush(p_aout, wait);
 }
 
 static int



More information about the vlc-commits mailing list