Expand description
Host-side MIDI device enumeration and I/O for Oxide guest modules.
Guests call the api_midi_* imports to enumerate MIDI input/output ports,
open connections, send raw MIDI bytes, and poll for incoming messages.
macOS: implemented via CoreMIDI (coremidi crate). Input callbacks run
on a CoreMIDI background thread, split each incoming packet into individual
MIDI messages, and push them onto a per-handle bounded [VecDeque]. The
guest drains the queue by calling api_midi_recv each frame — no blocking,
no async runtime needed. Each api_midi_recv returns exactly one MIDI
message; if the queue fills up, the oldest message is dropped.
Other platforms: all functions return 0 / error codes gracefully (no devices found). MIDI support for Linux and Windows will be added in a later phase.
Structs§
- Midi
State - Placeholder — MIDI is not yet supported on this platform.
Functions§
- register_
midi_ functions - Register all
api_midi_*host functions on the given linker.