26class DspGraphDispatcher final
29 using RunFunctionWithEngineLock = std::function<void (std::function<
void ()>)>;
31 using TerminalProcessablesProvider =
32 std::function<std::span<graph::IProcessable *> ()>;
35 std::unique_ptr<graph::IGraphBuilder> graph_builder,
36 TerminalProcessablesProvider terminal_processables_provider,
38 RunFunctionWithEngineLock run_function_with_engine_lock,
40 std::optional<juce::AudioWorkgroup> workgroup = std::nullopt);
67 units::sample_u64_t remaining_latency_preroll,
68 bool realtime_context,
69 const dsp::TempoMap &tempo_map)
noexcept [[clang::nonblocking]];
83 return process_kickoff_thread_.has_value ()
84 ? current_thread_id.get () == process_kickoff_thread_.value ()
94 static thread_local bool have_result =
false;
97 if (have_result) [[likely]]
102 if (!scheduler_) [[unlikely]]
109 if (scheduler_->contains_thread (current_thread_id.get ()))
129 return scheduler_->get_nodes ().trigger_nodes_;
148 void preprocess_at_start_of_cycle (
150 [[clang::nonblocking]];
153 std::unique_ptr<graph::IGraphBuilder> graph_builder_;
155 std::optional<juce::AudioWorkgroup> workgroup_;
161 RunFunctionWithEngineLock run_function_with_engine_lock_;
166 TerminalProcessablesProvider terminal_processables_provider_;
168 std::unique_ptr<graph::GraphScheduler> scheduler_;
171 units::sample_u32_t max_route_playback_latency_;
181 units::sample_u32_t global_offset_;
184 std::optional<unsigned int> process_kickoff_thread_;
void start_cycle(const dsp::ITransport ¤t_transport_state, dsp::graph::ProcessBlockInfo time_nfo, units::sample_u64_t remaining_latency_preroll, bool realtime_context, const dsp::TempoMap &tempo_map) noexcept
Starts a new cycle.