mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
midi: fix midi event sorting
The high bit is always 1 so we can use only the lower 3 bits for the priority.
This commit is contained in:
parent
144df8675f
commit
50dad68eb4
2 changed files with 2 additions and 2 deletions
|
|
@ -1027,7 +1027,7 @@ static inline int event_sort(struct spa_pod_control *a, struct spa_pod_control *
|
|||
db = SPA_POD_BODY(&b->value);
|
||||
if ((da[0] & 0xf) != (db[0] & 0xf))
|
||||
return 0;
|
||||
return priotab[db[0] >> 5] - priotab[da[0] >> 5];
|
||||
return priotab[(db[0]>>4) & 7] - priotab[(da[0]>>4) & 7];
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ static inline int event_sort(struct spa_pod_control *a, struct spa_pod_control *
|
|||
db = SPA_POD_BODY(&b->value);
|
||||
if ((da[0] & 0xf) != (db[0] & 0xf))
|
||||
return 0;
|
||||
return priotab[db[0] >> 5] - priotab[da[0] >> 5];
|
||||
return priotab[(db[0]>>4) & 7] - priotab[(da[0]>>4) & 7];
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue