RTP Audio System
2.0.0
|
Audio Quality. More...
#include <audioquality.h>
Audio Quality.
This class manages audio quality.
Default constructor.
AudioQuality::AudioQuality | ( | const card16 | samplingRate, |
const card8 | bits, | ||
const card8 | channels, | ||
const card16 | byteOrder = BYTE_ORDER |
||
) |
Constructor for new AudioQuality object with given quality
samplingRate | SamplingRate. |
bits | Number of bits. |
channels | Number of channels. |
byteOrder | Byte order: BIG_ENDIAN, LITTLE_ENDIAN. |
AudioQuality::AudioQuality | ( | const AudioQualityInterface & | quality | ) |
Constructor for new AudioQuality object from given AudioQualityInterface
quality | AudioQualityInterface. |
card64 AudioQuality::bytesToTime | ( | const size_t | bytes | ) | const [inline] |
Convert bytes to microseconds.
void AudioQuality::decrease | ( | const cardinal | setps | ) |
Decrease quality by given number of steps. The number of steps available is given by QualityLevels constant.
steps | Number of steps. |
card8 AudioQuality::getBits | ( | ) | const [virtual] |
getBits() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
cardinal AudioQuality::getBitsPerSample | ( | ) | const [virtual] |
getBitsPerSample() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
card16 AudioQuality::getByteOrder | ( | ) | const [virtual] |
getByteOrder() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
cardinal AudioQuality::getBytesPerSecond | ( | ) | const [virtual] |
getBytesPerSecond() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
card8 AudioQuality::getChannels | ( | ) | const [virtual] |
getChannels() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
AudioQuality AudioQuality::getQualityForByteRate | ( | const cardinal | bps | ) | [static] |
Get maximum audio quality for a given byte rate.
bps | Bytes per second. |
AudioQuality AudioQuality::getRandomQuality | ( | Randomizer * | randomizer | ) | [static] |
Get a random quality setting. All settings have the same probability.
card16 AudioQuality::getSamplingRate | ( | ) | const [virtual] |
getSamplingRate() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
void AudioQuality::increase | ( | const cardinal | steps | ) |
Increase quality by given number of steps. The number of steps available is given by QualityLevels constant.
steps | Number of steps. |
bool AudioQuality::isHighest | ( | ) | const [inline] |
Check, if quality is highest quality.
bool AudioQuality::isLowest | ( | ) | const [inline] |
Check, if quality is lowest quality.
bool AudioQuality::nextSamplingRate | ( | ) |
Set sampling rate to next higher value.
AudioQuality AudioQuality::operator++ | ( | int | ) |
Implementation of ++ operator.
AudioQuality AudioQuality::operator-- | ( | int | ) |
Implementation of -- operator.
AudioQuality & AudioQuality::operator= | ( | const AudioQualityInterface & | quality | ) |
Implementation of = operator.
bool AudioQuality::prevSamplingRate | ( | ) |
Set sampling rate to next lower value.
card8 AudioQuality::setBits | ( | const card8 | bits | ) | [virtual] |
setBits() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
card16 AudioQuality::setByteOrder | ( | const card16 | byteOrder | ) | [virtual] |
setByteOrder() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
card8 AudioQuality::setChannels | ( | const card8 | channels | ) | [virtual] |
setChannels() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
card16 AudioQuality::setSamplingRate | ( | const card16 | samplingRate | ) | [virtual] |
setSamplingRate() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
size_t AudioQuality::timeToBytes | ( | const card64 | microseconds | ) | const [inline] |
Convert microseconds to bytes.
card8 AudioQuality::Bits [private] |
card16 AudioQuality::ByteOrder [private] |
card8 AudioQuality::Channels [private] |
const card8 AudioQuality::HighestBits = 16 [static] |
Constant for highest number of bits.
const card8 AudioQuality::HighestChannels = 2 [static] |
Constant for highest number of channels.
const AudioQuality AudioQuality::HighestQuality = AudioQuality(44100,16,2,BYTE_ORDER) [static] |
Constant for highest quality.
const card16 AudioQuality::HighestSamplingRate = 44100 [static] |
Constant for highest sampling rate.
const card8 AudioQuality::LowestBits = 4 [static] |
Constant for lowest number of bits.
const card8 AudioQuality::LowestChannels = 1 [static] |
Constant for lowest number of channels.
const AudioQuality AudioQuality::LowestQuality = AudioQuality(4410,4,1,BYTE_ORDER) [static] |
Constant for lowest quality.
const card16 AudioQuality::LowestSamplingRate = 4410 [static] |
Constant for lowest sampling rate.
const cardinal AudioQuality::QualityLevels = 23 [static] |
Number of quality levels supported by operator++/operator--.
card16 AudioQuality::SamplingRate [private] |
const cardinal AudioQuality::ValidBits [static] |
sizeof(_ValidBitsTable) / sizeof(card8)
Number of valid bits values in ValidRatesTable.
const card8 * AudioQuality::ValidBitsTable = (const card8*)&_ValidBitsTable [static] |
Table with valid bit values.
const cardinal AudioQuality::ValidChannels [static] |
sizeof(_ValidChannelsTable) / sizeof(card8)
Number of valid channels values in ValidRatesTable.
const card8 * AudioQuality::ValidChannelsTable = (const card8*)&_ValidChannelsTable [static] |
Table with valid channel values.
const cardinal AudioQuality::ValidRates [static] |
sizeof(_ValidRatesTable) / sizeof(card16)
Number of valid sampling rates in ValidRatesTable.
const card16 * AudioQuality::ValidRatesTable = (const card16*)&_ValidRatesTable [static] |
Table with valid sampling rate values.