mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-16 06:29:56 +00:00
alsa: warn when the htimestamp seems wrong
The htimestamp should be close to the current_time, if it is further away that the threshold, something is wrong.
This commit is contained in:
parent
98f138dbe0
commit
3dab0091bb
|
@ -2014,7 +2014,12 @@ 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);
|
||||
|
||||
*delay += diff;
|
||||
if (SPA_ABS(diff) < state->threshold) {
|
||||
*delay += diff;
|
||||
} else if ((missed = ratelimit_test(&state->rate_limit, current_time)) >= 0) {
|
||||
spa_log_warn(state->log, "%s: (%d missed) impossible htimestamp diff:%"PRIi64,
|
||||
state->props.device, missed, diff);
|
||||
}
|
||||
}
|
||||
return SPA_MIN(avail, state->buffer_frames);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue