diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-05-17 09:11:21 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-05-17 09:11:21 +0000 |
commit | 971342de0bc39df78ebd092a0289df01b4be7935 (patch) | |
tree | 8ed228e9582c062918b3d2eb5c2db7e5c74e9718 /src/pulsecore | |
parent | 6285a469352ef850ef1dce3d868d5fdd46d8a78f (diff) |
dump latency metrics for recording streams, too
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2454 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/protocol-native.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 2adcdfc7..2c23b4f6 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -485,7 +485,7 @@ static void fix_record_buffer_attr_pre(record_stream *s, pa_bool_t adjust_latenc 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. */ @@ -597,6 +597,11 @@ static record_stream* record_stream_new( 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; } |