mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: relax htimestamp threshold a little
Only assume an error when larger than 3 times the expected size. Clamp to the threshold to not cause excessive delay compensation.
This commit is contained in:
parent
895e516a75
commit
937a13d93f
1 changed files with 2 additions and 2 deletions
|
|
@ -2015,8 +2015,8 @@ static int get_avail(struct state *state, uint64_t current_time, snd_pcm_uframes
|
|||
|
||||
spa_log_trace_fp(state->log, "%"PRIu64" %"PRIu64" %"PRIi64, current_time, then, diff);
|
||||
|
||||
if (SPA_ABS(diff) < state->threshold) {
|
||||
*delay += diff;
|
||||
if (SPA_ABS(diff) < state->threshold * 3) {
|
||||
*delay += SPA_CLAMP(diff, -state->threshold, state->threshold);
|
||||
state->htimestamp_error = 0;
|
||||
} else {
|
||||
if (++state->htimestamp_error > MAX_HTIMESTAMP_ERROR) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue