Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
stable_renderer_shell.hpp
Go to the documentation of this file.
1#pragma once
2
6
7#include <cstdint>
8#include <utility>
9
10namespace pulp::playback {
11
21
23 public:
27 PlaybackProgramBlock& operator=(const PlaybackProgramBlock&) = delete;
31 : borrowed_(program) {}
32 const PlaybackProgram* program() const noexcept {
33 return borrowed_ != nullptr ? borrowed_ : guard_.get();
34 }
35 explicit operator bool() const noexcept { return program() != nullptr; }
36
37 private:
40 : guard_(std::move(guard)) {}
42 const PlaybackProgram* borrowed_ = nullptr;
43};
44
51
52enum class ShellAdoptionResult : std::uint8_t { Adopted, Unchanged, Missing, Rejected };
53
58
60 public:
65
66 explicit StableRendererShell(timeline::ItemId track_id) noexcept : track_id_(track_id) {}
69 void reset() noexcept;
70 RendererCarryState state_snapshot() const noexcept { return state_.read(); }
71 RendererProgramKey active_key() const noexcept { return state_.read().key; }
72
73 private:
74 timeline::ItemId track_id_;
75 RendererProgramKey active_key_;
76 ProviderKind active_provider_ = ProviderKind::Arrangement;
78};
79
80} // namespace pulp::playback
Definition stable_renderer_shell.hpp:45
PlaybackProgramBlock begin_block(const PlaybackProgramStore &store) const noexcept
static constexpr audio::RtSafetyClass begin_block_rt_safety_class
Definition stable_renderer_shell.hpp:47
Definition stable_renderer_shell.hpp:22
const PlaybackProgram * program() const noexcept
Definition stable_renderer_shell.hpp:32
friend class PlaybackProgramBlockLatch
Definition stable_renderer_shell.hpp:38
PlaybackProgramBlock(PlaybackProgramBlock &&) noexcept=default
Definition program.hpp:371
runtime::Slot< const PlaybackProgram >::ReadGuard ReadGuard
Definition program.hpp:373
Definition program.hpp:290
RendererCarryState state_snapshot() const noexcept
Definition stable_renderer_shell.hpp:70
RendererProgramKey active_key() const noexcept
Definition stable_renderer_shell.hpp:71
static constexpr audio::RtSafetyClass begin_block_rt_safety_class
Definition stable_renderer_shell.hpp:61
bool end_block(RendererCarryState state) noexcept
static constexpr audio::RtSafetyClass end_block_rt_safety_class
Definition stable_renderer_shell.hpp:63
StableRendererBlockView begin_block(const PlaybackProgramBlock &block) noexcept
StableRendererShell(timeline::ItemId track_id) noexcept
Definition stable_renderer_shell.hpp:66
Definition program.hpp:179
Lock-free reader/writer for reading multi-field structs as consistent snapshots.
Definition seqlock.hpp:42
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
ShellAdoptionResult
Definition stable_renderer_shell.hpp:52
@ Missing
Definition stable_renderer_shell.hpp:52
@ Unchanged
Definition automation_cursor.hpp:40
@ Adopted
Definition automation_cursor.hpp:39
@ Rejected
Definition automation_cursor.hpp:41
ProviderKind
Definition program.hpp:46
@ Arrangement
Definition program.hpp:46
SequencerStateChannel is the audio-safe transport for a plugin's structured NON-parameter state: the ...
Definition audio_device_manager.hpp:48
Lock-free sequence-lock for coherent multi-field snapshots.
Definition stable_renderer_shell.hpp:12
timebase::TickPosition timeline_tick
Definition stable_renderer_shell.hpp:18
timebase::SamplePosition source_sample
Definition stable_renderer_shell.hpp:17
bool valid
Definition stable_renderer_shell.hpp:15
ProviderKind active_provider
Definition stable_renderer_shell.hpp:14
std::int64_t event_cursor
Definition stable_renderer_shell.hpp:16
RendererProgramKey key
Definition stable_renderer_shell.hpp:13
std::uint64_t loop_iteration
Definition stable_renderer_shell.hpp:19
Definition program_identity.hpp:12
Definition stable_renderer_shell.hpp:54
const TrackProgram * program
Definition stable_renderer_shell.hpp:55
ShellAdoptionResult adoption
Definition stable_renderer_shell.hpp:56
Definition rational_time.hpp:9
Definition tick.hpp:61
Nonzero monotonic identity for a Timeline-owned object.
Definition item_id.hpp:19