MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ process_sample()

double MayaFlux::Nodes::StreamReaderNode::process_sample ( double  input = 0.0)
overridevirtual

Processes a single data sample.

Parameters
inputThe input sample value
Returns
The processed output sample value

This is the core processing method that all nodes must implement. It takes a single input value, applies the node's transformation algorithm, and returns the resulting output value.

For generator nodes that don't require input (like oscillators or stochastic generators), the input parameter may be ignored. Note: This method does NOT mark the node as processed. That responsibility belongs to the caller, typically a chained parent node or the root node.

Implements MayaFlux::Nodes::Node.

Definition at line 10 of file StreamReaderNode.cpp.

11{
12 if (m_read_head < m_data.size()) {
15 }
16
18
21 }
22
23 return m_last_output;
24}
bool m_state_saved
tracks if the node's state has been saved by a snapshot operation
Definition Node.hpp:429
bool m_networked_node
Flag indicating if the node is part of a NodeNetwork This flag is used to disable event firing when t...
Definition Node.hpp:424
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:377
bool m_fire_events_during_snapshot
Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don...
Definition Node.hpp:453
void notify_tick(double value) override
Notifies all registered callbacks with the current context.

References m_data, MayaFlux::Nodes::Node::m_fire_events_during_snapshot, m_hold_value, MayaFlux::Nodes::Node::m_last_output, MayaFlux::Nodes::Node::m_networked_node, m_read_head, MayaFlux::Nodes::Node::m_state_saved, and notify_tick().

Referenced by process_batch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: