NAP
Public Member Functions | Protected Member Functions | List of all members
Node Class Reference

#include <audio/core/audionode.h>

Public Member Functions

 Node (NodeManager &manager)
 
const std::set< OutputPin * > & getOutputs () const
 
const std::set< InputPinBase * > & getInputs () const
 
void process () override
 
- Public Member Functions inherited from Process
 Process (NodeManager &nodeManager)
 
 Process (ParentProcess &parent)
 
 Process (const Process &)=delete
 
Processoperator= (const Process &)=delete
 
virtual ~Process ()
 
void update ()
 
NodeManagergetNodeManager () const
 
int getBufferSize () const
 
float getSampleRate () const
 
DiscreteTimeValue getSampleTime () const
 

Protected Member Functions

SampleBuffergetOutputBuffer (OutputPin &output)
 
- Protected Member Functions inherited from Process
virtual void sampleRateChanged (float sampleRate)
 
virtual void bufferSizeChanged (int bufferSize)
 
bool isRegisteredWithNodeManager () const
 

Description

A node performs audio processing and is the smallest unit of a DSP network. The node can have an arbitrary number of inputs and outputs, used to connect streams of mono audio between different nodes. Use this as a base class for custom nodes that generate audio output.

Inheritance diagram for Node:
[legend]
Collaboration diagram for Node:
[legend]

Constructor & Destructor Documentation

◆ Node()

Node ( NodeManager manager)
Parameters
managerthe node manager that this node will be registered to and processed by. The node receives it's buffersize and samplerate from the manager.

Member Function Documentation

◆ getInputs()

const std::set<InputPinBase*>& getInputs ( ) const
Returns
all this node's inputs

◆ getOutputBuffer()

SampleBuffer& getOutputBuffer ( OutputPin output)
protected

Use this function within descendants @process() implementation to access the buffers that need to be filled with output.

Parameters
outputthe output that the buffer is requested for

◆ getOutputs()

const std::set<OutputPin*>& getOutputs ( ) const
Returns
all this node's outputs

◆ process()

void process ( )
overridevirtual

Has to be overwritted by descendants to specify the actual process.

Implements Process.

Reimplemented in LevelMeterNode, and FilterNode.