[pulseaudio-commits] r2454 - /trunk/src/pulsecore/protocol-native.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat May 17 02:11:22 PDT 2008


Author: lennart
Date: Sat May 17 11:11:21 2008
New Revision: 2454

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2454&root=pulseaudio&view=rev
Log:
dump latency metrics for recording streams, too

Modified:
    trunk/src/pulsecore/protocol-native.c

Modified: trunk/src/pulsecore/protocol-native.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/protocol-native.c?rev=2454&root=pulseaudio&r1=2453&r2=2454&view=diff
==============================================================================
--- trunk/src/pulsecore/protocol-native.c (original)
+++ trunk/src/pulsecore/protocol-native.c Sat May 17 11:11:21 2008
@@ -485,7 +485,7 @@
         pa_usec_t fragsize_usec;
 
         /* So, the user asked us to adjust the latency according to
-         * the what the source can provide. Half the latency will be
+         * what the source can provide. Half the latency will be
          * spent on the hw buffer, half of it in the async buffer
          * queue we maintain for each client. */
 
@@ -596,6 +596,11 @@
     *map = s->source_output->channel_map;
 
     pa_idxset_put(c->record_streams, s, &s->index);
+
+    pa_log_info("Final latency %0.2f ms = %0.2f ms + %0.2f ms",
+                ((double) pa_bytes_to_usec(s->fragment_size, &source_output->sample_spec) + (double) s->source_latency) / PA_USEC_PER_MSEC,
+                (double) pa_bytes_to_usec(s->fragment_size, &source_output->sample_spec) / PA_USEC_PER_MSEC,
+                (double) s->source_latency / PA_USEC_PER_MSEC);
 
     pa_source_output_put(s->source_output);
     return s;




More information about the pulseaudio-commits mailing list