Struct portmidi::OutputPort [] [src]

pub struct OutputPort {
    // some fields omitted
}

Representation of an output midi port

Methods

impl OutputPort
[src]

fn new(output_device: PortMidiDeviceId, buffer_size: i32) -> OutputPort

Construct a new InputPort for input_device

fn open(&mut self) -> PortMidiResult<()>

Open the port returning an error if there is a problem

fn abort(&mut self) -> PortMidiResult<()>

Terminates outgoing messages immediately

The caller should immediately close the output port, this may result in transmission of a partial midi message. Note, not all platforms support abort.

fn close(&mut self) -> PortMidiResult<()>

Closes the midi stream, flushing any pending buffers

PortMidi attempts to close open streams when the application exits, but this can be difficult under Windows (according to the PortMidi documentation).

fn write_event(&mut self, midi_event: MidiEvent) -> PortMidiResult<()>

Write a single MidiEvent

fn write_message(&mut self, midi_message: MidiMessage) -> PortMidiResult<()>

Write a single MidiMessage immediately

fn has_host_error(&self) -> bool