Skip to content

RUNE-2002: Media Clip Audio Export Source Proposed

Updated2026-08-23

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:

  1. Clones each source clip into a standalone IAudioBuffer.
  2. Resamples it with ResampledAudioBuffer when the clip format does not match the export graph.
  3. Applies per-source shaping such as gain with EffectAudioBuffer.
  4. Uses SlicedAudioBuffer to trim clip duration and align each clip on the export timeline.
  5. Returns either a single prepared buffer or a MixedAudioBuffer that sums and clamps float32 PCM sources.
  6. Wraps the final graph in AudioBufferTrack, where chunk size is derived from ceil(sampleRate / fps) and each emitted AudioSample duration 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.

Rune Project brings Rune Story authoring together with the Rune Engine rendering foundation.