alsa-plugin: don't clamp elapsed time to stream delay

There is no reason to limit the elapsed time to the stream delay, it is
possible that it is larger and then it will be clamped later.
This commit is contained in:
Wim Taymans 2021-11-24 12:17:28 +01:00
parent 6f0c5b6428
commit 33f087d4db

View file

@ -222,8 +222,6 @@ static int snd_pcm_pipewire_delay(snd_pcm_ioplug_t *io, snd_pcm_sframes_t *delay
clock_gettime(CLOCK_MONOTONIC, &ts);
diff = SPA_TIMESPEC_TO_NSEC(&ts) - pw->time.now;
elapsed = (pw->time.rate.denom * diff) / (pw->time.rate.num * SPA_NSEC_PER_SEC);
if (elapsed > pw->time.delay)
elapsed = pw->time.delay;
}
filled = pw->time.delay + snd_pcm_ioplug_hw_avail(io, pw->hw_ptr, io->appl_ptr);