Switchboard Extension SDK
|
Describes the format of an AudioBus instance without the need for the audio data. More...
#include <AudioBusFormat.hpp>
Public Member Functions | |
AudioBusFormat () | |
Initializes an AudioBusFormat instance with zero values. | |
SB_WASM | AudioBusFormat (const uint sampleRate, const uint numberOfChannels, const uint numberOfFrames) |
Initializes an AudioBusFormat instance with the provided values. | |
SB_WASM bool | isSet () const |
Returns whether the audio bus format is completely defined. | |
SB_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. | |
std::string | toString () const |
Returns a string representing the object. |
Static Public Member Functions | |
static SB_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. |
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.
SB_WASM switchboard::AudioBusFormat::AudioBusFormat | ( | const uint | sampleRate, |
const uint | numberOfChannels, | ||
const uint | numberOfFrames ) |
Initializes an AudioBusFormat instance with the provided values.
sampleRate | The sample rate. |
numberOfChannels | The number of channels. |
numberOfFrames | The number of frames. |
SB_WASM bool switchboard::AudioBusFormat::isSet | ( | ) | const |
Returns whether the audio bus format is completely defined.
A bus format is considered set if all of its properties (sample rate, number of channels, and number of frames) are non-zero.
|
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.
busFormat1 | The first bus format. |
busFormat2 | The second bus format. |
bool switchboard::AudioBusFormat::operator!= | ( | const AudioBusFormat & | other | ) |
Compares two audio bus formats.
other | The other AudioBusFormat instance. |
bool switchboard::AudioBusFormat::operator== | ( | const AudioBusFormat & | other | ) |
Compares two audio bus formats.
other | The other AudioBusFormat instance. |
SB_WASM void switchboard::AudioBusFormat::reset | ( | ) |
Resets the audio bus format properties.
Sets the property values to zero.
std::string switchboard::AudioBusFormat::toString | ( | ) | const |
Returns a string representing the object.