#include <audio.h>
Inheritance diagram for AudioCodec::
Public Methods | |
virtual void | Encode (unsigned short *buffer, unsigned samples=0, int channel=0)=0 |
Encode a linear sample frame into the codec sample buffer. More... | |
virtual bool | Encode (AudioSample *sample)=0 |
Encode an "AudioSamples" object into the new encoding scheme if conversion is supported. More... | |
virtual unsigned | Decode (unsigned short *buffer, int channel=0)=0 |
Decode the sample frame into linear samples. More... | |
virtual bool | Decode (AudioSample *sample)=0 |
Decode into an :AudioSample" if the conversion is supported. More... | |
virtual unsigned | Load (unsigned char *data, unsigned length) |
Load a codec from a byte stream data source. More... | |
virtual unsigned | Save (unsigned char *data, unsigned length) |
Save a codec to a byte stream data source. More... | |
unsigned | getLength (void) |
Get current number of samples of data, based on load or encode. More... | |
unsigned | getFrameSize (void) |
Get size of the audio frame. More... | |
virtual unsigned | getChannels (void) |
Check if stereo/multi-channel codec. More... | |
Protected Methods | |
AudioCodec (unsigned frames, audioencoding_t encoding, unsigned rate) | |
Protected Attributes | |
unsigned | length |
This class is only abstract and describes the core interface for loadable codec modules. This class is normally merged with AudioSample. A derived AudioCodecXXX will typically include a AudioRegisterXXX static class to automatically initialize and register the codec with the codec registry.
|
|
|
Decode into an :AudioSample" if the conversion is supported.
|
|
Decode the sample frame into linear samples.
|
|
Encode an "AudioSamples" object into the new encoding scheme if conversion is supported.
|
|
Encode a linear sample frame into the codec sample buffer.
|
|
Load a codec from a byte stream data source. This is used for streaming of compressed codec's where frames are of irregular sizes.
|
|
Save a codec to a byte stream data source. This is used for streaming of compressed codec's where frames are of irregular sizes.
|
|
Check if stereo/multi-channel codec.
|
|
Get size of the audio frame.
|
|
Get current number of samples of data, based on load or encode.
|
|
|