mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
loopback: Do not detect underruns during initial latency adjustments
Currently module-loopback detects underruns even if sink_input_pop_cb() was not yet called twice and initial latency adjustments are active. This leads to unnecessary rewind requests. This patch delays detecting underruns until the initial adjustments are done. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
This commit is contained in:
parent
fa3b66d249
commit
e7abd862b1
1 changed files with 2 additions and 1 deletions
|
|
@ -941,7 +941,8 @@ static int sink_input_process_msg_cb(pa_msgobject *obj, int code, void *data, in
|
|||
* right-away */
|
||||
if (u->sink_input->sink->thread_info.state != PA_SINK_SUSPENDED &&
|
||||
u->sink_input->thread_info.underrun_for > 0 &&
|
||||
pa_memblockq_is_readable(u->memblockq)) {
|
||||
pa_memblockq_is_readable(u->memblockq) &&
|
||||
u->output_thread_info.pop_called) {
|
||||
|
||||
pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u->msg), LOOPBACK_MESSAGE_UNDERRUN, NULL, 0, NULL, NULL);
|
||||
/* If called from within the pop callback skip the rewind */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue