AVBlocks for C++
1.9
Audio and Video Software Development Kit
|
AudioStreamInfo describes an elementary audio stream. More...
Inherits StreamInfo.
Public Member Functions | |
virtual int32_t | pcmFlags () const =0 |
Returns the audio format flags which describe various properties of the audio stream. | |
virtual void | setPcmFlags (int32_t flags)=0 |
Sets the audio format flags which describe various properties of the audio stream. | |
virtual int32_t | channels () const =0 |
Returns the number of audio channels. | |
virtual void | setChannels (int32_t numChannels)=0 |
Sets the number of audio channels. | |
virtual int32_t | channelLayout () const =0 |
Returns the channel layout which defines the mapping between channels and speakers. | |
virtual void | setChannelLayout (int32_t channelLayout)=0 |
Sets the channel layout which defines the mapping between channels and speakers. | |
virtual int32_t | sampleRate () const =0 |
Returns the audio sample rate. | |
virtual void | setSampleRate (int32_t sampleRate)=0 |
Sets the audio sample rate. | |
virtual int32_t | bitsPerSample () const =0 |
Returns the number of bits per sample (sample resolution). | |
virtual void | setBitsPerSample (int32_t bitsPerSample)=0 |
Sets the number of bits per sample (sample resolution). | |
virtual int32_t | bytesPerFrame () const =0 |
Returns the number of bytes occupied by an audio frame (smallest discrete unit). | |
virtual void | setBytesPerFrame (int32_t bytesPerFrame)=0 |
Sets the number of bytes occupied by an audio frame (smallest discrete unit). | |
virtual bool_t | copyTo (AudioStreamInfo *destination) const =0 |
Copies the state of the current object to a destination object of the same type. | |
virtual AudioStreamInfo * | clone () const =0 |
Creates a copy of this object. | |
Protected Member Functions | |
~AudioStreamInfo () | |
This object can be destroyed only by its implementation. |
AudioStreamInfo describes an elementary audio stream.
~AudioStreamInfo | ( | ) | [protected] |
This object can be destroyed only by its implementation.
The caller must use Reference::release.
virtual int32_t bitsPerSample | ( | ) | const [pure virtual] |
Returns the number of bits per sample (sample resolution).
Normally bits per sample is not defined for a compressed audio stream and is 0. However it is possible for a compressed audio stream to return a positive value as an indication of audio quality. It can also designate the bits per sample of the LPCM stream once the compressed stream is decoded.
virtual int32_t bytesPerFrame | ( | ) | const [pure virtual] |
Returns the number of bytes occupied by an audio frame (smallest discrete unit).
A frame is the smallest unit in an audio stream. It may contain one or more samples. Depending on the audio stream type the frame may contain fixed or variable number of samples.
For compressed streams the frame size is variable even if there are fixed number of samples in each frame. In this case bytes per frame is 0.
For an LCPM stream the frame size is constant. In this case bytes per frame is a positive value. Normally for interleaved LPCM streams the following is true:
virtual int32_t channelLayout | ( | ) | const [pure virtual] |
Returns the channel layout which defines the mapping between channels and speakers.
virtual int32_t channels | ( | ) | const [pure virtual] |
Returns the number of audio channels.
virtual AudioStreamInfo* clone | ( | ) | const [pure virtual] |
Creates a copy of this object.
Implements StreamInfo.
virtual bool_t copyTo | ( | AudioStreamInfo * | destination | ) | const [pure virtual] |
Copies the state of the current object to a destination object of the same type.
The reference count of the source and the destination is not modified.
destination | [out] A pointer to the destination object |
virtual int32_t pcmFlags | ( | ) | const [pure virtual] |
Returns the audio format flags which describe various properties of the audio stream.
virtual int32_t sampleRate | ( | ) | const [pure virtual] |
Returns the audio sample rate.
virtual void setBitsPerSample | ( | int32_t | bitsPerSample | ) | [pure virtual] |
Sets the number of bits per sample (sample resolution).
bitsPerSample | (usually 8, 16, 24 or 32) |
virtual void setBytesPerFrame | ( | int32_t | bytesPerFrame | ) | [pure virtual] |
Sets the number of bytes occupied by an audio frame (smallest discrete unit).
bytesPerFrame | [in] Specifies how many bytes are occupied by each audio frame. Normally it is valid (greater than 0) for LPCM streams and invalid (0) for compressed audio streams. |
virtual void setChannelLayout | ( | int32_t | channelLayout | ) | [pure virtual] |
Sets the channel layout which defines the mapping between channels and speakers.
channelLayout | A combination of flags defined in the AudioChannelFlags::Enum. |
virtual void setChannels | ( | int32_t | numChannels | ) | [pure virtual] |
Sets the number of audio channels.
numChannels | number of channels. |
virtual void setPcmFlags | ( | int32_t | flags | ) | [pure virtual] |
Sets the audio format flags which describe various properties of the audio stream.
flags | A combination of flags defined in PcmFlags::Enum. |
virtual void setSampleRate | ( | int32_t | sampleRate | ) | [pure virtual] |
Sets the audio sample rate.
sampleRate | sample rate (Hz) |