Skip to main content

audio_graph

Macro audio_graph 

Source
macro_rules! audio_graph {
    ($frames:expr, $nodes:expr, $channels:expr, $sample_bytes:expr) => { ... };
}
Expand description

Create a crate::audio::Graph that works in both heap and zero-heap modes.

Mirrors the C ove_audio_graph_create(pg, frames, nodes, channels, sample_bytes) macro: in zero-heap mode emits a per-call-site static backing array sized by nodes * frames * channels * sample_bytes bytes and attaches it to the graph automatically; in heap mode just calls crate::audio::Graph::new. Yields a crate::Result wrapping a crate::audio::Graph.

All arguments must be constant expressions.

§Example

// 2 non-sink nodes (source + processor), 512 frames, mono, S16 (2 bytes).
let mut graph = ove::audio_graph!(512, 2, 1, 2)?;