Struct vst::buffer::SendEventBuffer

source ·
pub struct SendEventBuffer { /* private fields */ }
Expand description

This buffer is used for sending midi events through the VST interface. The purpose of this is to convert outgoing midi events from event::Event to api::Events. It only allocates memory in new() and reuses the memory between calls.

Implementations§

Creates a buffer for sending up to the given number of midi events per frame

Sends events to the host. See the fwd_midi example.

Example
fn process(&mut self, buffer: &mut AudioBuffer<f32>){
    let events: Vec<MidiEvent> = vec![
        // ...
    ];
    self.send_buffer.send_events(&events, &mut self.host);
}

Stores events in the buffer, replacing the buffer’s current content. Use this in process_events to store received input events, then read them in process using events.

Returns a reference to the stored events

Clears the buffer

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.