RUNE-2002: Media Clip Audio Export Source Proposed
Summary
MediaClipAudioExportSource no longer exists. Clip scheduling and preparation now build one IAudioBuffer graph, wrap it as IAudioTrack, and let IMediaEncoder pull timestamped AudioSample chunks.
Design
For each export, orchestration:
- Clones each source clip into a standalone
IAudioBuffer. - Resamples it with
ResampledAudioBufferwhen the clip format does not match the export graph. - Applies per-source shaping such as gain with
EffectAudioBuffer. - Uses
SlicedAudioBufferto trim clip duration and align each clip on the export timeline. - Returns either a single prepared buffer or a
MixedAudioBufferthat sums and clamps float32 PCM sources. - Wraps the final graph in
AudioBufferTrack, where chunk size is derived fromceil(sampleRate / fps)and each emittedAudioSampleduration is based on the actual frames read.
Boundary
There is no clip-specific provider/source contract in Rune.Media. The media layer stays focused on buffer/effect processing, sample mixing, track transport, encode, and decode; clip scheduling happens before the sink sees any IAudioTrack.