|
Public Member Functions |
| | AudioCodec (const char *n, Encoding e) |
| virtual | ~AudioCodec () |
| virtual short | getImpulse (void *data, unsigned samples=0) |
| | Get the impulse energy level of a frame of X samples in the specified codec format.
|
| virtual short | getPeak (void *data, unsigned samples=0) |
| | Get the peak energy level within the frame of X samples.
|
| virtual bool | isSilent (short threashold, void *data, unsigned samples=0) |
| | Signal if the current audio frame is silent.
|
| virtual unsigned | encode (Linear buffer, void *dest, unsigned lsamples)=0 |
| | Encode a linear sample frame into the codec sample buffer.
|
| virtual unsigned | decode (Linear buffer, void *source, unsigned lsamples)=0 |
| | Decode the sample frame into linear samples.
|
| Info | getInfo (void) |
| | Get an info description for this codec.
|
Static Public Member Functions |
| static void | endCodec (AudioCodec *codec) |
| | End use of a requested codec.
|
| static AudioCodec * | getCodec (Encoding encoding, const char *format=NULL, bool loaded=false) |
| static AudioCodec * | getCodec (Info &info, bool loaded=false) |
| static bool | load (const char *name) |
| | Load a named codec set into process memory.
|
| static bool | load (Encoding e) |
| | Find and load a codec file by it's encoding type.
|
Protected Member Functions |
| | AudioCodec () |
| virtual AudioCodec * | getByFormat (const char *format) |
| virtual AudioCodec * | getByInfo (Info &info) |
Protected Attributes |
| AudioCodec * | next |
| Encoding | encoding |
| const char * | name |
| Info | info |
Static Protected Attributes |
| static Mutex | lock |
| static AudioCodec * | first |
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.