TracktionEngine
Public Member Functions | List of all members
tracktion::graph::ReturnNode Class Referencefinal
Inheritance diagram for tracktion::graph::ReturnNode:

Public Member Functions

 ReturnNode (int busIDToUse)
 
 ReturnNode (std::unique_ptr< Node > inputNode, int busIDToUse)
 
NodeProperties getNodeProperties () override
 Should return the properties of the node. More...
 
std::vector< Node * > getDirectInputNodes () override
 Should return all the inputs directly feeding in to this node. More...
 
TransformResult transform (Node &rootNode, const std::vector< Node * > &postOrderedNodes, TransformCache &cache) override
 Called after construction to give the node a chance to modify its topology. More...
 
bool isReadyToProcess () override
 Should return true when this node is ready to be processed. More...
 
void process (ProcessContext &pc) override
 Called when the node is to be processed. More...
 
- Public Member Functions inherited from tracktion::graph::Node
 Node ()=default
 
virtual ~Node ()=default
 
void initialise (const PlaybackInitialisationInfo &)
 Call once after the graph has been constructed to initialise buffers etc. More...
 
void prepareForNextBlock (juce::Range< int64_t > referenceSampleRange)
 Call before processing the next block, used to reset the process status. More...
 
void process (choc::buffer::FrameCount numSamples, juce::Range< int64_t > referenceSampleRange)
 Call to process the node, which will in turn call the process method with the buffers to fill. More...
 
bool hasProcessed () const
 Returns true if this node has processed and its outputs can be retrieved. More...
 
AudioAndMidiBuffer getProcessedOutput ()
 Returns the processed audio and MIDI output. More...
 
virtual std::vector< Node * > getInternalNodes ()
 Can return Nodes that are internal to this Node but don't make up the main graph constructed from getDirectInputNodes(). More...
 
void retain ()
 Retains the buffers so they won't be deallocated after the Node has processed. More...
 
void release ()
 Releases the buffers allowing internal storage to be deallocated. More...
 
virtual size_t getAllocatedBytes () const
 

Additional Inherited Members

- Public Attributes inherited from tracktion::graph::Node
void * internal = nullptr
 
int numOutputNodes = -1
 
- Protected Member Functions inherited from tracktion::graph::Node
virtual void prepareToPlay (const PlaybackInitialisationInfo &)
 Called once before playback begins for each node. More...
 
virtual void prefetchBlock (juce::Range< int64_t >)
 Called before once on all Nodes before they are processed. More...
 
void setOptimisations (NodeOptimisations)
 This can be called to provide some hints about allocating or playing back a Node to improve efficiency. More...
 
void setAudioOutput (Node *sourceNode, const choc::buffer::ChannelArrayView< float > &)
 This can be called during your process function to set a view to the output. More...
 

Constructor & Destructor Documentation

◆ ReturnNode() [1/2]

tracktion::graph::ReturnNode::ReturnNode ( int  busIDToUse)

◆ ReturnNode() [2/2]

tracktion::graph::ReturnNode::ReturnNode ( std::unique_ptr< Node inputNode,
int  busIDToUse 
)

Member Function Documentation

◆ getNodeProperties()

NodeProperties tracktion::graph::ReturnNode::getNodeProperties ( )
overridevirtual

◆ getDirectInputNodes()

std::vector<Node*> tracktion::graph::ReturnNode::getDirectInputNodes ( )
overridevirtual

Should return all the inputs directly feeding in to this node.

Reimplemented from tracktion::graph::Node.

Referenced by getNodeProperties().

◆ transform()

TransformResult tracktion::graph::ReturnNode::transform ( Node ,
const std::vector< Node * > &  ,
TransformCache  
)
overridevirtual

Called after construction to give the node a chance to modify its topology.

This should return true if any changes were made to the topology as this indicates that the method may need to be called again after other nodes have had their toplogy changed.

Parameters
postOrderedNodesThis is an ordered list obtained from visiting all the Nodes and can be used for quicker introspection of the graph
TransformCacheA cache which can be used to speed up operations during the transform stage.
Returns
TransformResult The type of transformation that has taken place. If connections have been made AND nodes deleted, return nodesDeleted

Reimplemented from tracktion::graph::Node.

References tracktion::graph::connectionsMade, and tracktion::graph::none.

◆ isReadyToProcess()

bool tracktion::graph::ReturnNode::isReadyToProcess ( )
overridevirtual

Should return true when this node is ready to be processed.

This is usually when its input's output buffers are ready.

Implements tracktion::graph::Node.

◆ process()

void tracktion::graph::ReturnNode::process ( ProcessContext )
overridevirtual

Called when the node is to be processed.

This should add in to the buffers available making sure not to change their size at all.

Implements tracktion::graph::Node.

References tracktion::graph::Node::AudioAndMidiBuffer::audio, tracktion::graph::Node::ProcessContext::buffers, tracktion::graph::Node::AudioAndMidiBuffer::midi, and tracktion::graph::Node::setAudioOutput().


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