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*/ | ||||
#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*/ | ||||
#define SPEEX_GET_FRAME_SIZE 3 | #define SPEEX_GET_FRAME_SIZE 3 | |||
#define SPEEX_SET_QUALITY 4 | ||||
#define SPEEX_GET_QUALITY 5 | ||||
#define SPEEX_SET_MODE 6 | ||||
#define SPEEX_GET_MODE 7 | ||||
#define SPEEX_SET_LOW_MODE 8 | ||||
#define SPEEX_GET_LOW_MODE 9 | ||||
#define SPEEX_SET_HIGH_MODE 10 | ||||
#define SPEEX_GET_HIGH_MODE 11 | ||||
#define SPEEX_NB_MODES 2 | ||||
struct SpeexMode; | struct SpeexMode; | |||
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); | |||
skipping to change at line 129 | skipping to change at line 141 | |||
/** 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); | |||
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; | |||
/** Low bit-rate narrowband mode */ | ||||
extern SpeexMode speex_nb_lbr_mode; | ||||
/** Default wideband mode */ | /** Default wideband mode */ | |||
extern SpeexMode speex_wb_mode; | extern SpeexMode speex_wb_mode; | |||
extern SpeexMode *speex_mode_list[]; | extern SpeexMode *speex_mode_list[SPEEX_NB_MODES]; | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
4 lines changed or deleted | 13 lines changed or added | |||
speex_header.h | speex_header.h | |||
---|---|---|---|---|
skipping to change at line 24 | skipping to change at line 24 | |||
You should have received a copy of the GNU Lesser General Public | You should have received a copy of the GNU Lesser General Public | |||
License along with this library; if not, write to the Free Software | License along with this library; if not, write to the Free Software | |||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A | |||
*/ | */ | |||
#ifndef SPEEX_HEADER_H | #ifndef SPEEX_HEADER_H | |||
#define SPEEX_HEADER_H | #define SPEEX_HEADER_H | |||
#ifdef __cplusplus | ||||
extern "C" { | ||||
#endif | ||||
struct SpeexMode; | struct SpeexMode; | |||
#define SPEEX_HEADER_VERSION_LENGTH 20 | #define SPEEX_HEADER_VERSION_LENGTH 20 | |||
#define SPEEX_HEADER_VERSION -1 | #define SPEEX_HEADER_VERSION -1 | |||
typedef struct SpeexHeader { | typedef struct SpeexHeader { | |||
char speex_string[8]; | char speex_string[8]; | |||
char speex_version[SPEEX_HEADER_VERSION_LENGTH]; | char speex_version[SPEEX_HEADER_VERSION_LENGTH]; | |||
int speex_header_version; | int speex_header_version; | |||
int header_size; | int header_size; | |||
skipping to change at line 53 | skipping to change at line 57 | |||
int reserved3; | int reserved3; | |||
int reserved4; | int reserved4; | |||
} SpeexHeader; | } SpeexHeader; | |||
void speex_init_header(SpeexHeader *header, int rate, int nb_channels, stru ct SpeexMode *m); | void speex_init_header(SpeexHeader *header, int rate, int nb_channels, stru ct SpeexMode *m); | |||
char *speex_header_to_packet(SpeexHeader *header, int *size); | char *speex_header_to_packet(SpeexHeader *header, int *size); | |||
SpeexHeader *speex_packet_to_header(char *packet, int size); | SpeexHeader *speex_packet_to_header(char *packet, int size); | |||
#ifdef __cplusplus | ||||
} | ||||
#endif | ||||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 8 lines changed or added | |||