Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
signal_graph_execution_snapshot.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace pulp::host {
6
7namespace detail {
8class TimelineAutomationDelivery;
9}
10
15class SnapshotParameterIngressPasskey {
16 SnapshotParameterIngressPasskey() = default;
18};
19
24 public:
25 ExecutionSnapshot() = default;
26 explicit operator bool() const noexcept { return snapshot_ != nullptr; }
27 std::uint64_t sample_region_binding_generation() const noexcept;
29
30 bool inject_midi(NodeId midi_input_node,
31 const midi::MidiBuffer& events) const noexcept;
32 bool inject_midi(NodeId midi_input_node, const midi::MidiBuffer& events,
33 const midi::MpeBuffer& mpe) const noexcept;
34 // Generic live-mailbox injection into this pinned generation. Available to
35 // any host holding the snapshot handle.
37 NodeId plugin_node,
38 const state::ParameterEventQueue& events) const noexcept;
39 // Exact-generation injection into a node's owner-claimed exact mailbox,
40 // gated by a passkey only the timeline delivery path can construct. Separate
41 // from the generic live path above so a claimed node's timeline stream and
42 // ordinary live injection never share one mailbox.
44 NodeId plugin_node,
46 SnapshotParameterIngressPasskey) const noexcept;
47 void process(audio::BufferView<float>& output,
48 const audio::BufferView<const float>& input,
49 int num_samples) const noexcept;
50 void process(audio::BufferView<float>& output,
51 const audio::BufferView<const float>& input,
52 int num_samples,
53 const format::ProcessContext& transport) const noexcept;
54
55 private:
58 std::shared_ptr<SignalGraph::CompiledGraph> snapshot) noexcept
59 : owner_(&owner), snapshot_(std::move(snapshot)),
60 processing_lease_(owner.processing_handle_lifetime_) {
61 if (owner.spectral_mode_.load(std::memory_order_acquire) ||
62 (snapshot_ && snapshot_->spectral)) {
63 owner.spectral_error_.store(SpectralError::SpectralPinnedExecutionUnsupported,
64 std::memory_order_relaxed);
65 snapshot_.reset();
66 processing_lease_.reset();
67 }
68 }
69
70 SignalGraph* owner_ = nullptr;
71 std::shared_ptr<SignalGraph::CompiledGraph> snapshot_;
72 std::shared_ptr<int> processing_lease_;
73};
74
75} // namespace pulp::host
Strong, typed handle to one exact compiled SignalGraph generation.
Definition signal_graph_execution_snapshot.hpp:23
bool inject_midi(NodeId midi_input_node, const midi::MidiBuffer &events) const noexcept
bool inject_exact_parameter_events(NodeId plugin_node, const state::ParameterEventQueue &events, SnapshotParameterIngressPasskey) const noexcept
void process(audio::BufferView< float > &output, const audio::BufferView< const float > &input, int num_samples) const noexcept
std::uint64_t sample_region_binding_generation() const noexcept
std::vector< SampleRegionRuntimeReceipt > sample_region_runtime_receipts() const
friend class PreparedTopologyEdit
Definition signal_graph_execution_snapshot.hpp:56
bool inject_parameter_events(NodeId plugin_node, const state::ParameterEventQueue &events) const noexcept
Passkey authorizing exact-generation parameter-event injection into a pinned ExecutionSnapshot.
Definition signal_graph_execution_snapshot.hpp:15
friend class detail::TimelineAutomationDelivery
Definition signal_graph_execution_snapshot.hpp:17
Definition analyzer_provider.hpp:12
Definition child_process_manager.hpp:18
What the product grants a device: the quota table indexed by capability tier and live thermal state.
Definition aax_editor.hpp:31
std::uint32_t NodeId
Definition graph_types.hpp:7
Definition baked_codec.hpp:158
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
::pulp::state::ParameterEventQueue ParameterEventQueue
Definition parameter_event_queue.hpp:8
Definition custom_node_events.hpp:26
SequencerStateChannel is the audio-safe transport for a plugin's structured NON-parameter state: the ...
Definition audio_device_manager.hpp:48
STL namespace.
Definition sample_region_runtime.hpp:171