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

◆ process_sample()

double MayaFlux::Nodes::Input::InputNode::process_sample ( double  input = 0.0)
overridevirtual

Process a single sample.

Parameters
inputUnused (InputNodes generate from external input)
Returns
Current smoothed input value

Implements MayaFlux::Nodes::Node.

Definition at line 18 of file InputNode.cpp.

19{
20 double target = m_target_value.load();
21 double current = m_current_value.load();
22
23 double output = apply_smoothing(target, current);
24 m_current_value.store(output);
25 m_last_output = output;
26
27 notify_tick(output);
28 return output;
29}
std::atomic< double > m_target_value
void notify_tick(double value) override
Notify callbacks (minimal for InputNode)
double apply_smoothing(double target, double current) const
std::atomic< double > m_current_value
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:377

References apply_smoothing(), m_current_value, MayaFlux::Nodes::Node::m_last_output, m_target_value, and notify_tick().

Referenced by process_batch().

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