Switchboard SDK
Loading...
Searching...
No Matches
switchboard::AudioSourceNode Class Referenceabstract

A node that produces audio and only has outgoing connections. More...

#include <AudioSourceNode.hpp>

Inheritance diagram for switchboard::AudioSourceNode:
switchboard::AudioNode switchboard::AudioGraphInputNode switchboard::SilenceNode switchboard::SingleBusAudioSourceNode switchboard::SubgraphSourceNode switchboard::AudioPlayerNode switchboard::GeneratorNode switchboard::PipeSourceNode switchboard::ResampledSourceNode switchboard::SineGeneratorNode switchboard::SynthNode switchboard::WhiteNoiseGeneratorNode

Public Member Functions

virtual bool setNumberOfBuses (const uint numberOfBuses)=0
 Sets number of buses.
 
virtual bool setBusFormats (AudioBusFormatList &busFormats)=0
 Sets bus formats.
 
virtual bool produce (AudioBusList &buses)=0
 Produces audio data in the given buses.
 
- 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 &name)
 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 Attributes inherited from switchboard::AudioNode
std::string type
 
std::vector< std::unique_ptr< Parameter > > parameters
 

Detailed Description

A node that produces audio and only has outgoing connections.

AudioSourceNode class.

Member Function Documentation

◆ produce()

virtual bool switchboard::AudioSourceNode::produce ( AudioBusList & buses)
pure virtual

Produces audio data in the given buses.

Should be overridden by subclasses.

Parameters
busesThe buses that should be filled with audio data.
Returns
True if audio was produced successfully, false otherwise.

Implemented in switchboard::AudioGraphInputNode, switchboard::SingleBusAudioSourceNode, switchboard::SilenceNode, and switchboard::SubgraphSourceNode.

◆ setBusFormats()

virtual bool switchboard::AudioSourceNode::setBusFormats ( AudioBusFormatList & busFormats)
pure virtual

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.

Implemented in switchboard::AudioGraphInputNode, switchboard::SingleBusAudioSourceNode, switchboard::SilenceNode, and switchboard::SubgraphSourceNode.

◆ setNumberOfBuses()

virtual bool switchboard::AudioSourceNode::setNumberOfBuses ( const uint numberOfBuses)
pure virtual

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.

Implemented in switchboard::AudioGraphInputNode, switchboard::SingleBusAudioSourceNode, switchboard::SilenceNode, and switchboard::SubgraphSourceNode.