summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-15 00:52:50 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-15 00:52:50 +0200
commit3f9c67a7fb959acd35228f1e7455baf2aacc793b (patch)
tree5d709abc183295cdd51fc5688103e4f45a3a8406 /src/pulsecore/sink.c
parent350a2bc846559bb274ba70f928bb42a9472050bf (diff)
core: call pa_sink_get_latency_within_thread() instead of going directly via process_msg()
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r--src/pulsecore/sink.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index fd95f75d..e8268892 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1770,10 +1770,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
size_t sink_nbytes, total_nbytes;
/* Get the latency of the sink */
- if (!(s->flags & PA_SINK_LATENCY) ||
- PA_MSGOBJECT(s)->process_msg(PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
- usec = 0;
-
+ usec = pa_sink_get_latency_within_thread(s);
sink_nbytes = pa_usec_to_bytes(usec, &s->sample_spec);
total_nbytes = sink_nbytes + pa_memblockq_get_length(i->thread_info.render_memblockq);
@@ -1832,10 +1829,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
size_t nbytes;
/* Get the latency of the sink */
- if (!(s->flags & PA_SINK_LATENCY) ||
- PA_MSGOBJECT(s)->process_msg(PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
- usec = 0;
-
+ usec = pa_sink_get_latency_within_thread(s);
nbytes = pa_usec_to_bytes(usec, &s->sample_spec);
if (nbytes > 0)