mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
alsa-seq: fix off-by-one for event offset
The event offsets need to go from 0 to quantum-1 to be valid to the current midi event buffer. Fixes #1395
This commit is contained in:
parent
831fb9ea01
commit
0b758a2301
1 changed files with 1 additions and 1 deletions
|
|
@ -553,7 +553,7 @@ static int process_read(struct seq_state *state)
|
||||||
/* convert the age to samples and convert to an offset */
|
/* convert the age to samples and convert to an offset */
|
||||||
offset = (diff * state->rate.denom) / (state->rate.num * SPA_NSEC_PER_SEC);
|
offset = (diff * state->rate.denom) / (state->rate.num * SPA_NSEC_PER_SEC);
|
||||||
if (state->duration > offset)
|
if (state->duration > offset)
|
||||||
offset = state->duration - offset;
|
offset = state->duration - 1 - offset;
|
||||||
else
|
else
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue