Functions | |
| EXPORT CELTMode * | celt_mode_create (celt_int32_t Fs, int channels, int frame_size, int *error) |
| EXPORT void | celt_mode_destroy (CELTMode *mode) |
| EXPORT int | celt_mode_info (const CELTMode *mode, int request, celt_int32_t *value) |
| EXPORT CELTEncoder * | celt_encoder_create (const CELTMode *mode) |
| EXPORT void | celt_encoder_destroy (CELTEncoder *st) |
| EXPORT int | celt_encode_float (CELTEncoder *st, const float *pcm, float *optional_synthesis, unsigned char *compressed, int nbCompressedBytes) |
| EXPORT int | celt_encode (CELTEncoder *st, const celt_int16_t *pcm, celt_int16_t *optional_synthesis, unsigned char *compressed, int nbCompressedBytes) |
| EXPORT int | celt_encoder_ctl (CELTEncoder *st, int request,...) |
| EXPORT CELTDecoder * | celt_decoder_create (const CELTMode *mode) |
| EXPORT void | celt_decoder_destroy (CELTDecoder *st) |
| EXPORT int | celt_decode_float (CELTDecoder *st, unsigned char *data, int len, float *pcm) |
| EXPORT int | celt_decode (CELTDecoder *st, unsigned char *data, int len, celt_int16_t *pcm) |
| EXPORT int celt_decode | ( | CELTDecoder * | st, | |
| unsigned char * | data, | |||
| int | len, | |||
| celt_int16_t * | pcm | |||
| ) |
Decodes a frame of audio.
| st | Decoder state | |
| data | Compressed data produced by an encoder | |
| len | Number of bytes to read from "data". This MUST be exactly the number of bytes returned by the encoder. Using a larger value WILL NOT WORK. | |
| pcm | One frame (frame_size samples per channel) of decoded PCM will be returned here in 16-bit PCM format (native endian). |
| EXPORT int celt_decode_float | ( | CELTDecoder * | st, | |
| unsigned char * | data, | |||
| int | len, | |||
| float * | pcm | |||
| ) |
Decodes a frame of audio.
| st | Decoder state | |
| data | Compressed data produced by an encoder | |
| len | Number of bytes to read from "data". This MUST be exactly the number of bytes returned by the encoder. Using a larger value WILL NOT WORK. | |
| pcm | One frame (frame_size samples per channel) of decoded PCM will be returned here in float format. |
| EXPORT CELTDecoder* celt_decoder_create | ( | const CELTMode * | mode | ) |
Creates a new decoder state. Each stream needs its own decoder state (can't be shared across simultaneous streams).
| mode | Contains all the information about the characteristics of the stream (must be the same characteristics as used for the encoder) |
| EXPORT void celt_decoder_destroy | ( | CELTDecoder * | st | ) |
Destroys a a decoder state.
| st | Decoder state to be destroyed |
| EXPORT int celt_encode | ( | CELTEncoder * | st, | |
| const celt_int16_t * | pcm, | |||
| celt_int16_t * | optional_synthesis, | |||
| unsigned char * | compressed, | |||
| int | nbCompressedBytes | |||
| ) |
Encodes a frame of audio.
| st | Encoder state | |
| pcm | PCM audio in signed 16-bit format (native endian). There must be exactly frame_size samples per channel. The input data is overwritten by a copy of what the remote decoder would decode. | |
| optional_synthesis | If not NULL, the encoder copies the audio signal that the decoder would decode. It is the same as calling the decoder on the compressed data, just faster. | |
| compressed | The compressed data is written here | |
| nbCompressedBytes | Number of bytes to use for compressing the frame (can change from one frame to another) |
| EXPORT int celt_encode_float | ( | CELTEncoder * | st, | |
| const float * | pcm, | |||
| float * | optional_synthesis, | |||
| unsigned char * | compressed, | |||
| int | nbCompressedBytes | |||
| ) |
Encodes a frame of audio.
| st | Encoder state | |
| pcm | PCM audio in signed float format. There must be exactly frame_size samples per channel. The input data is overwritten by a copy of what the remote decoder would decode. | |
| optional_synthesis | If not NULL, the encoder copies the audio signal that the decoder would decode. It is the same as calling the decoder on the compressed data, just faster. | |
| compressed | The compressed data is written here | |
| nbCompressedBytes | Number of bytes to use for compressing the frame (can change from one frame to another) |
| EXPORT CELTEncoder* celt_encoder_create | ( | const CELTMode * | mode | ) |
Creates a new encoder state. Each stream needs its own encoder state (can't be shared across simultaneous streams).
| mode | Contains all the information about the characteristics of the stream (must be the same characteristics as used for the decoder) |
| EXPORT int celt_encoder_ctl | ( | CELTEncoder * | st, | |
| int | request, | |||
| ... | ||||
| ) |
Query and set encoder parameters
| st | Encoder state | |
| request | Parameter to change or query | |
| value | Pointer to a 32-bit int value |
| EXPORT void celt_encoder_destroy | ( | CELTEncoder * | st | ) |
Destroys a an encoder state.
| st | Encoder state to be destroyed |
| EXPORT CELTMode* celt_mode_create | ( | celt_int32_t | Fs, | |
| int | channels, | |||
| int | frame_size, | |||
| int * | error | |||
| ) |
Creates a new mode struct. This will be passed to an encoder or decoder. The mode MUST NOT BE DESTROYED until the encoders and decoders that use it are destroyed as well.
| Fs | Sampling rate (32000 to 96000 Hz) | |
| channels | Number of channels | |
| frame_size | Number of samples (per channel) to encode in each packet (64 - 256) | |
| lookahead | Extra latency (in samples per channel) in addition to the frame size (between 32 and frame_size). The larger that value, the better the quality (at the expense of latency) | |
| error | Returned error code (if NULL, no error will be returned) |
| EXPORT void celt_mode_destroy | ( | CELTMode * | mode | ) |
Destroys a mode struct. Only call this after all encoders and decoders using this mode are destroyed as well.
| mode | Mode to be destroyed |
| EXPORT int celt_mode_info | ( | const CELTMode * | mode, | |
| int | request, | |||
| celt_int32_t * | value | |||
| ) |
Query information from a mode
1.5.8