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 
00055 struct SpeexEchoState_;
00056 
00062 typedef struct SpeexEchoState_ SpeexEchoState;
00063 
00069 SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length);
00070 
00074 void speex_echo_state_destroy(SpeexEchoState *st);
00075 
00084 void speex_echo_cancellation(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out);
00085 
00087 void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out, spx_int32_t *Yout);
00088 
00095 void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out);
00096 
00101 void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play);
00102 
00106 void speex_echo_state_reset(SpeexEchoState *st);
00107 
00115 int speex_echo_ctl(SpeexEchoState *st, int request, void *ptr);
00116 
00117 #ifdef __cplusplus
00118 }
00119 #endif
00120 
00121 
00123 #endif

Generated on Wed May 23 00:53:16 2007 for Speex by  doxygen 1.5.1