Skip to main content

evaluate_audio

Function evaluate_audio 

Source
pub fn evaluate_audio<'a>(
    project: &Project,
    index: &'a ActiveIndex,
    range: TimeRange,
) -> Result<AudioSpanDesc<'a>, EvalError>
Expand description

Evaluates every audible clip overlapping a half-open timeline span.

Clips on audio tracks always qualify. A clip on a visual track qualifies when its source declares an audio stream, so one clip carries both picture and sound. Overlapping clips are all reported; the mixer sums them.

The span is the mixer’s block, so clips are reported with their whole authored ranges plus the part of the span they cover. Gain, pan, and fade curves stay authored rather than sampled here; a mixer evaluates them per sample so that automation is independent of the host block size.

The span borrows identities and properties from index. It allocates its working list and its clip list, each sized exactly; a caller evaluating span after span uses evaluate_audio_in to allocate nothing.

§Errors

Returns EvalError::IndexProjectMismatch when the index was built for another project, and EvalError::UnmappableClip for unrepresentable retiming.