mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
make sure to call process_rewind() under all circumstances before we do the next loop iteration
This commit is contained in:
parent
1e36b57b13
commit
eab1cb8df9
10 changed files with 69 additions and 39 deletions
|
|
@ -882,7 +882,7 @@ static void sink_update_requested_latency_cb(pa_sink *s) {
|
|||
|
||||
if (u->hwbuf_unused_frames > before) {
|
||||
pa_log_debug("Requesting rewind due to latency change.");
|
||||
pa_sink_request_rewind(s, 0);
|
||||
pa_sink_request_rewind(s, (size_t) -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -967,9 +967,12 @@ static void thread_func(void *userdata) {
|
|||
int work_done;
|
||||
pa_usec_t sleep_usec;
|
||||
|
||||
if (u->sink->thread_info.rewind_nbytes > 0)
|
||||
if (process_rewind(u) < 0)
|
||||
goto fail;
|
||||
if (u->sink->thread_info.rewind_requested) {
|
||||
if (u->sink->thread_info.rewind_nbytes <= 0)
|
||||
pa_sink_process_rewind(u->sink, 0);
|
||||
else if (process_rewind(u) < 0)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (u->use_mmap)
|
||||
work_done = mmap_write(u, &sleep_usec);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue