speex.h   speex.h 
skipping to change at line 31 skipping to change at line 31
#ifndef SPEEX_H #ifndef SPEEX_H
#define SPEEX_H #define SPEEX_H
#include "speex_bits.h" #include "speex_bits.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*values for *ctl() requests*/ /* Values allowed for *ctl() requests */
#define SPEEX_SET_PF 0 #define SPEEX_SET_PF 0
#define SPEEX_GET_PF 1 #define SPEEX_GET_PF 1
/*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_FRAME_SIZE 3 #define SPEEX_GET_FRAME_SIZE 3
#define SPEEX_SET_QUALITY 4 #define SPEEX_SET_QUALITY 4
#define SPEEX_GET_QUALITY 5 #define SPEEX_GET_QUALITY 5
#define SPEEX_SET_MODE 6 #define SPEEX_SET_MODE 6
#define SPEEX_GET_MODE 7 #define SPEEX_GET_MODE 7
#define SPEEX_SET_LOW_MODE 8 #define SPEEX_SET_LOW_MODE 8
#define SPEEX_GET_LOW_MODE 9 #define SPEEX_GET_LOW_MODE 9
#define SPEEX_SET_HIGH_MODE 10 #define SPEEX_SET_HIGH_MODE 10
#define SPEEX_GET_HIGH_MODE 11 #define SPEEX_GET_HIGH_MODE 11
#define SPEEX_SET_VBR 12
#define SPEEX_GET_VBR 13
#define SPEEX_SET_VBR_QUALITY 14
#define SPEEX_GET_VBR_QUALITY 15
#define SPEEX_NB_MODES 2 #define SPEEX_NB_MODES 2
struct SpeexMode; struct SpeexMode;
/* 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 void (*decode_func)(void *state, SpeexBits *bits, float *out, int l ost);
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);
/** Struct defining a Speex mode */ /** Struct defining a Speex mode */
skipping to change at line 121 skipping to change at line 126
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);
/** Uses an existing encoder state to encode one frame of speech pointed to by /** Uses an existing encoder state to encode one frame of speech pointed to by
"in". The encoded bit-stream is saved in "bits".*/ "in". The encoded bit-stream is saved in "bits".*/
void speex_encode(void *state, float *in, SpeexBits *bits); void speex_encode(void *state, float *in, SpeexBits *bits);
/** Used like the ioctl function to control the encoder parameters */
void speex_encoder_ctl(void *state, int request, void *ptr); void speex_encoder_ctl(void *state, int request, void *ptr);
/** Returns a handle to a newly created decoder state structure. For now, t he mode /** Returns a handle to a newly created decoder state structure. For now, t he mode
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); void speex_decode(void *state, SpeexBits *bits, float *out, int lost);
/** 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);
/** 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 */
extern SpeexMode *speex_mode_list[SPEEX_NB_MODES]; extern SpeexMode *speex_mode_list[SPEEX_NB_MODES];
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 6 change blocks. 
1 lines changed or deleted 9 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/