HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
|
stores the properties of the audio signals More...
#include <AudioFormatInfo.h>
Public Member Functions | |
AudioFormatInfo () | |
AudioFormatInfo (uint16_t formatTag, uint16_t bitsPerSample, AudioChannelLayout chLayout, uint32_t sampleRate) | |
AudioFormatInfo (uint16_t formatTag, uint16_t bitsPerSample, AudioChannelLayout chLayout, uint32_t sampleRate, uint32_t bitRate) | |
AudioFormatInfo (uint16_t formatTag, uint16_t bitsPerSample, AudioChannelLayout chLayout, uint32_t sampleRate, Heph::Endian endian) | |
AudioFormatInfo (uint16_t formatTag, uint16_t bitsPerSample, AudioChannelLayout chLayout, uint32_t sampleRate, uint32_t bitRate, Heph::Endian endian) | |
bool | operator== (const AudioFormatInfo &rhs) const |
bool | operator!= (const AudioFormatInfo &rhs) const |
uint16_t | FrameSize () const |
uint32_t | ByteRate () const |
Static Public Member Functions | |
static uint32_t | CalculateBitrate (const AudioFormatInfo &formatInfo) |
Public Attributes | |
uint16_t | formatTag |
uint16_t | bitsPerSample |
AudioChannelLayout | channelLayout |
stores information about the channel layout. | |
uint32_t | sampleRate |
uint32_t | bitRate |
Heph::Endian | endian |
stores the properties of the audio signals
HephAudio::AudioFormatInfo::AudioFormatInfo | ( | ) |
creates a new instance and initializes it with default values.
HephAudio::AudioFormatInfo::AudioFormatInfo | ( | uint16_t | formatTag, |
uint16_t | bitsPerSample, | ||
AudioChannelLayout | chLayout, | ||
uint32_t | sampleRate ) |
creates a new instance and initializes it with the provided values.
formatTag | tag of the format that audio data is encoded with. |
bitsPerSample | bit depth, the number of bits required to represent a sample. |
chLayout | stores information about the channel layout. |
sampleRate | samples per second, the number of samples required to represent a one-second-long audio signal. |
HephAudio::AudioFormatInfo::AudioFormatInfo | ( | uint16_t | formatTag, |
uint16_t | bitsPerSample, | ||
AudioChannelLayout | chLayout, | ||
uint32_t | sampleRate, | ||
uint32_t | bitRate ) |
creates a new instance and initializes it with the provided values.
formatTag | tag of the format that audio data is encoded with. |
bitsPerSample | bit depth, the number of bits required to represent a sample. |
chLayout | stores information about the channel layout. |
sampleRate | samples per second, the number of samples required to represent a one-second-long audio signal. |
bitRate | bits per second, the number of bits required to represent a one-second-long audio signal. |
HephAudio::AudioFormatInfo::AudioFormatInfo | ( | uint16_t | formatTag, |
uint16_t | bitsPerSample, | ||
AudioChannelLayout | chLayout, | ||
uint32_t | sampleRate, | ||
Heph::Endian | endian ) |
creates a new instance and initializes it with the provided values.
formatTag | tag of the format that audio data is encoded with. |
bitsPerSample | bit depth, the number of bits required to represent a sample. |
chLayout | stores information about the channel layout. |
sampleRate | samples per second, the number of samples required to represent a one-second-long audio signal. |
endian | endianness of the audio samples. |
HephAudio::AudioFormatInfo::AudioFormatInfo | ( | uint16_t | formatTag, |
uint16_t | bitsPerSample, | ||
AudioChannelLayout | chLayout, | ||
uint32_t | sampleRate, | ||
uint32_t | bitRate, | ||
Heph::Endian | endian ) |
creates a new instance and initializes it with the provided values.
formatTag | tag of the format that audio data is encoded with. |
bitsPerSample | bit depth, the number of bits required to represent a sample. |
chLayout | stores information about the channel layout. |
sampleRate | samples per second, the number of samples required to represent a one-second-long audio signal. |
bitRate | bits per second, the number of bits required to represent a one-second-long audio signal. |
endian | endianness of the audio samples. |
uint16_t HephAudio::AudioFormatInfo::FrameSize | ( | ) | const |
calculates the size of an audio frame in bytes.
uint32_t HephAudio::AudioFormatInfo::ByteRate | ( | ) | const |
calculates the number of bytes required to represent a one-second-long audio signal.
|
static |
calculates the bitrate of the PCM, IEEE_FLOAT, ALAW, and MULAW codecs.
uint16_t HephAudio::AudioFormatInfo::formatTag |
tag of the format that audio data is encoded with.
uint16_t HephAudio::AudioFormatInfo::bitsPerSample |
bit depth, the number of bits required to represent a sample.
AudioChannelLayout HephAudio::AudioFormatInfo::channelLayout |
stores information about the channel layout.
uint32_t HephAudio::AudioFormatInfo::sampleRate |
samples per second, the number of samples required to represent a one-second-long audio signal.
uint32_t HephAudio::AudioFormatInfo::bitRate |
bits per second, the number of bits required to represent a one-second-long audio signal.
Heph::Endian HephAudio::AudioFormatInfo::endian |
endianness of the audio samples.