Switchboard SDK
Loading...
Searching...
No Matches
switchboard::AudioBusArray< N > Class Template Reference

Holds a list of AudioBus instances and allocates memory on the stack. More...

#include <AudioBusArray.hpp>

Inheritance diagram for switchboard::AudioBusArray< N >:
switchboard::AudioBusList

Public Member Functions

 AudioBusArray ()
 Creates an AudioBusArray instance.
 
 AudioBusArray (AudioBus &audioBus)
 Creates an AudioBusArray instance with a single audio bus.
 
 AudioBusArray (AudioBuffer< float > &buffer)
 Creates an AudioBusArray instance with a single audio bus from an audio buffer.
 
uint getNumberOfBuses () const override
 Gets the number of audio buses.
 
AudioBusgetBus (const uint busIndex) const override
 Gets an audio bus by its index.
 
AudioBusFormatListgetFormat () override
 Gets the formats of the audio buses.
 
- Public Member Functions inherited from switchboard::AudioBusList
 AudioBusList ()=default
 Default constructor for AudioBusList.
 
virtual ~AudioBusList ()=default
 Default destructor for AudioBusList.
 
void copyFrom (const AudioBusList &srcAudioBusList) const
 Copies another AudioBusList instance.
 
void clear () const
 Sets the content of all audio buses to zero.
 
 AudioBusList (const AudioBusList &)=delete
 
AudioBusListoperator= (const AudioBusList &)=delete
 

Detailed Description

template<std::size_t N>
class switchboard::AudioBusArray< N >

Holds a list of AudioBus instances and allocates memory on the stack.

AudioBusArray class.

Constructor & Destructor Documentation

◆ AudioBusArray() [1/3]

template<std::size_t N>
switchboard::AudioBusArray< N >::AudioBusArray ( )
inline

Creates an AudioBusArray instance.

Allocates enough memory on the stack to hold the AudioBus instances.

◆ AudioBusArray() [2/3]

template<std::size_t N>
switchboard::AudioBusArray< N >::AudioBusArray ( AudioBus & audioBus)

Creates an AudioBusArray instance with a single audio bus.

Allocates memory on the stack for one AudioBus instance.

Parameters
audioBusThe first audio bus in the AudioBusArray.

◆ AudioBusArray() [3/3]

template<std::size_t N>
switchboard::AudioBusArray< N >::AudioBusArray ( AudioBuffer< float > & buffer)

Creates an AudioBusArray instance with a single audio bus from an audio buffer.

Allocates memory on the stack.

Parameters
bufferThe audio buffer for the first audio bus in the AudioBusArray.

Member Function Documentation

◆ getBus()

template<std::size_t N>
AudioBus & switchboard::AudioBusArray< N >::getBus ( const uint busIndex) const
overridevirtual

Gets an audio bus by its index.

Parameters
busIndexThe index of the audio bus.
Returns
The AudioBus instance.

Implements switchboard::AudioBusList.

◆ getFormat()

template<std::size_t N>
AudioBusFormatList & switchboard::AudioBusArray< N >::getFormat ( )
overridevirtual

Gets the formats of the audio buses.

Returns
An AudioBusFormatList instance that describes the formats of the audio buses.

Implements switchboard::AudioBusList.

◆ getNumberOfBuses()

template<std::size_t N>
uint switchboard::AudioBusArray< N >::getNumberOfBuses ( ) const
overridevirtual

Gets the number of audio buses.

Returns
The number of audio buses.

Implements switchboard::AudioBusList.