[][src]Trait midir::os::unix::VirtualInput

pub trait VirtualInput<T: Send> where
    Self: Sized
{ fn create_virtual<F>(
        self,
        port_name: &str,
        callback: F,
        data: T
    ) -> Result<MidiInputConnection<T>, ConnectError<Self>>
    where
        F: FnMut(u64, &[u8], &mut T) + Send + 'static
; }

Trait that is implemented by MidiInput on platforms that support virtual ports (currently every platform but Windows).

Required methods

fn create_virtual<F>(
    self,
    port_name: &str,
    callback: F,
    data: T
) -> Result<MidiInputConnection<T>, ConnectError<Self>> where
    F: FnMut(u64, &[u8], &mut T) + Send + 'static, 

Creates a virtual input port. Once it has been created, other applications can connect to this port and send MIDI messages which will be received by this port.

Loading content...

Implementors

impl<T: Send> VirtualInput<T> for MidiInput[src]

Loading content...