summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-22 02:48:24 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-22 02:48:24 +0000
commit6b4b95beedf08089ec0dc48dd152210e3bc75046 (patch)
tree656ca998332200e532ac351017ce8504ca584419
parent1adbe822b8e21542e0193e91376e73bbf7002fbe (diff)
show configure latency metrics
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2298 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/protocol-native.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 7e86f117..cde113df 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -785,6 +785,10 @@ static playback_stream* playback_stream_new(
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 @@ static playback_stream* playback_stream_new(
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;
}
@@ -1048,8 +1058,6 @@ static void handle_seek(playback_stream *s, int64_t indexw) {
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 */
s->sink_input->thread_info.ignore_rewind = TRUE;