Switchboard SDK
Loading...
Searching...
No Matches
switchboard::AudioBus Struct Reference

Represents a stream of audio in one direction. More...

#include <AudioBus.hpp>

Public Member Functions

 AudioBus ()=default
 Default audioBus constructor.
 
 AudioBus (AudioBuffer< float > *buffer)
 AudioBus constructor.
 
WASM AudioBuffer< float > * getBuffer () const
 Gets the audio buffer of the audio bus.
 
WASM void setBuffer (AudioBuffer< float > *newBuffer)
 Sets the audio buffer of the audio bus.
 
WASM void copyFrom (const AudioBus &srcAudioBus)
 Copies another AudioBus instance.
 
void clear ()
 Sets the content of the audio bus to zero.
 

Public Attributes

AudioBuffer< float > * buffer = nullptr
 The audio buffer of the audio bus.
 

Detailed Description

Represents a stream of audio in one direction.

AudioBus class.

Multiple audio buses can be handled together by the AudioBusList class.

Constructor & Destructor Documentation

◆ AudioBus()

switchboard::AudioBus::AudioBus ( AudioBuffer< float > * buffer)

AudioBus constructor.

Parameters
bufferThe audio buffer containing audio data.

Member Function Documentation

◆ getBuffer()

AudioBuffer< float > * switchboard::AudioBus::getBuffer ( ) const

Gets the audio buffer of the audio bus.

Returns
The audio buffer object.

◆ setBuffer()

void switchboard::AudioBus::setBuffer ( AudioBuffer< float > * newBuffer)

Sets the audio buffer of the audio bus.

Parameters
newBufferThe new audio buffer to be set.