blip
0.1
|
An object that describes an audio data format. More...
#include <AudioFormat.hpp>
Public Types | |
enum | Format { Format_None = 0, Format_PCM } |
Audio format types. More... | |
Public Member Functions | |
AudioFormat () | |
Construct a new, ininitialized AudioFormat object. More... | |
AudioFormat (Format format, uint32_t sampleRate, uint16_t bitsPerSample, uint16_t numChannels) throw () | |
Construct a new AudioFormat object with the given format parameters. More... | |
~AudioFormat () throw () | |
Destructor. More... | |
Format | getFormat () const throw () |
Get the format type. More... | |
uint32_t | getSampleRate () const throw () |
Get the sample rate, in Hz. More... | |
uint16_t | getBitsPerSample () const throw () |
Get the number of data bits per sample. More... | |
uint16_t | getNumChannels () const throw () |
Get the number of discrete audio channels. More... | |
bool | isMono () const throw () |
Test if this is single-channel (mono) audio. More... | |
bool | isStereo () const throw () |
Test if this is dual-channel (stereo) audio. More... | |
size_t | getBytesPerSample () const throw () |
Get the number of data bytes per sample. More... | |
bool | isValid () const throw () |
Test if this AudioFormat is valid. More... | |
bool | operator== (const AudioFormat &other) const throw () |
Equality operator. More... | |
bool | operator!= (const AudioFormat &other) const throw () |
Inequality operator. More... | |
An object that describes an audio data format.
enum Format |
AudioFormat | ( | ) |
Construct a new, ininitialized AudioFormat object.
AudioFormat | ( | Format | format, |
uint32_t | sampleRate, | ||
uint16_t | bitsPerSample, | ||
uint16_t | numChannels | ||
) | |||
throw | ( | ||
) |
Construct a new AudioFormat object with the given format parameters.
format | The format type. |
sampleRate | The sample rate, in Hz. |
bitsPerSample | The number of data bits per sample. |
numChannels | The number of discrete audio channels. |
~AudioFormat | ( | ) | ||
throw | ( | |||
) |
Destructor.
|
inline |
Get the number of data bits per sample.
size_t getBytesPerSample | ( | ) | const | |
throw | ( | |||
) |
Get the number of data bytes per sample.
|
inline |
Get the format type.
|
inline |
Get the number of discrete audio channels.
|
inline |
Get the sample rate, in Hz.
|
inline |
Test if this is single-channel (mono) audio.
|
inline |
Test if this is dual-channel (stereo) audio.
bool isValid | ( | ) | const | |
throw | ( | |||
) |
Test if this AudioFormat is valid.
|
inline |
Inequality operator.
bool operator== | ( | const AudioFormat & | other | ) | const |
throw | ( | ||||
) |
Equality operator.