JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AudioProcessorGraph::Node Class Reference

Represents one of the nodes, or processors, in an AudioProcessorGraph. More...

#include <juce_AudioProcessorGraph.h>

Inheritance diagram for juce::AudioProcessorGraph::Node:
Collaboration diagram for juce::AudioProcessorGraph::Node:

Classes

struct  Connection
 

Public Types

using Ptr = ReferenceCountedObjectPtr< Node >
 A convenient typedef for referring to a pointer to a node object. More...
 

Public Member Functions

void decReferenceCount () noexcept
 Decreases the object's reference count. More...
 
bool decReferenceCountWithoutDeleting () noexcept
 Decreases the object's reference count. More...
 
AudioProcessorgetProcessor () const noexcept
 The actual processor object that this node represents. More...
 
int getReferenceCount () const noexcept
 Returns the object's current reference count. More...
 
void incReferenceCount () noexcept
 Increments the object's reference count. More...
 
bool isBypassed () const noexcept
 Returns if the node is bypassed or not. More...
 
void setBypassed (bool shouldBeBypassed) noexcept
 Tell this node to bypass processing. More...
 

Public Attributes

const NodeID nodeID
 The ID number assigned to this node. More...
 
NamedValueSet properties
 A set of user-definable properties that are associated with this node. More...
 

Protected Member Functions

void resetReferenceCount () noexcept
 Resets the reference count to zero without deleting the object. More...
 

Private Member Functions

 Node (NodeID, std::unique_ptr< AudioProcessor >) noexcept
 
bool hasNoConnections () const noexcept
 
void prepare (double newSampleRate, int newBlockSize, AudioProcessorGraph *, ProcessingPrecision)
 
template<typename Sample >
void processBlock (AudioBuffer< Sample > &audio, MidiBuffer &midi)
 
template<typename Sample >
void processBlockBypassed (AudioBuffer< Sample > &audio, MidiBuffer &midi)
 
void setParentGraph (AudioProcessorGraph *) const
 
void unprepare ()
 

Private Attributes

std::atomic< boolbypassed { false }
 
Array< Connectioninputs
 
bool isPrepared = false
 
Array< Connectionoutputs
 
std::unique_ptr< AudioProcessorprocessor
 
CriticalSection processorLock
 
Atomic< intrefCount { 0 }
 

Friends

class AudioProcessorGraph
 
template<typename Float >
struct GraphRenderSequence
 
template<typename Float >
struct RenderSequenceBuilder
 

Detailed Description

Represents one of the nodes, or processors, in an AudioProcessorGraph.

To create a node, call AudioProcessorGraph::addNode().

Member Typedef Documentation

◆ Ptr

A convenient typedef for referring to a pointer to a node object.

Constructor & Destructor Documentation

◆ Node()

juce::AudioProcessorGraph::Node::Node ( NodeID  ,
std::unique_ptr< AudioProcessor  
)
privatenoexcept

Member Function Documentation

◆ decReferenceCount()

void juce::ReferenceCountedObject::decReferenceCount ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will be deleted.

References jassert.

◆ decReferenceCountWithoutDeleting()

bool juce::ReferenceCountedObject::decReferenceCountWithoutDeleting ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will not be deleted, but this method will return true, allowing the caller to take care of deletion.

References jassert.

◆ getProcessor()

AudioProcessor* juce::AudioProcessorGraph::Node::getProcessor ( ) const
inlinenoexcept

The actual processor object that this node represents.

◆ getReferenceCount()

int juce::ReferenceCountedObject::getReferenceCount ( ) const
inlinenoexceptinherited

Returns the object's current reference count.

◆ hasNoConnections()

bool juce::AudioProcessorGraph::Node::hasNoConnections ( ) const
inlineprivatenoexcept

◆ incReferenceCount()

void juce::ReferenceCountedObject::incReferenceCount ( )
inlinenoexceptinherited

Increments the object's reference count.

This is done automatically by the smart pointer, but is public just in case it's needed for nefarious purposes.

Referenced by juce::ReferenceCountedObjectPtr< juce::ReferenceCountedObject >::operator=().

◆ isBypassed()

bool juce::AudioProcessorGraph::Node::isBypassed ( ) const
noexcept

Returns if the node is bypassed or not.

◆ prepare()

void juce::AudioProcessorGraph::Node::prepare ( double  newSampleRate,
int  newBlockSize,
AudioProcessorGraph ,
ProcessingPrecision   
)
private

◆ processBlock()

template<typename Sample >
void juce::AudioProcessorGraph::Node::processBlock ( AudioBuffer< Sample > &  audio,
MidiBuffer midi 
)
inlineprivate

◆ processBlockBypassed()

template<typename Sample >
void juce::AudioProcessorGraph::Node::processBlockBypassed ( AudioBuffer< Sample > &  audio,
MidiBuffer midi 
)
inlineprivate

◆ resetReferenceCount()

void juce::ReferenceCountedObject::resetReferenceCount ( )
inlineprotectednoexceptinherited

Resets the reference count to zero without deleting the object.

You should probably never need to use this!

◆ setBypassed()

void juce::AudioProcessorGraph::Node::setBypassed ( bool  shouldBeBypassed)
noexcept

Tell this node to bypass processing.

◆ setParentGraph()

void juce::AudioProcessorGraph::Node::setParentGraph ( AudioProcessorGraph ) const
private

◆ unprepare()

void juce::AudioProcessorGraph::Node::unprepare ( )
private

Friends And Related Function Documentation

◆ AudioProcessorGraph

friend class AudioProcessorGraph
friend

◆ GraphRenderSequence

template<typename Float >
friend struct GraphRenderSequence
friend

◆ RenderSequenceBuilder

template<typename Float >
friend struct RenderSequenceBuilder
friend

Member Data Documentation

◆ bypassed

std::atomic<bool> juce::AudioProcessorGraph::Node::bypassed { false }
private

◆ inputs

Array<Connection> juce::AudioProcessorGraph::Node::inputs
private

◆ isPrepared

bool juce::AudioProcessorGraph::Node::isPrepared = false
private

◆ nodeID

const NodeID juce::AudioProcessorGraph::Node::nodeID

The ID number assigned to this node.

This is assigned by the graph that owns it, and can't be changed.

◆ outputs

Array<Connection> juce::AudioProcessorGraph::Node::outputs
private

◆ processor

std::unique_ptr<AudioProcessor> juce::AudioProcessorGraph::Node::processor
private

◆ processorLock

CriticalSection juce::AudioProcessorGraph::Node::processorLock
private

◆ properties

NamedValueSet juce::AudioProcessorGraph::Node::properties

A set of user-definable properties that are associated with this node.

This can be used to attach values to the node for whatever purpose seems useful. For example, you might store an x and y position if your application is displaying the nodes on-screen.

◆ refCount

Atomic<int> juce::ReferenceCountedObject::refCount { 0 }
privateinherited

The documentation for this class was generated from the following file: