mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
midifile: fix CLAMP range of minor/mayor keys
This commit is contained in:
parent
6a689b3c7f
commit
08ffc507c0
1 changed files with 2 additions and 2 deletions
|
|
@ -676,8 +676,8 @@ int midi_file_dump_event(FILE *out, const struct midi_event *ev)
|
||||||
fprintf(out, "Key Signature: %d %s: %s", abs(sf),
|
fprintf(out, "Key Signature: %d %s: %s", abs(sf),
|
||||||
sf > 0 ? "sharps" : "flats",
|
sf > 0 ? "sharps" : "flats",
|
||||||
ev->data[4] == 0 ?
|
ev->data[4] == 0 ?
|
||||||
major_keys[SPA_CLAMP(sf + 9, 0, 19)] :
|
major_keys[SPA_CLAMP(sf + 9, 0, 18)] :
|
||||||
minor_keys[SPA_CLAMP(sf + 9, 0, 19)]);
|
minor_keys[SPA_CLAMP(sf + 9, 0, 18)]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x7f:
|
case 0x7f:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue