|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
The DspGraphDispatcher class manages the processing graph for the audio engine. More...
#include <src/dsp/graph_dispatcher.h>
Public Types | |
| using | RunFunctionWithEngineLock = std::function<void (std::function<void ()>)> |
Public Member Functions | |
| DspGraphDispatcher (std::unique_ptr< graph::IGraphBuilder > graph_builder, std::vector< graph::IProcessable * > terminal_processables, const juce::AudioDeviceManager &device_manager, RunFunctionWithEngineLock run_function_with_engine_lock, graph::GraphScheduler::RunOnMainThreadFunc run_on_main_thread) | |
| void | recalc_graph (bool soft) |
| Recalculates the process acyclic directed graph. | |
| void | start_cycle (const dsp::ITransport ¤t_transport_state, EngineProcessTimeInfo time_nfo, nframes_t remaining_latency_preroll, bool realtime_context) noexcept |
| Starts a new cycle. | |
| nframes_t | get_max_route_playback_latency () |
| Returns the max playback latency of the trigger nodes. | |
| bool | is_processing_kickoff_thread () const |
| Returns whether this is the thread that kicks off processing (thread that calls router_start_cycle()). | |
| bool | is_processing_thread () const |
| Returns if the current thread is a processing thread. | |
| auto & | current_trigger_nodes () const |
| Accessor for currently active trigger nodes. | |
The DspGraphDispatcher class manages the processing graph for the audio engine.
The DspGraphDispatcher class is responsible for maintaining the active processing graph, handling graph setup and recalculation, and managing the processing cycle. It provides methods for starting a new processing cycle, retrieving the maximum playback latency, and checking the current processing thread.
Definition at line 24 of file graph_dispatcher.h.
| using zrythm::dsp::DspGraphDispatcher::RunFunctionWithEngineLock = std::function<void (std::function<void ()>)> |
Definition at line 27 of file graph_dispatcher.h.
|
inline |
Accessor for currently active trigger nodes.
Definition at line 112 of file graph_dispatcher.h.
|
inlinenodiscard |
Returns whether this is the thread that kicks off processing (thread that calls router_start_cycle()).
Definition at line 66 of file graph_dispatcher.h.
|
inlinenodiscard |
Returns if the current thread is a processing thread.
Definition at line 76 of file graph_dispatcher.h.
| void zrythm::dsp::DspGraphDispatcher::recalc_graph | ( | bool | soft | ) |
Recalculates the process acyclic directed graph.
| soft | If true, only readjusts latencies. |
|
noexcept |
Starts a new cycle.
| realtime_context | Whether this is called in a realtime context. |
| remaining_latency_preroll | Remaining number of playback latency preroll samples for this cycle. |