This is an interface class for the decoding of audio from a stream.
More...
#include <decoder.h>
This is an interface class for the decoding of audio from a stream.
Definition at line 59 of file decoder.h.
virtual void Mezzanine::Audio::iDecoder::ClearStreamErrors |
( |
| ) |
|
|
protectedpure virtual |
Clears EoF and Fail bits from the stream if they are present.
virtual Audio::BitConfig Mezzanine::Audio::iDecoder::GetBitConfiguration |
( |
| ) |
const |
|
pure virtual |
Gets the Bit Configuration used to decode the audio stream.
- Returns
- Returns the Bit Configuration currently being used to decode this stream.
virtual UInt32 Mezzanine::Audio::iDecoder::GetCompressedSize |
( |
| ) |
const |
|
pure virtual |
Gets the size of the encoded audio source in use.
- Returns
- Returns the size of the encoded audio source.
virtual UInt32 Mezzanine::Audio::iDecoder::GetCurrentCompressedPosition |
( |
| ) |
const |
|
pure virtual |
Gets the sounds current position in the encoded audio source.
- Returns
- Returns the current position in the encoded audio source in bytes.
virtual UInt32 Mezzanine::Audio::iDecoder::GetCurrentPosition |
( |
| ) |
const |
|
pure virtual |
Gets the sounds current position in the decoded audio source.
- Returns
- Returns the current position in the decoded audio source in bytes.
virtual Real Mezzanine::Audio::iDecoder::GetCurrentTime |
( |
| ) |
const |
|
pure virtual |
Gets the current time position in the stream.
- Returns
- Returns the current position in the stream in seconds.
Gets the encoding supported by this decoder.
- Returns
- Returns an Audio::Encoding value representing the encoding supported by this decoder.
virtual UInt32 Mezzanine::Audio::iDecoder::GetFrequency |
( |
| ) |
const |
|
pure virtual |
Gets the frequency used to decode the audio stream.
- Returns
- Returns the frequency (or sample rate) currently being used to decode this stream.
virtual UInt32 Mezzanine::Audio::iDecoder::GetSampleSize |
( |
| ) |
const |
|
inlinevirtual |
Gets the sample size based on the decoders current configuration.
- Returns
- Returns a UInt32 representing the size of a single sample from the underlying stream.
Definition at line 104 of file decoder.h.
Gets the stream being decoded.
- Returns
- Returns a shared pointer to the DataStream being decoded.
virtual UInt32 Mezzanine::Audio::iDecoder::GetTotalSize |
( |
| ) |
const |
|
pure virtual |
Gets the size of the decoded audio source in use.
- Returns
- Returns the size of the decoded audio source.
virtual Real Mezzanine::Audio::iDecoder::GetTotalTime |
( |
| ) |
const |
|
pure virtual |
Gets the length of the stream in seconds.
- Returns
- Returns the total amount of time needed to playback the sound in seconds.
virtual Boole Mezzanine::Audio::iDecoder::IsEndOfStream |
( |
| ) |
const |
|
pure virtual |
Checks to see if the decode has reached the end of the stream.
- Returns
- Returns true if all of the data in the stream has been decoded, false otherwise.
virtual Boole Mezzanine::Audio::iDecoder::IsSeekingSupported |
( |
| ) |
|
|
pure virtual |
Gets whether or not seeking is supported.
- Returns
- Returns true if you can skip to a specific point in the stream, false if you are stuck waiting.
virtual Boole Mezzanine::Audio::iDecoder::IsValid |
( |
| ) |
|
|
pure virtual |
Gets whether or not the decoder is ready to be used.
- Note
- On failure the issue likely lies with the stream being an improper format/encoding.
- Returns
- Returns true if this decoder is ready for playback, false otherwise.
virtual UInt32 Mezzanine::Audio::iDecoder::ReadAudioData |
( |
void * |
Output, |
|
|
UInt32 |
Amount |
|
) |
| |
|
pure virtual |
Reads from the audio stream and writes what is read to a buffer.
- Parameters
-
Output | The buffer to write to when reading the audio stream. |
Amount | The number of bytes desired to be read from the audio stream. |
- Returns
- Returns the number of bytes successfully read from the audio stream.
virtual Boole Mezzanine::Audio::iDecoder::Seek |
( |
const Real |
Seconds, |
|
|
const Boole |
Relative |
|
) |
| |
|
pure virtual |
Moves the current time position in the stream.
- Parameters
-
Seconds | The position in seconds to move to in the stream. |
Relative | Whether or not to move from the current position. If false this will seek from the beginning. |
- Returns
- Returns true if the position was successfully moved, false otherwise.
virtual Boole Mezzanine::Audio::iDecoder::SetPosition |
( |
Int32 |
Position, |
|
|
const Boole |
Relative |
|
) |
| |
|
pure virtual |
Sets the position (in bytes) of the stream.
- Parameters
-
Position | The number of bytes to move(if relative) or the actual position in the stream to set. |
Relative | Whether or not to move from the current position. If false this will set from the beginning. |
- Returns
- Returns true if the position was successfully set, false otherwise.
The documentation for this class was generated from the following file:
- /home/sqeaky/Code/MezzanineFresh/Mezzanine/src/Audio/decoder.h