43 #ifndef _audiodecoder_h
44 #define _audiodecoder_h
47 #include "Audio/audioenumerations.h"
108 case Mezzanine::Audio::BC_8Bit_Mono:
return 1;
break;
109 case Mezzanine::Audio::BC_8Bit_Stereo:
return 2;
break;
110 case Mezzanine::Audio::BC_16Bit_Mono:
return 2;
break;
111 case Mezzanine::Audio::BC_16Bit_Stereo:
return 4;
break;
112 case Mezzanine::Audio::BC_24Bit_Mono:
return 3;
break;
113 case Mezzanine::Audio::BC_24Bit_Stereo:
return 6;
break;
int32_t Int32
An 32-bit integer.
This is an interface class for the decoding of audio from a stream.
virtual UInt32 GetCurrentPosition() const =0
Gets the sounds current position in the decoded audio source.
bool Boole
Generally acts a single bit, true or false.
virtual UInt32 GetTotalSize() const =0
Gets the size of the decoded audio source in use.
All the definitions for datatypes as well as some basic conversion functions are defined here...
A simple reference counting pointer.
virtual void ClearStreamErrors()=0
Clears EoF and Fail bits from the stream if they are present.
virtual Boole IsSeekingSupported()=0
Gets whether or not seeking is supported.
virtual Boole SetPosition(Int32 Position, const Boole Relative)=0
Sets the position (in bytes) of the stream.
float Real
A Datatype used to represent a real floating point number.
virtual ~iDecoder()
Class destructor.
virtual Audio::BitConfig GetBitConfiguration() const =0
Gets the Bit Configuration used to decode the audio stream.
virtual Real GetCurrentTime() const =0
Gets the current time position in the stream.
iDecoder()
Class constructor.
virtual UInt32 ReadAudioData(void *Output, UInt32 Amount)=0
Reads from the audio stream and writes what is read to a buffer.
uint32_t UInt32
An 32-bit unsigned integer.
virtual UInt32 GetCurrentCompressedPosition() const =0
Gets the sounds current position in the encoded audio source.
virtual UInt32 GetFrequency() const =0
Gets the frequency used to decode the audio stream.
virtual Resource::DataStreamPtr GetStream() const =0
Gets the stream being decoded.
virtual Audio::Encoding GetEncoding() const =0
Gets the encoding supported by this decoder.
Encoding
The encoding to use when reading or writing an audio buffer.
virtual UInt32 GetCompressedSize() const =0
Gets the size of the encoded audio source in use.
virtual Real GetTotalTime() const =0
Gets the length of the stream in seconds.
The bulk of the engine components go in this namspace.
virtual Boole Seek(const Real Seconds, const Boole Relative)=0
Moves the current time position in the stream.
virtual Boole IsEndOfStream() const =0
Checks to see if the decode has reached the end of the stream.
virtual UInt32 GetSampleSize() const
Gets the sample size based on the decoders current configuration.
Declaration of DataStream.
virtual Boole IsValid()=0
Gets whether or not the decoder is ready to be used.
BitConfig
Used to describe the different bit configurations supported by this audio system. ...