Switchboard SDK
Loading...
Searching...
No Matches
switchboard::AudioGraphOutputNode Class Reference

Represents the output node of the audio graph. More...

#include <AudioGraphOutputNode.hpp>

Inheritance diagram for switchboard::AudioGraphOutputNode:
switchboard::AudioSinkNode switchboard::AudioNode

Public Member Functions

 AudioGraphOutputNode ()
 Creates an AudioGraphOutputNode instance.
 
void setGraphOutAudioBuses (const AudioBusList *graphOutAudioBuses)
 Sets the destination of the audio data.
 
uint getNumberOfBuses () const
 Gets the number of buses that was set by the AudioGraph.
 
bool setNumberOfBuses (const uint numberOfBuses) override
 Sets number of buses.
 
bool setBusFormats (AudioBusFormatList &busFormats) override
 Sets bus formats.
 
bool consume (AudioBusList &buses) override
 Consumes audio data from the given buses.
 
- Public Member Functions inherited from switchboard::AudioSinkNode
- Public Member Functions inherited from switchboard::AudioNode
 AudioNode ()
 AudioNode constructor.
 
virtual ~AudioNode ()=default
 AudioNode virtual destructor.
 
const std::string & getType () const
 Gets the type of the audio node.
 
virtual const std::string getDisplayName () const
 Gets the display name of the audio node.
 
virtual std::vector< std::unique_ptr< Parameter > > & getParameters ()
 Gets the parameters of the audio node.
 
virtual ParametergetParameter (const std::string &id)
 Gets the parameter with the given name.
 

Additional Inherited Members

- Public Attributes inherited from switchboard::AudioNode
std::string name
 The name of the audio node.
 
- Protected Member Functions inherited from switchboard::AudioNode
void initParameters (std::map< std::string, std::any > config)
 Initializes the node parameters from the given configuration values.
 
- Protected Attributes inherited from switchboard::AudioNode
std::string type
 
std::vector< std::unique_ptr< Parameter > > parameters
 

Detailed Description

Represents the output node of the audio graph.

AudioGraphOutputNode class.

Member Function Documentation

◆ consume()

bool switchboard::AudioGraphOutputNode::consume ( AudioBusList & buses)
overridevirtual

Consumes audio data from the given buses.

Should be overridden by subclasses.

Parameters
busesThe buses that contain the audio data.
Returns
True if audio was consumed successfully, false otherwise.

Implements switchboard::AudioSinkNode.

◆ getNumberOfBuses()

uint switchboard::AudioGraphOutputNode::getNumberOfBuses ( ) const

Gets the number of buses that was set by the AudioGraph.

Returns
The number of buses.

◆ setBusFormats()

bool switchboard::AudioGraphOutputNode::setBusFormats ( AudioBusFormatList & busFormats)
overridevirtual

Sets bus formats.

Should be overridden by subclasses.

Parameters
busFormatsThe bus formats to set.
Returns
True if the bus formats were set successfully, false otherwise.

Implements switchboard::AudioSinkNode.

◆ setGraphOutAudioBuses()

void switchboard::AudioGraphOutputNode::setGraphOutAudioBuses ( const AudioBusList * graphOutAudioBuses)

Sets the destination of the audio data.

The AudioGraph instance is responsible for calling this method.

Parameters
graphOutAudioBusesAn AudioBusList instance where the audio output will be written to.

◆ setNumberOfBuses()

bool switchboard::AudioGraphOutputNode::setNumberOfBuses ( const uint numberOfBuses)
overridevirtual

Sets number of buses.

Should be overridden by subclasses.

Parameters
numberOfBusesThe number of buses to set.
Returns
True if the number of buses was set successfully, false otherwise.

Implements switchboard::AudioSinkNode.