pub struct UsbTransport { /* private fields */ }Expand description
Bidirectional FM-1 MIDI connection using the system MIDI driver.
Only WaveGraph remote replies enter the bounded receive queue. Other musical MIDI and USB log traffic remain independent. Callback overflow fails a query explicitly instead of silently accepting an incomplete snapshot.
Implementations§
Source§impl UsbTransport
impl UsbTransport
Sourcepub fn connect(port: Option<&str>, timeout: Duration) -> Result<Self>
pub fn connect(port: Option<&str>, timeout: Duration) -> Result<Self>
Open a named MIDI pair, or use fm1-usb automatic device/log discovery.
A name bypasses the log probe and can select firmware without logging.
Discovery is performed on the control thread, never the audio callback.
timeout bounds each log-discovery request, not the entire connection
attempt: automatic discovery can probe multiple ports and make multiple
requests per port. A named port skips those requests.
§Errors
Returns an error for a missing/ambiguous device or unavailable MIDI ports.