mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Previously, stable_sort was used to reorder note-ons and note-offs, with the intention that note-offs would always be ordered before note-ons with the same time stamp. However, stable_sort requires the comparator to be a strict-weak ordering, which was not the case for the previous implementation. Additionally, the old implementation could unnecessarily reorder events. Note ons and offs only need to be reordered if the note numbers and channels match. It's fine for a note-on to be ordered before a note-off if the note itself is different. The new implementation only uses stable_sort to order events by time-stamp. Then, for each range of events with matching timestamps, the first note-on event will be swapped with the last following note-off event with matching channel/number. |
||
|---|---|---|
| .. | ||
| audio_play_head | ||
| buffers | ||
| midi | ||
| mpe | ||
| native | ||
| sources | ||
| synthesisers | ||
| utilities | ||
| juce_audio_basics.cpp | ||
| juce_audio_basics.h | ||
| juce_audio_basics.mm | ||