[pulseaudio-commits] r2298 - /branches/glitch-free/src/pulsecore/protocol-native.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Apr 21 19:48:25 PDT 2008


Author: lennart
Date: Tue Apr 22 04:48:24 2008
New Revision: 2298

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2298&root=pulseaudio&view=rev
Log:
show configure latency metrics

Modified:
    branches/glitch-free/src/pulsecore/protocol-native.c

Modified: branches/glitch-free/src/pulsecore/protocol-native.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/protocol-native.c?rev=2298&root=pulseaudio&r1=2297&r2=2298&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/protocol-native.c (original)
+++ branches/glitch-free/src/pulsecore/protocol-native.c Tue Apr 22 04:48:24 2008
@@ -785,6 +785,10 @@
     tlength_usec = pa_bytes_to_usec(*tlength, &sink_input->sample_spec);
     minreq_usec = pa_bytes_to_usec(*minreq, &sink_input->sample_spec);
 
+    pa_log_info("Requested tlength=%0.2f ms, minreq=%0.2f ms",
+                (double) tlength_usec / PA_USEC_PER_MSEC,
+                (double) minreq_usec / PA_USEC_PER_MSEC);
+
     if (adjust_latency) {
 
         /* So, the user asked us to adjust the latency of the stream
@@ -878,6 +882,12 @@
 
     pa_idxset_put(c->output_streams, s, &s->index);
 
+    pa_log_info("Final latency %0.2f ms = %0.2f ms + 2*%0.2f ms + %0.2f ms",
+                ((double) pa_bytes_to_usec(*tlength, &sink_input->sample_spec) + (double) s->sink_latency) / PA_USEC_PER_MSEC,
+                (double) pa_bytes_to_usec(*tlength-*minreq*2, &sink_input->sample_spec) / PA_USEC_PER_MSEC,
+                (double) pa_bytes_to_usec(*minreq, &sink_input->sample_spec) / PA_USEC_PER_MSEC,
+                (double) s->sink_latency / PA_USEC_PER_MSEC);
+
     pa_sink_input_put(s->sink_input);
     return s;
 }
@@ -1047,8 +1057,6 @@
 
             if (u >= s->underrun)
                 u = s->underrun;
-
-            pa_log("yeah! ready to rock");
 
             /* We just ended an underrun, let's ask the sink
              * to rewrite */




More information about the pulseaudio-commits mailing list