29#include "zrythm-config.h"
31#include "dsp/graph_scheduler.h"
32#include "engine/device_io/engine.h"
33#include "utils/rt_thread_id.h"
34#include "utils/types.h"
36#define ROUTER (AUDIO_ENGINE->router_)
38namespace zrythm::engine::session
87 static thread_local bool have_result =
false;
90 if (have_result) [[likely]]
95 if (!scheduler_) [[unlikely]]
102 if (scheduler_->contains_thread (current_thread_id.get ()))
115 std::unique_ptr<dsp::graph::GraphScheduler> scheduler_;
135 bool callback_in_progress_ =
false;
unsigned int process_kickoff_thread_
ID of the thread that calls kicks off the cycle.
nframes_t global_offset_
Current global latency offset (max latency of all routes - remaining latency from engine).
nframes_t get_max_route_playback_latency()
Returns the max playback latency of the trigger nodes.
nframes_t max_route_playback_latency_
Stored for the currently processing cycle.
void recalc_graph(bool soft)
Recalculates the process acyclic directed graph.
bool is_processing_thread() const
Returns if the current thread is a processing thread.
std::binary_semaphore graph_access_sem_
Used when recalculating the graph.
void start_cycle(EngineProcessTimeInfo time_nfo)
Starts a new cycle.
bool is_processing_kickoff_thread() const
Returns whether this is the thread that kicks off processing (thread that calls router_start_cycle())...
EngineProcessTimeInfo time_nfo_
Time info for this processing cycle.
std::atomic< bool > graph_setup_in_progress_
An atomic variable to check if the graph is currently being setup (so that we can avoid accessing buf...
uint32_t nframes_t
Frame count.
Common struct to pass around during processing to avoid repeating the data in function arguments.