4#ifndef ZRYTHM_DSP_GRAPH_THREAD_H
5#define ZRYTHM_DSP_GRAPH_THREAD_H
7#include "zrythm-config.h"
9#include "utils/rt_thread_id.h"
11#include "juce_wrapper.h"
13namespace zrythm::dsp::graph
36 std::optional<juce::AudioWorkgroup> workgroup = std::nullopt);
55 void run_worker () noexcept [[clang::nonblocking]];
65 bool is_main_{
false };
87 std::atomic<bool> thread_finished_{
false };
Manages the scheduling and execution of a graph of DSP nodes.
std::atomic< RTThreadId::IdType > rt_thread_id_
Realtime thread ID.
int id_
Thread index in zrythm.
GraphScheduler & scheduler_
Pointer back to the owner scheduler.
std::optional< juce::AudioWorkgroup > audio_workgroup_
Non-owning pointer (optional) to a workgroup to join.
void on_reached_terminal_node()
Called to indicate a terminal node has completed processing.
GraphThread(int id, bool is_main, GraphScheduler &scheduler, std::optional< juce::AudioWorkgroup > workgroup=std::nullopt)
Creates and starts a realtime thread.