00001
00006
00007
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 #ifndef SPEEX_ECHO_H
00035 #define SPEEX_ECHO_H
00036
00040 #include "speex/speex_types.h"
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00047 #define SPEEX_ECHO_GET_FRAME_SIZE 3
00048
00050 #define SPEEX_ECHO_SET_SAMPLING_RATE 24
00051
00052 #define SPEEX_ECHO_GET_SAMPLING_RATE 25
00053
00054
00056 #define SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE 27
00057
00058
00060 #define SPEEX_ECHO_GET_IMPULSE_RESPONSE 29
00061
00063 struct SpeexEchoState_;
00064
00070 typedef struct SpeexEchoState_ SpeexEchoState;
00071
00077 SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length);
00078
00086 SpeexEchoState *speex_echo_state_init_mc(int frame_size, int filter_length, int nb_mic, int nb_speakers);
00087
00091 void speex_echo_state_destroy(SpeexEchoState *st);
00092
00101 void speex_echo_cancellation(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out);
00102
00104 void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out, spx_int32_t *Yout);
00105
00112 void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out);
00113
00118 void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play);
00119
00123 void speex_echo_state_reset(SpeexEchoState *st);
00124
00132 int speex_echo_ctl(SpeexEchoState *st, int request, void *ptr);
00133
00134
00135
00136 struct SpeexDecorrState_;
00137
00138 typedef struct SpeexDecorrState_ SpeexDecorrState;
00139
00140
00147 SpeexDecorrState *speex_decorrelate_new(int rate, int channels, int frame_size);
00148
00156 void speex_decorrelate(SpeexDecorrState *st, const spx_int16_t *in, spx_int16_t *out, int strength);
00157
00161 void speex_decorrelate_destroy(SpeexDecorrState *st);
00162
00163
00164 #ifdef __cplusplus
00165 }
00166 #endif
00167
00168
00170 #endif