mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
module-pipe: resync when ringbuffer too full
When the ringbuffer has too much data, do a resync or else we would just have a huge delay and would try to resample to get back to the target fill level.
This commit is contained in:
parent
0bc7f3f48c
commit
d7e48f3042
1 changed files with 4 additions and 0 deletions
|
|
@ -416,6 +416,10 @@ static void capture_stream_process(void *data)
|
|||
}
|
||||
impl->have_sync = false;
|
||||
}
|
||||
if (avail > (int32_t)(impl->target_buffer * 3)) {
|
||||
pw_log_warn("resync %d > %u", avail, (int32_t)(impl->target_buffer * 3));
|
||||
impl->have_sync = false;
|
||||
}
|
||||
if (avail > (int32_t)RINGBUFFER_SIZE) {
|
||||
index += avail - impl->target_buffer;
|
||||
avail = impl->target_buffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue