Expand description
§BBX Plugin
Plugin integration crate for the bbx_audio DSP library with C FFI bindings.
This crate re-exports the bbx_dsp crate and provides a macro-based API for
generating C-compatible FFI functions from any PluginDsp implementation.
Consumers only need to add bbx_plugin as a dependency to access both DSP
functionality and FFI generation.
§Example
ⓘ
use bbx_plugin::{PluginDsp, DspContext, bbx_plugin_ffi};
pub struct PluginGraph { /* DSP blocks */ }
impl PluginDsp for PluginGraph {
fn new() -> Self { /* ... */ }
fn prepare(&mut self, context: &DspContext) { /* ... */ }
fn reset(&mut self) { /* ... */ }
fn apply_parameters(&mut self, params: &[f32]) { /* ... */ }
fn process(&mut self, inputs: &[&[f32]], outputs: &mut [&mut [f32]], midi_events: &[MidiEvent], context: &DspContext) { /* ... */ }
}
impl Default for PluginGraph {
fn default() -> Self { Self::new() }
}
// Generate all FFI exports
bbx_plugin_ffi!(PluginGraph);Re-exports§
pub use params::JsonParamDef;pub use params::ParamDef;pub use params::ParamType;pub use params::ParamsFile;pub use params::generate_c_header_from_defs;pub use params::generate_rust_indices_from_defs;
Modules§
Macros§
- bbx_
plugin_ ffi - Generate C FFI exports for a
PluginDspimplementation.
Structs§
- BbxGraph
- Opaque handle representing a DSP effects chain.
- DspContext
- Runtime context passed to blocks during audio processing.
- Graph
Inner - Internal wrapper holding the plugin DSP and context.
Enums§
- BbxError
- Error codes for bbx_audio operations.
Traits§
- Plugin
Dsp - Trait for plugin-specific DSP implementations.
Functions§
- graph_
from_ ⚠handle - Convert a raw pointer to a GraphInner reference.
- handle_
from_ graph - Convert a GraphInner to an opaque handle.
- process_
audio ⚠ - Process a block of audio through the effects chain.