summaryrefslogtreecommitdiff
path: root/src/modules/module-ladspa-sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-ladspa-sink.c')
-rw-r--r--src/modules/module-ladspa-sink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index 994c778fe..6b5ecf87f 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -103,6 +103,7 @@ static const char* const valid_modargs[] = {
/* Called from I/O thread context */
static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
struct userdata *u = PA_SINK(o)->userdata;
+ pa_usec_t latency, now1, now2;
switch (code) {
@@ -117,11 +118,10 @@ static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t of
return 0;
}
- *((pa_usec_t*) data) =
-
- /* Get the latency of the master sink */
- pa_sink_get_latency_within_thread(u->sink_input->sink) +
+ /* Get the latency of the master sink */
+ pa_sink_get_latency_within_thread(u->sink_input->sink, &latency, &now1, &now2);
+ *((pa_usec_t*) data) = latency +
/* 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);