[vlc-commits] coreaudio: move out latency log

Thomas Guillem git at videolan.org
Tue Jul 16 11:55:20 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jul 16 07:30:50 2019 +0200| [3f389be6ecde7a6d782603204f85266016d50f3c] | committer: Thomas Guillem

coreaudio: move out latency log

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

 modules/audio_output/audiounit_ios.m    | 7 +++++--
 modules/audio_output/auhal.c            | 2 ++
 modules/audio_output/coreaudio_common.c | 3 ---
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
index bea6af2091..13cb6b2000 100644
--- a/modules/audio_output/audiounit_ios.m
+++ b/modules/audio_output/audiounit_ios.m
@@ -517,8 +517,11 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
     if (err != noErr)
         ca_LogWarn("failed to set IO mode");
 
-    ret = au_Initialize(p_aout, p_sys->au_unit, fmt, layout,
-                        vlc_tick_from_sec([p_sys->avInstance outputLatency]), NULL);
+    const vlc_tick_t latency_us =
+        vlc_tick_from_sec([p_sys->avInstance outputLatency]);
+    msg_Dbg(p_aout, "Current device has a latency of %lld us", latency_us);
+
+    ret = au_Initialize(p_aout, p_sys->au_unit, fmt, layout, latency_us, NULL);
     if (ret != VLC_SUCCESS)
         goto error;
 
diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 79af25f9f8..58c1305711 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -1603,6 +1603,8 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
                 kAudioDevicePropertyLatency, kAudioObjectPropertyScopeOutput);
     vlc_tick_t i_latency_us = vlc_tick_from_samples(i_latency_samples, fmt->i_rate);
 
+    msg_Dbg(p_aout, "Current device has a latency of %lld us", i_latency_us);
+
     /* Check for Digital mode or Analog output mode */
     if (do_spdif)
     {
diff --git a/modules/audio_output/coreaudio_common.c b/modules/audio_output/coreaudio_common.c
index 5cb9883ad9..0814f2a17c 100644
--- a/modules/audio_output/coreaudio_common.c
+++ b/modules/audio_output/coreaudio_common.c
@@ -357,9 +357,6 @@ ca_Initialize(audio_output_t *p_aout, const audio_sample_format_t *fmt,
     p_sys->i_frame_length = fmt->i_frame_length;
     p_sys->chans_to_reorder = 0;
 
-    msg_Dbg(p_aout, "Current device has a latency of %lld us",
-            i_dev_latency_us);
-
     p_sys->i_dev_latency_us = i_dev_latency_us;
 
     /* setup circular buffer */



More information about the vlc-commits mailing list