28 std::vector<double> out(num_samples);
29 for (
unsigned int i = 0; i < num_samples; ++i) {
void restore_state() override
Restore value from last save_state() call.
void update_context(double value) override
Update m_context with the latest value.
void save_state() override
Snapshot the current value for later restoration.
Constant(double value=0.0)
Construct with an initial constant value.
NodeContext & get_last_context() override
Return the cached NodeContext from the last process_sample() call.
std::vector< double > process_batch(unsigned int num_samples) override
Fill a buffer with the constant value.
ConstantContext m_context
void notify_tick(double value) override
Fire all registered on_tick() and on_tick_if() callbacks.
double process_sample(double input=0.0) override
Return the constant value, ignoring input.
void set_constant(double value)
Update the emitted value.
double value
Current sample value.
Base context class for node callbacks.
std::vector< NodeHook > m_callbacks
Collection of standard callback functions.
bool m_state_saved
tracks if the node's state has been saved by a snapshot operation
bool m_networked_node
Flag indicating if the node is part of a NodeNetwork This flag is used to disable event firing when t...
double m_last_output
The most recent sample value generated by this oscillator.
bool m_fire_events_during_snapshot
Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don...
std::vector< std::pair< NodeHook, NodeCondition > > m_conditional_callbacks
Collection of conditional callback functions with their predicates.
Contains the node-based computational processing system components.