Struct vst2::buffer::AudioBuffer [] [src]

pub struct AudioBuffer<'a, T: 'a + Float> { /* fields omitted */ }

A buffer containing ChannelBuffer buffers for each input/output.

Methods

impl<'a, T: 'a + Float> AudioBuffer<'a, T>
[src]

Create an AudioBuffer from vectors of slices.

Each vector item represents either an input or output, and contains an array of samples. Eg if inputs was a vector of size 2 containing slices of size 512, it would hold 2 inputs where each input holds 512 samples.

Create an AudioBuffer from raw pointers. Only really useful for interacting with the VST API.

Return a reference to all inputs.

Return a reference to all outputs.

Consume this buffer and split it into separate inputs and outputs.

Example

let (mut inputs, mut outputs) = buffer.split();
let input: &mut [f32] = &mut inputs[0]; // First input

Zip together buffers.