speex.h   speex.h 
skipping to change at line 57 skipping to change at line 57
#define SPEEX_GET_VBR_QUALITY 15 #define SPEEX_GET_VBR_QUALITY 15
#define SPEEX_SET_COMPLEXITY 16 #define SPEEX_SET_COMPLEXITY 16
#define SPEEX_GET_COMPLEXITY 17 #define SPEEX_GET_COMPLEXITY 17
/*Would be SPEEX_SET_FRAME_SIZE, but it's (currently) invalid*/ /*Would be SPEEX_SET_FRAME_SIZE, but it's (currently) invalid*/
#define SPEEX_GET_BITRATE 19 #define SPEEX_GET_BITRATE 19
/* Preserving compatibility:*/ /* Preserving compatibility:*/
#define SPEEX_SET_PF 0 #define SPEEX_SET_PF 0
#define SPEEX_GET_PF 1 #define SPEEX_GET_PF 1
/* Values allowed for mode queries */
#define SPEEX_MODE_FRAME_SIZE 0
#define SPEEX_SUBMODE_BITS_PER_FRAME 1
#define SPEEX_NB_MODES 2 #define SPEEX_NB_MODES 2
struct SpeexMode; struct SpeexMode;
/* Prototypes for mode function pointers */ /* Prototypes for mode function pointers */
typedef void *(*encoder_init_func)(struct SpeexMode *mode); typedef void *(*encoder_init_func)(struct SpeexMode *mode);
typedef void (*encoder_destroy_func)(void *st); typedef void (*encoder_destroy_func)(void *st);
typedef void (*encode_func)(void *state, float *in, SpeexBits *bits); typedef void (*encode_func)(void *state, float *in, SpeexBits *bits);
typedef void *(*decoder_init_func)(struct SpeexMode *mode); typedef void *(*decoder_init_func)(struct SpeexMode *mode);
typedef void (*decoder_destroy_func)(void *st); typedef void (*decoder_destroy_func)(void *st);
typedef void (*decode_func)(void *state, SpeexBits *bits, float *out, int l ost); typedef int (*decode_func)(void *state, SpeexBits *bits, float *out);
typedef void (*encoder_ctl_func)(void *state, int request, void *ptr); typedef void (*encoder_ctl_func)(void *state, int request, void *ptr);
typedef void (*decoder_ctl_func)(void *state, int request, void *ptr); typedef void (*decoder_ctl_func)(void *state, int request, void *ptr);
typedef void (*mode_query_func)(void *mode, int request, void *ptr);
/** Struct defining a Speex mode */ /** Struct defining a Speex mode */
typedef struct SpeexMode { typedef struct SpeexMode {
/** Pointer to the low-level mode data */ /** Pointer to the low-level mode data */
void *mode; void *mode;
/** Pointer to the mode query function */
mode_query_func query;
/** The name of the mode (you should not rely on this to identify the mo de)*/ /** The name of the mode (you should not rely on this to identify the mo de)*/
char *modeName; char *modeName;
/**ID of the mode*/ /**ID of the mode*/
int modeID; int modeID;
/**Version number of the bitstream (incremented every time we break /**Version number of the bitstream (incremented every time we break
bitstream compatibility*/ bitstream compatibility*/
int bitstream_version; int bitstream_version;
skipping to change at line 110 skipping to change at line 119
/** Pointer to frame decoding function */ /** Pointer to frame decoding function */
decode_func dec; decode_func dec;
/** ioctl-like requests for encoder */ /** ioctl-like requests for encoder */
encoder_ctl_func enc_ctl; encoder_ctl_func enc_ctl;
/** ioctl-like requests for decoder */ /** ioctl-like requests for decoder */
decoder_ctl_func dec_ctl; decoder_ctl_func dec_ctl;
/** Frame size used for the mode*/
int frame_size;
/** Bit-rate for the mode (highest in case of VBR) */
int bitrate;
/** VBR info (currently 0 for constant bit-rate and 1 for VBR) */
int vbr;
} SpeexMode; } SpeexMode;
/**Returns a handle to a newly created Speex encoder state structure. For n ow, the /**Returns a handle to a newly created Speex encoder state structure. For n ow, the
"mode" arguent can be &nb_mode or &wb_mode . In the future, more modes m ay be "mode" arguent can be &nb_mode or &wb_mode . In the future, more modes m ay be
added. Note that for now if you have more than one channels to encode, y ou need added. Note that for now if you have more than one channels to encode, y ou need
one state per channel.*/ one state per channel.*/
void *speex_encoder_init(SpeexMode *mode); void *speex_encoder_init(SpeexMode *mode);
/** Frees all resources associated to an existing Speex encoder state. */ /** Frees all resources associated to an existing Speex encoder state. */
void speex_encoder_destroy(void *state); void speex_encoder_destroy(void *state);
skipping to change at line 148 skipping to change at line 148
arguent can be &nb_mode or &wb_mode . In the future, more modes may be added. arguent can be &nb_mode or &wb_mode . In the future, more modes may be added.
Note that for now if you have more than one channels to decode, you nee d one Note that for now if you have more than one channels to decode, you nee d one
state per channel. */ state per channel. */
void *speex_decoder_init(SpeexMode *mode); void *speex_decoder_init(SpeexMode *mode);
/** Frees all resources associated to an existing decoder state. */ /** Frees all resources associated to an existing decoder state. */
void speex_decoder_destroy(void *state); void speex_decoder_destroy(void *state);
/** Uses an existing decoder state to decode one frame of speech from bit-s tream /** Uses an existing decoder state to decode one frame of speech from bit-s tream
bits. The output speech is saved written to out. */ bits. The output speech is saved written to out. */
void speex_decode(void *state, SpeexBits *bits, float *out, int lost); int speex_decode(void *state, SpeexBits *bits, float *out);
/** Used like the ioctl function to control the encoder parameters */ /** Used like the ioctl function to control the encoder parameters */
void speex_decoder_ctl(void *state, int request, void *ptr); void speex_decoder_ctl(void *state, int request, void *ptr);
/** Query function for mode information */
void speex_mode_query(SpeexMode *mode, int request, void *ptr);
/** Default narrowband mode */ /** Default narrowband mode */
extern SpeexMode speex_nb_mode; extern SpeexMode speex_nb_mode;
/** Default wideband mode */ /** Default wideband mode */
extern SpeexMode speex_wb_mode; extern SpeexMode speex_wb_mode;
/** List of all modes availavle */ /** List of all modes availavle */
extern SpeexMode *speex_mode_list[SPEEX_NB_MODES]; extern SpeexMode *speex_mode_list[SPEEX_NB_MODES];
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 7 change blocks. 
11 lines changed or deleted 14 lines changed or added


 speex_bits.h   speex_bits.h 
skipping to change at line 73 skipping to change at line 73
int speex_bits_write_whole_bytes(SpeexBits *bits, char *bytes, int max_len) ; int speex_bits_write_whole_bytes(SpeexBits *bits, char *bytes, int max_len) ;
void speex_bits_pack(SpeexBits *bits, int data, int nbBits); void speex_bits_pack(SpeexBits *bits, int data, int nbBits);
int speex_bits_unpack_signed(SpeexBits *bits, int nbBits); int speex_bits_unpack_signed(SpeexBits *bits, int nbBits);
unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits); unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits);
int speex_bits_nbytes(SpeexBits *bits); int speex_bits_nbytes(SpeexBits *bits);
unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits);
int speex_bits_peek(SpeexBits *bits); int speex_bits_peek(SpeexBits *bits);
void speex_bits_advance(SpeexBits *bits, int n); void speex_bits_advance(SpeexBits *bits, int n);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/