speex_echo.h

Go to the documentation of this file.
00001 /* Copyright (C) Jean-Marc Valin */
00006 /*
00007    Redistribution and use in source and binary forms, with or without
00008    modification, are permitted provided that the following conditions are
00009    met:
00010 
00011    1. Redistributions of source code must retain the above copyright notice,
00012    this list of conditions and the following disclaimer.
00013 
00014    2. Redistributions in binary form must reproduce the above copyright
00015    notice, this list of conditions and the following disclaimer in the
00016    documentation and/or other materials provided with the distribution.
00017 
00018    3. The name of the author may not be used to endorse or promote products
00019    derived from this software without specific prior written permission.
00020 
00021    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00022    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00023    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00024    DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
00025    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00026    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00027    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00028    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00029    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00030    ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00031    POSSIBILITY OF SUCH DAMAGE.
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 /* Can't set window sizes */
00056 #define SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE 27
00057 
00058 /* Can't set window content */
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

Generated on Sat Dec 6 22:03:22 2008 for Speex by  doxygen 1.5.1