[vlc-commits] audiotrack: rework delay logs

Thomas Guillem git at videolan.org
Tue Dec 1 12:16:10 CET 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Nov 23 15:21:30 2020 +0100| [77ddd210babf872c0285ab1f1f54169479fff529] | committer: Thomas Guillem

audiotrack: rework delay logs

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

 modules/audio_output/audiotrack.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 7e49388e35..8237af217f 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -787,20 +787,11 @@ TimeGet( audio_output_t *p_aout, vlc_tick_t *restrict p_delay )
 /* Debug log for both delays */
 #if 0
 {
-    vlc_tick_t i_written_us = FRAMES_TO_US( p_sys->i_samples_written );
     vlc_tick_t i_ts_us = AudioTrack_GetTimestampPositionUs( env, p_aout );
-    vlc_tick_t i_smooth_us = 0;
-
-    if( i_ts_us > 0 )
-        i_smooth_us = AudioTrack_GetSmoothPositionUs(env, p_aout );
-    else if ( p_sys->smoothpos.i_us != 0 )
-        i_smooth_us = p_sys->smoothpos.i_us + vlc_tick_now()
-            - p_sys->smoothpos.i_latency_us;
-
-    msg_Err( p_aout, "TimeGet: TimeStamp: %lld, Smooth: %lld (latency: %lld)",
-                    i_ts_us ? i_written_us - i_ts_us : 0,
-                    i_smooth_us ? i_written_us - i_smooth_us : 0,
-                    p_sys->smoothpos.i_latency_us );
+    vlc_tick_t i_smooth_us = AudioTrack_GetSmoothPositionUs(env, p_aout );
+
+    msg_Err( p_aout, "TimeGet: TimeStamp: %"PRId64", Smooth: %"PRId64" (latency: %"PRId64")",
+             i_ts_us, i_smooth_us, p_sys->smoothpos.i_latency_us );
 }
 #endif
 



More information about the vlc-commits mailing list