mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 11:30:05 +01:00
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:
parent
f5908dbddf
commit
c1a0a602a5
1 changed files with 1 additions and 1 deletions
|
|
@ -318,7 +318,7 @@ snd_pcm_pipewire_process(snd_pcm_pipewire_t *pw, struct pw_buffer *b,
|
||||||
io->format);
|
io->format);
|
||||||
|
|
||||||
hw_ptr += xfer;
|
hw_ptr += xfer;
|
||||||
if (hw_ptr > pw->boundary)
|
if (hw_ptr >= pw->boundary)
|
||||||
hw_ptr -= pw->boundary;
|
hw_ptr -= pw->boundary;
|
||||||
pw->hw_ptr = hw_ptr;
|
pw->hw_ptr = hw_ptr;
|
||||||
*hw_avail -= xfer;
|
*hw_avail -= xfer;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue