mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
core: call pa_sink_get_latency_within_thread() instead of going directly via process_msg()
This commit is contained in:
parent
350a2bc846
commit
3f9c67a7fb
1 changed files with 2 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue