Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
switchboard::AudioBusFormat Struct Reference

Describes the format of an AudioBus instance without the need for the audio data. More...

#include <AudioBusFormat.hpp>

Public Member Functions

WASM AudioBusFormat ()
 Initializes an AudioBusFormat instance with zero values.
 
WASM AudioBusFormat (const uint sampleRate, const uint numberOfChannels, const uint numberOfFrames)
 Initializes an AudioBusFormat instance with the provided values.
 
WASM bool isSet () const
 Returns whether the audio bus format is completely defined.
 
WASM void reset ()
 Resets the audio bus format properties.
 
bool operator== (const AudioBusFormat &other)
 Compares two audio bus formats.
 
bool operator!= (const AudioBusFormat &other)
 Compares two audio bus formats.
 

Static Public Member Functions

static WASM bool matchBusFormats (AudioBusFormat &busFormat1, AudioBusFormat &busFormat2)
 Matches two AudioBusFormat instances.
 

Public Attributes

uint sampleRate
 Sample rate.
 
uint numberOfChannels
 Number of channels.
 
uint numberOfFrames
 Number of frames.
 

Detailed Description

Describes the format of an AudioBus instance without the need for the audio data.

AudioBusFormat class.

Multiple AudioBusFormat instances can be handled by the AudioBusFormatList class.

Constructor & Destructor Documentation

◆ AudioBusFormat()

switchboard::AudioBusFormat::AudioBusFormat ( const uint  sampleRate,
const uint  numberOfChannels,
const uint  numberOfFrames 
)

Initializes an AudioBusFormat instance with the provided values.

Parameters
sampleRateThe sample rate.
numberOfChannelsThe number of channels.
numberOfFramesThe number of frames.

Member Function Documentation

◆ isSet()

bool switchboard::AudioBusFormat::isSet ( ) const

Returns whether the audio bus format is completely defined.

Returns
True if all properties are set (non zero), false otherwise.

◆ matchBusFormats()

bool switchboard::AudioBusFormat::matchBusFormats ( AudioBusFormat busFormat1,
AudioBusFormat busFormat2 
)
static

Matches two AudioBusFormat instances.

If both bus formats are set, their equality will be checked. If one of them is not set, the unset one will match the set one. If none of them are set, the result value will false.

Parameters
busFormat1The first bus format.
busFormat2The second bus format.
Returns
True if the two bus formats could be matched successfully, false otherwise.

◆ operator!=()

bool switchboard::AudioBusFormat::operator!= ( const AudioBusFormat other)

Compares two audio bus formats.

Parameters
otherThe other AudioBusFormat instance.
Returns
True if the two formats are different, false otherwise.

◆ operator==()

bool switchboard::AudioBusFormat::operator== ( const AudioBusFormat other)

Compares two audio bus formats.

Parameters
otherThe other AudioBusFormat instance.
Returns
True if the two formats are exactly the same, false otherwise.

◆ reset()

void switchboard::AudioBusFormat::reset ( )

Resets the audio bus format properties.

Sets the property values to zero.


The documentation for this struct was generated from the following files: