23class ProgramCompilerTask;
24class AudioClipConversionArtifact;
54 std::shared_ptr<const audio::AudioFileData>
audio;
65class DecodedAudioAssetPool {
75 std::span<const DecodedAudioAsset>
assets() const noexcept {
81 : assets_(std::move(
assets)) {}
82 std::vector<DecodedAudioAsset> assets_;
127 std::shared_ptr<const audio::AudioFileData>
audio;
169class AudioTrackRendererProgram {
174 std::span<const AudioClipRendererProgram>
clips() const noexcept {
184 std::vector<AudioClipRendererProgram>
clips) noexcept
185 : id_(
id), clips_(std::move(
clips)) {}
187 std::vector<AudioClipRendererProgram> clips_;
256 bool apply_track_mixer =
true) noexcept
257 : shell_(track_id), apply_track_mixer_(apply_track_mixer) {}
264 return shell_.active_key();
267 return shell_.state_snapshot();
275 bool apply_track_mixer_ =
true;
Non-owning view over multi-channel audio sample data.
Definition buffer.hpp:30
Renders every arrangement-selected audio track in PlaybackProgram order.
Definition audio_renderer.hpp:233
static AudioRenderStatus process(const PlaybackProgram &program, const TransportSnapshot &transport, audio::BufferView< float > output, AudioRendererLimits limits={}) noexcept
static constexpr bool carries_mutable_state
Definition audio_renderer.hpp:235
static constexpr audio::RtSafetyClass process_rt_safety_class
Definition audio_renderer.hpp:236
RendererProgramKey active_key() const noexcept
Definition audio_renderer.hpp:263
AudioRenderStatus process(const PlaybackProgramBlock &block, const TransportSnapshot &transport, audio::BufferView< float > output, AudioRendererLimits limits={}, RealtimeStretchProgramRuntime *realtime_stretch=nullptr) noexcept
static constexpr audio::RtSafetyClass process_rt_safety_class
Definition audio_renderer.hpp:252
RendererCarryState state_snapshot() const noexcept
Definition audio_renderer.hpp:266
void reset() noexcept
Definition audio_renderer.hpp:269
ArrangementAudioTrackRenderer(timeline::ItemId track_id, bool apply_track_mixer=true) noexcept
Definition audio_renderer.hpp:255
std::span< const AudioClipRendererProgram > clips() const noexcept
Definition audio_renderer.hpp:174
timeline::ItemId id() const noexcept
Definition audio_renderer.hpp:171
friend runtime::Result< std::shared_ptr< const AudioTrackRendererProgram >, AudioRendererError > link_audio_track_program(timeline::ItemId, std::vector< AudioClipRendererProgram >, const AudioRendererLimits &)
friend class ProgramCompilerTask
Definition audio_renderer.hpp:179
Immutable, ID-sorted ownership table prepared off the audio thread.
Definition audio_renderer.hpp:65
static runtime::Result< std::shared_ptr< const DecodedAudioAssetPool >, AudioRendererError > create(std::vector< DecodedAudioAsset > assets, AudioRendererLimits limits={})
const DecodedAudioAsset * find(timeline::ItemId id) const noexcept
static runtime::Result< DecodedAudioAsset, AudioRendererError > decode_wav(timeline::ItemId id, std::span< const std::uint8_t > bytes, audio::WavDecodeLimits decode_limits={})
std::span< const DecodedAudioAsset > assets() const noexcept
Definition audio_renderer.hpp:75
Definition stable_renderer_shell.hpp:22
Definition program.hpp:290
One exact-publication live Stretch runtime.
Definition realtime_stretch_renderer.hpp:31
Definition stable_renderer_shell.hpp:59
static constexpr audio::RtSafetyClass process_rt_safety_class
Definition audio_renderer.hpp:283
void reset() noexcept
Definition audio_renderer.hpp:293
AudioRenderStatus process(const PlaybackProgramBlock &block, const TransportSnapshot &transport, audio::BufferView< float > output, const audio::BufferView< const float > &input, AudioRendererLimits limits={}) noexcept
TrackMixerTrackRenderer(timeline::ItemId track_id) noexcept
Definition audio_renderer.hpp:286
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Definition compiled_tempo_map.hpp:91
Immutable identity-bearing placement of one ClipContent value.
Definition clip.hpp:466
Durable SHA-256 identity for sealed media bytes.
Definition assets.hpp:24
Immutable root of a Timeline document and its monotonic identity domain.
Definition model.hpp:1079
Immutable alternate recording lane owned by a Track.
Definition recording.hpp:103
Immutable identity-bearing arrangement track.
Definition model.hpp:83
ClipFadeShape
Gain curve traversed across a clip's fade region, in both directions.
Definition clip.hpp:208
@ Linear
Definition clip.hpp:208
RtSafetyClass
Definition rt_safety_contract.hpp:11
@ AudioCallbackSafeAfterPrepare
Definition rt_safety_contract.hpp:13
@ AudioCallbackSafeWithImmutableInputs
Definition rt_safety_contract.hpp:14
Definition audio_renderer.hpp:20
runtime::Result< std::shared_ptr< const AudioTrackRendererProgram >, AudioRendererError > link_audio_track_program(timeline::ItemId track_id, std::vector< AudioClipRendererProgram > clips, const AudioRendererLimits &limits)
runtime::Result< AudioClipRendererProgram, AudioRendererError > compile_audio_clip_program(const timeline::Clip &clip, const timeline::Project &project, const timebase::CompiledTempoMap &tempo_map, const DecodedAudioAssetPool &assets, const AudioRendererLimits &limits)
AudioRenderStatus
Definition audio_renderer.hpp:214
@ InvalidTransport
Definition audio_renderer.hpp:218
@ InvalidProgram
Definition audio_renderer.hpp:217
@ Silent
Definition audio_renderer.hpp:216
@ RealtimeStretchGap
Definition audio_renderer.hpp:222
@ InvalidOutput
Definition audio_renderer.hpp:219
@ RealtimeStretchUnderflow
Definition audio_renderer.hpp:226
@ RealtimeStretchImpossibleRatio
Definition audio_renderer.hpp:224
@ Rendered
Definition audio_renderer.hpp:215
@ RealtimeStretchStalePublication
Definition audio_renderer.hpp:223
@ RealtimeStretchStateRequired
Definition audio_renderer.hpp:221
@ RealtimeStretchBackpressure
Definition audio_renderer.hpp:225
@ RealtimeStretchUnsupportedScrubbing
Definition audio_renderer.hpp:227
runtime::Result< AudioClipRendererProgram, AudioRendererError > compile_take_comp_segment_program(const timeline::TakeLane &lane, std::size_t segment_index, const timeline::Project &project, const timebase::CompiledTempoMap &tempo_map, const DecodedAudioAssetPool &assets, const AudioRendererLimits &limits)
Lowers one canonical take-comp selection to the same immutable audio-region artifact used by arrangem...
runtime::Result< AudioClipRendererProgram, AudioRendererError > compile_track_freeze_program(const timeline::Track &track, const timeline::Project &project, const timebase::CompiledTempoMap &tempo_map, const DecodedAudioAssetPool &assets, const AudioRendererLimits &limits)
Lowers a track's selected freeze artifact to one immutable audio region.
AudioRendererErrorCode
Definition audio_renderer.hpp:29
@ InvalidTakeComp
Definition audio_renderer.hpp:39
@ OfflineStretchRequired
Definition audio_renderer.hpp:40
@ MissingDecodedAsset
Definition audio_renderer.hpp:32
@ InvalidIdentity
Definition audio_renderer.hpp:30
@ UnsupportedSampleRate
Definition audio_renderer.hpp:35
@ OfflineStretchFailed
Definition audio_renderer.hpp:41
@ DuplicateAsset
Definition audio_renderer.hpp:31
@ AssetMetadataMismatch
Definition audio_renderer.hpp:34
@ InvalidFade
Definition audio_renderer.hpp:37
@ InvalidAsset
Definition audio_renderer.hpp:33
@ InvalidClipRange
Definition audio_renderer.hpp:36
@ CapacityExceeded
Definition audio_renderer.hpp:38
Result<T, E> — success / failure union for fallible operations.
Resource ceilings checked before the decoder allocates output storage.
Definition wav_decoder.hpp:14
Definition audio_renderer.hpp:116
std::uint64_t fade_out_frames
Definition audio_renderer.hpp:138
timeline::ItemId asset_id
Definition audio_renderer.hpp:126
std::uint64_t timeline_frame_count
Definition audio_renderer.hpp:129
bool uses_host_rate_conversion() const noexcept
std::uint64_t renderable_timeline_frames
Definition audio_renderer.hpp:133
std::shared_ptr< const OfflineStretchArtifact > offline_stretch_artifact
Definition audio_renderer.hpp:146
float gain_linear
Definition audio_renderer.hpp:136
double source_frame_phase_end
Definition audio_renderer.hpp:160
timeline::ClipFadeShape fade_shape
Definition audio_renderer.hpp:139
std::uint64_t fade_in_frames
Definition audio_renderer.hpp:137
timebase::TickPosition musical_tick_end
Definition audio_renderer.hpp:144
bool shares_sample_rate_conversion_with(const AudioClipRendererProgram &other) const noexcept
std::shared_ptr< const OfflineStretchProvenance > offline_stretch_provenance
Definition audio_renderer.hpp:147
timebase::TickPosition musical_tick_start
Definition audio_renderer.hpp:143
std::shared_ptr< const audio::AudioFileData > audio
Definition audio_renderer.hpp:127
bool uses_sample_rate_conversion() const noexcept
bool shares_host_rate_conversion_with(const AudioClipRendererProgram &other) const noexcept
std::shared_ptr< const AudioClipConversionArtifact > conversion_artifact
Definition audio_renderer.hpp:135
std::uint64_t source_frame_count
Definition audio_renderer.hpp:131
std::int64_t timeline_start
Definition audio_renderer.hpp:128
std::int64_t timeline_end() const noexcept
SourceKind
Definition audio_renderer.hpp:117
@ FrozenTrack
Definition audio_renderer.hpp:117
@ TakeCompSegment
Definition audio_renderer.hpp:117
@ ArrangementClip
Definition audio_renderer.hpp:117
timeline::ItemId id
Definition audio_renderer.hpp:125
double source_frames_per_timeline_frame
Definition audio_renderer.hpp:134
SourceKind source_kind
Definition audio_renderer.hpp:140
SourceTimeMapping
Definition audio_renderer.hpp:119
@ MusicalPhaseResample
Definition audio_renderer.hpp:121
@ NativeRate
Definition audio_renderer.hpp:120
std::shared_ptr< const ClipPlacementFadeProgram > placement_fade
Definition audio_renderer.hpp:151
std::uint32_t source_ordinal
Definition audio_renderer.hpp:141
double source_frame_offset
Definition audio_renderer.hpp:132
TimeDomain time_domain
Definition audio_renderer.hpp:142
std::uint64_t source_start
Definition audio_renderer.hpp:130
TimeDomain
Definition audio_renderer.hpp:118
@ Musical
Definition audio_renderer.hpp:118
@ Absolute
Definition audio_renderer.hpp:118
SourceTimeMapping source_time_mapping
Definition audio_renderer.hpp:145
Definition audio_renderer.hpp:44
std::uint64_t actual
Definition audio_renderer.hpp:48
std::uint64_t limit
Definition audio_renderer.hpp:49
timeline::ItemId item
Definition audio_renderer.hpp:46
AudioRendererErrorCode code
Definition audio_renderer.hpp:45
timeline::ItemId related_item
Definition audio_renderer.hpp:47
Shared compile and RT ceilings.
Definition audio_renderer_limits.hpp:10
Every placement fade one flattened leaf sits under.
Definition audio_renderer.hpp:112
std::vector< ClipPlacementFadeSegment > segments
Definition audio_renderer.hpp:113
One placement-fade ramp a flattened leaf sits under, in clip-relative frames.
Definition audio_renderer.hpp:104
double silent_frame
Definition audio_renderer.hpp:105
double open_frame
Definition audio_renderer.hpp:106
timeline::ClipFadeShape shape
Definition audio_renderer.hpp:107
Definition audio_renderer.hpp:52
timeline::ItemId id
Definition audio_renderer.hpp:53
timeline::ContentHash content_hash
SHA-256 identity of the sealed encoded media bytes that produced audio.
Definition audio_renderer.hpp:58
std::shared_ptr< const audio::AudioFileData > audio
Definition audio_renderer.hpp:54
timeline::ContentHash decoded_content_hash
Pool-sealed identity of the decoded sample rate, layout, and PCM bits.
Definition audio_renderer.hpp:61
Definition offline_stretch_artifact.hpp:52
Definition offline_stretch_artifact.hpp:57
Definition stable_renderer_shell.hpp:12
Definition program_identity.hpp:12
Definition transport.hpp:71
Nonzero monotonic identity for a Timeline-owned object.
Definition item_id.hpp:19