mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: reschedule the timeout based on new quantum
Always reschedule the timeout based on the new quantum. If the quantum descreased we want to wait some more until the buffer only has the new quantum of samples left.
This commit is contained in:
parent
3bcc59120a
commit
a36af57899
1 changed files with 1 additions and 1 deletions
|
|
@ -1264,7 +1264,7 @@ static int handle_play(struct state *state, uint64_t nsec,
|
|||
{
|
||||
int res;
|
||||
|
||||
if (SPA_UNLIKELY(delay > target + state->last_threshold)) {
|
||||
if (SPA_UNLIKELY(delay > target + state->threshold)) {
|
||||
spa_log_trace(state->log, NAME" %p: early wakeup %ld %ld", state, delay, target);
|
||||
state->next_time = nsec + (delay - target) * SPA_NSEC_PER_SEC / state->rate;
|
||||
return -EAGAIN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue