Skip to main content

render_offline

Function render_offline 

Source
pub fn render_offline(
    graph: &mut AudioGraph,
    sample_rate: u32,
    inputs: &[Vec<f32>],
    block_sizes: &[usize],
    sink: &mut dyn AudioBlockSink,
    cancel: &CancelToken,
) -> Result<(), OfflineAudioError>
Expand description

Runs the same graph used by realtime hosts and writes exact project-rate blocks.

inputs are the graph’s buses flattened, each bus’s planes in the graph’s layout; all channels must have the same length. Irregular block_sizes repeat until the source is exhausted.

§Errors

Returns OfflineAudioError::InvalidInput when inputs are not exactly the graph’s buses or the schedule is malformed, and OfflineAudioError::Sink when the destination rejects output.