CSoundCodec Class Reference
The class that is used for encoding and decoding sound data.
More...
#include <SoundModule.h>
List of all members.
|
Public Member Functions |
void | Init (int mode, const char *options) |
int | Encode (const ALbyte *data, int len, ALbyte *out) |
int | Decode (const ALbyte *data, int len, ALbyte *out) |
void | Destroy () |
| Destroys the codec.
|
Detailed Description
The class that is used for encoding and decoding sound data.
Member Function Documentation
void CSoundCodec::Init |
( |
int |
mode, |
|
|
const char * |
options | |
|
) |
| | |
Initializes the codec.
- Parameters:
-
| mode | Either CODEC_MODE_ENCODE or CODEC_MODE_DECODE denoting whether this is an encoder or decoder. |
| options | The sound options string. Refer to the design report. |
int CSoundCodec::Encode |
( |
const ALbyte * |
data, |
|
|
int |
len, |
|
|
ALbyte * |
out | |
|
) |
| | |
Encodes sound data. Codec should be initialized as encoder befoer calling this.
- Parameters:
-
| data | The address of the data to be encoded. |
| len | The length of the data to be encoded in bytes. |
| out | The address of teh memory area which the encoded data will be placed. |
- Returns:
- The length of encoded data in bytes.
int CSoundCodec::Decode |
( |
const ALbyte * |
data, |
|
|
int |
len, |
|
|
ALbyte * |
out | |
|
) |
| | |
Decodes sound data. Codec should be initialized as decoder befoer calling this.
- Parameters:
-
| data | The address of the data to be decoded. |
| len | The length of the data to be decoded in bytes. |
| out | The address of teh memory area which the decoded data will be placed. |
- Returns:
- The length of decoded data in bytes.
The documentation for this class was generated from the following file: