//! Cross-thread MIDI queue.
//!
//! One static `Mutex<Vec<RackEvent>>` shared by every MIDI producer
//! (QWERTY keyboard inside the windowed handler, midir input ports,
//! anything else added later) and drained by the audio callback once
//! per block. The standalone runs exactly one plugin / one audio
//! stream at a time, so a single global is the simplest correct
//! shape.
use Mutex;
use ;
static QUEUE: = new;
/// Push one event body onto the queue at sample offset 0 (delivered
/// at the start of the next audio block).
/// Drain everything pending into `events`. Called by the audio
/// callback at the top of each block.