process_audio

Function process_audio 

Source
pub unsafe fn process_audio<D: PluginDsp>(
    handle: *mut BbxGraph,
    inputs: *const *const f32,
    outputs: *mut *mut f32,
    num_channels: u32,
    num_samples: u32,
    params: *const f32,
    num_params: u32,
    midi_events: *const MidiEvent,
    num_midi_events: u32,
)
Expand description

Process a block of audio through the effects chain.

This function is called by the macro-generated bbx_graph_process FFI function. It uses zero-copy buffer handling for optimal performance.

ยงSafety

  • handle must be a valid pointer from bbx_graph_create.
  • inputs must be a valid pointer to an array of num_channels pointers, or null.
  • outputs must be a valid pointer to an array of num_channels pointers.
  • Each input/output channel pointer must be valid for num_samples floats.
  • params must be valid for num_params floats, or null.
  • midi_events must be valid for num_midi_events MidiEvent structs, or null.