class AudioQuality

Audio Quality. More...

Full nameCoral::AudioQuality
Definition#include <audioquality.h>
InheritsCoral::AdjustableAudioQualityInterface [virtual public]
Inherited byAdvancedAudioEncoder, AudioNull, MP3AudioReader, MultiAudioReader, SimpleAudioEncoder, WavAudioReader
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


Detailed Description

This class manages audio quality.

AudioQuality ()

Default constructor.

AudioQuality (const card16 samplingRate, const card8 bits, const card8 channels, const card16 byteOrder = BYTE_ORDER)

Constructor for new AudioQuality object with given quality

Parameters:
samplingRateSamplingRate.
bitsNumber of bits.
channelsNumber of channels.
byteOrderByte order: BIG_ENDIAN, LITTLE_ENDIAN.

AudioQuality (const AudioQualityInterface& quality)

Constructor for new AudioQuality object from given AudioQualityInterface

Parameters:
qualityAudioQualityInterface.

card16 getSamplingRate ()
[const]

getSamplingRate() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getSamplingRate

Reimplemented from AudioQualityInterface

card8 getBits ()
[const]

getBits() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getBits

Reimplemented from AudioQualityInterface

card8 getChannels ()
[const]

getChannels() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getChannels

Reimplemented from AudioQualityInterface

card16 getByteOrder ()
[const]

getByteOrder() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getByteOrder

Reimplemented from AudioQualityInterface

cardinal getBytesPerSecond ()
[const]

getBytesPerSecond() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getBytesPerSecond

Reimplemented from AudioQualityInterface

cardinal getBitsPerSample ()
[const]

getBitsPerSample() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getBitsPerSample

Reimplemented from AudioQualityInterface

card16 setSamplingRate (const card16 samplingRate)

setSamplingRate() Implementation of AdjustableAudioQualityInterface.

See also: AdjustableAudioQualityInterface#setSamplingRate

Reimplemented from AdjustableAudioQualityInterface

card8 setBits (const card8 bits)

setBits() Implementation of AdjustableAudioQualityInterface.

See also: AdjustableAudioQualityInterface#setBits

Reimplemented from AdjustableAudioQualityInterface

card8 setChannels (const card8 channels)

setChannels() Implementation of AdjustableAudioQualityInterface.

See also: AdjustableAudioQualityInterface#setChannels

Reimplemented from AdjustableAudioQualityInterface

card16 setByteOrder (const card16 byteOrder)

setByteOrder() Implementation of AdjustableAudioQualityInterface.

See also: AdjustableAudioQualityInterface#setByteOrder

Reimplemented from AdjustableAudioQualityInterface

inline bool isLowest ()
[const]

Check, if quality is lowest quality.

Returns: true, if quality is lowest; false otherwise.

inline bool isHighest ()
[const]

Check, if quality is highest quality.

Returns: true, is quality is highest; false otherwise.

void increase (const cardinal steps)

Increase quality by given number of steps. The number of steps available is given by QualityLevels constant.

Parameters:
stepsNumber of steps.

void decrease (const cardinal setps)

Decrease quality by given number of steps. The number of steps available is given by QualityLevels constant.

Parameters:
stepsNumber of steps.

bool prevSamplingRate ()

Set sampling rate to next lower value.

Returns: true, if sampling rate has been set; false, if it was already lowest.

bool nextSamplingRate ()

Set sampling rate to next higher value.

Returns: true, if sampling rate has been set; false, if it was already highest.

inline card64 bytesToTime (const size_t bytes)
[const]

Convert bytes to microseconds.

inline size_t timeToBytes (const card64 microseconds)
[const]

Convert microseconds to bytes.

AudioQuality& operator= (const AudioQualityInterface& quality)

Implementation of = operator.

AudioQuality operator++ (int)

Implementation of ++ operator.

AudioQuality operator-- (int)

Implementation of -- operator.

AudioQuality getQualityForByteRate (const cardinal bps)
[static]

Get maximum audio quality for a given byte rate.

Parameters:
bpsBytes per second.

Returns: AudioQuality.

AudioQuality getRandomQuality (Randomizer* randomizer)
[static]

Get a random quality setting. All settings have the same probability.

Returns: Random quality setting.

static const card16* ValidRatesTable

Table with valid sampling rate values.

static const cardinal ValidRates

Number of valid sampling rates in ValidRatesTable.

static const card8* ValidBitsTable

Table with valid bit values.

static const cardinal ValidBits

Number of valid bits values in ValidRatesTable.

static const card8* ValidChannelsTable

Table with valid channel values.

static const cardinal ValidChannels

Number of valid channels values in ValidRatesTable.

static const AudioQuality LowestQuality

Constant for lowest quality.

static const AudioQuality HighestQuality

Constant for highest quality.

static const card16 LowestSamplingRate

Constant for lowest sampling rate.

static const card16 HighestSamplingRate

Constant for highest sampling rate.

static const card8 LowestBits

Constant for lowest number of bits.

static const card8 HighestBits

Constant for highest number of bits.

static const card8 LowestChannels

Constant for lowest number of channels.

static const card8 HighestChannels

Constant for highest number of channels.

static const cardinal QualityLevels

Number of quality levels supported by operator++/operator--.