00001
00002
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef CELT_H
00038 #define CELT_H
00039
00040 #include "celt_types.h"
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00046
00048 #define CELT_OK 0
00049
00050 #define CELT_BAD_ARG -1
00051
00052 #define CELT_INVALID_MODE -2
00053
00054 #define CELT_INTERNAL_ERROR -3
00055
00056 #define CELT_CORRUPTED_DATA -4
00057
00058
00060 #define CELT_GET_FRAME_SIZE 1000
00061
00062 #define CELT_GET_LOOKAHEAD 1001
00063
00064 #define CELT_GET_NB_CHANNELS 1002
00065
00067 #define CELT_GET_BITSTREAM_VERSION 2000
00068
00069
00075 typedef struct CELTEncoder CELTEncoder;
00076
00080 typedef struct CELTDecoder CELTDecoder;
00081
00085 typedef struct CELTMode CELTMode;
00086
00087
00089
00090
00091
00092
00103 CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int lookahead, int *error);
00104
00109 void celt_mode_destroy(CELTMode *mode);
00110
00112 int celt_mode_info(const CELTMode *mode, int request, celt_int32_t *value);
00113
00114
00115
00116
00117
00124 CELTEncoder *celt_encoder_create(const CELTMode *mode);
00125
00129 void celt_encoder_destroy(CELTEncoder *st);
00130
00144 int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, int nbCompressedBytes);
00145
00146
00147
00148
00155 CELTDecoder *celt_decoder_create(const CELTMode *mode);
00156
00160 void celt_decoder_destroy(CELTDecoder *st);
00161
00171 int celt_decode(CELTDecoder *st, unsigned char *data, int len, celt_int16_t *pcm);
00172
00173
00174
00175
00176 #ifdef __cplusplus
00177 }
00178 #endif
00179
00180 #endif