summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Newton <nevion@gmail.com>2009-11-11 22:52:52 -0800
committerJason Newton <nevion@gmail.com>2009-11-20 06:34:46 -0800
commit493d8b2fb7915786578daeb9dba9c55b581fcce1 (patch)
tree2607d1fb896ba1a3aecbdd434018529e4f14a018
parent1178f61280227a399708ea8e5cff9b4204181612 (diff)
module-equalizer-sink: add latency of output_q and input_q to get latency calculation
-rw-r--r--src/modules/module-equalizer-sink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index bbbeb068..0a2860b0 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -253,10 +253,11 @@ static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t of
pa_sink_get_latency_within_thread(u->sink_input->sink) +
/* Add the latency internal to our sink input on top */
- pa_bytes_to_usec(pa_memblockq_get_length(u->sink_input->thread_info.render_memblockq), &u->sink_input->sink->sample_spec);
+ pa_bytes_to_usec(pa_memblockq_get_length(u->output_q), &u->sink_input->sink->sample_spec) +
+ pa_bytes_to_usec(pa_memblockq_get_length(u->sink_input->thread_info.render_memblockq), &u->sink_input->sink->sample_spec) +
+ pa_bytes_to_usec(pa_memblockq_get_length(u->input_q), &u->sink_input->sink->sample_spec);
// pa_bytes_to_usec(u->samples_gathered * fs, &u->sink->sample_spec);
//+ pa_bytes_to_usec(u->latency * fs, ss)
- //+ pa_bytes_to_usec(pa_memblockq_get_length(u->input_q), ss);
return 0;
}
}