22 return std::make_unique<GeneratorContextGpu>(
virtual bool should_mock_process() const
Checks if the generator should mock process.
virtual std::unique_ptr< NodeContext > create_context(double value) override
Creates a context object for callbacks.
float m_frequency
Base frequency of the generator.
double m_amplitude
Base amplitude of the generator.
virtual void enable_mock_process(bool mock_process)
Allows RootNode to process the Generator without using the processed sample.
double m_phase
Current phase of the generator.
std::atomic< Utils::NodeState > m_state
Atomic state flag tracking the node's processing status.
bool m_gpu_compatible
Flag indicating if the node supports GPU processing This flag is set by derived classes to indicate w...
std::span< const float > get_gpu_data_buffer() const
Provides access to the GPU data buffer.
void atomic_add_flag(std::atomic< Utils::NodeState > &state, Utils::NodeState flag)
Atomically adds a flag to a node state.
void atomic_remove_flag(std::atomic< Utils::NodeState > &state, Utils::NodeState flag)
Atomically removes a flag from a node state.
@ MOCK_PROCESS
Node should be processed but output ignored.