alsa-plugin: do correct boundary check

The hw_ptr must be wrapped at the boundary value, not after.

See #1941
This commit is contained in:
Wim Taymans 2021-12-22 20:03:13 +01:00
parent f5908dbddf
commit c1a0a602a5

View file

@ -318,7 +318,7 @@ snd_pcm_pipewire_process(snd_pcm_pipewire_t *pw, struct pw_buffer *b,
io->format);
hw_ptr += xfer;
if (hw_ptr > pw->boundary)
if (hw_ptr >= pw->boundary)
hw_ptr -= pw->boundary;
pw->hw_ptr = hw_ptr;
*hw_avail -= xfer;