diff options
| author | Claude <[email protected]> | 2026-06-12 09:59:01 +0000 |
|---|---|---|
| committer | Claude <[email protected]> | 2026-06-12 09:59:01 +0000 |
| commit | c09278987ad49ce8d2a4cb345659a6d5ea10903d (patch) | |
| tree | 91f6a7434c020f5a39b8556309d4f51b840768d7 /src/class/midi | |
| parent | a749fe06e174a66d441e91ff1977c41e419cd09a (diff) | |
midi: document that midi2_ump_word_count() must never return 0claude/adoring-pasteur-kbaFa
The midi2_device/midi2_host tx packing loops advance by this count and
no longer carry an explicit == 0 guard (removed in a749fe0).
Diffstat (limited to 'src/class/midi')
| -rw-r--r-- | src/class/midi/midi.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/class/midi/midi.h b/src/class/midi/midi.h index 8121ec016..22e8e746f 100644 --- a/src/class/midi/midi.h +++ b/src/class/midi/midi.h @@ -189,7 +189,9 @@ TU_VERIFY_STATIC(sizeof(midi_desc_cs_endpoint_1jack_t) == 4+1, "size is not corr // MIDI 2.0 UMP Helpers //--------------------------------------------------------------------+ -// Return the number of 32-bit words for a UMP message given its Message Type +// Return the number of 32-bit words for a UMP message given its Message Type. +// Must never return 0: the tx packing loops in midi2_device/midi2_host advance +// by this count and would spin forever on a zero (they have no == 0 guard). static inline uint8_t midi2_ump_word_count(uint8_t mt) { switch (mt) { case 0x0: case 0x1: case 0x2: case 0x6: case 0x7: |
