speex_preprocess.h

Go to the documentation of this file.
00001 /* Copyright (C) 2003 Epic Games
00002    Written by Jean-Marc Valin */
00009 /*
00010    Redistribution and use in source and binary forms, with or without
00011    modification, are permitted provided that the following conditions are
00012    met:
00013 
00014    1. Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017    2. Redistributions in binary form must reproduce the above copyright
00018    notice, this list of conditions and the following disclaimer in the
00019    documentation and/or other materials provided with the distribution.
00020 
00021    3. The name of the author may not be used to endorse or promote products
00022    derived from this software without specific prior written permission.
00023 
00024    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00025    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00026    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00027    DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
00028    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00029    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00030    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00031    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00032    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00033    ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00034    POSSIBILITY OF SUCH DAMAGE.
00035 */
00036 
00037 #ifndef SPEEX_PREPROCESS_H
00038 #define SPEEX_PREPROCESS_H
00039 
00046 #include "speex/speex_types.h"
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051    
00053 struct SpeexPreprocessState_;
00054 
00056 typedef struct SpeexPreprocessState_ SpeexPreprocessState;
00057 
00058 
00065 SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate);
00066 
00070 void speex_preprocess_state_destroy(SpeexPreprocessState *st);
00071 
00077 int speex_preprocess_run(SpeexPreprocessState *st, spx_int16_t *x);
00078 
00080 int speex_preprocess(SpeexPreprocessState *st, spx_int16_t *x, spx_int32_t *echo);
00081 
00086 void speex_preprocess_estimate_update(SpeexPreprocessState *st, spx_int16_t *x);
00087 
00094 int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr);
00095 
00096 
00097 
00099 #define SPEEX_PREPROCESS_SET_DENOISE 0
00100 
00101 #define SPEEX_PREPROCESS_GET_DENOISE 1
00102 
00104 #define SPEEX_PREPROCESS_SET_AGC 2
00105 
00106 #define SPEEX_PREPROCESS_GET_AGC 3
00107 
00109 #define SPEEX_PREPROCESS_SET_VAD 4
00110 
00111 #define SPEEX_PREPROCESS_GET_VAD 5
00112 
00114 #define SPEEX_PREPROCESS_SET_AGC_LEVEL 6
00115 
00116 #define SPEEX_PREPROCESS_GET_AGC_LEVEL 7
00117 
00119 #define SPEEX_PREPROCESS_SET_DEREVERB 8
00120 
00121 #define SPEEX_PREPROCESS_GET_DEREVERB 9
00122 
00124 #define SPEEX_PREPROCESS_SET_DEREVERB_LEVEL 10
00125 
00126 #define SPEEX_PREPROCESS_GET_DEREVERB_LEVEL 11
00127 
00129 #define SPEEX_PREPROCESS_SET_DEREVERB_DECAY 12
00130 
00131 #define SPEEX_PREPROCESS_GET_DEREVERB_DECAY 13
00132 
00134 #define SPEEX_PREPROCESS_SET_PROB_START 14
00135 
00136 #define SPEEX_PREPROCESS_GET_PROB_START 15
00137 
00139 #define SPEEX_PREPROCESS_SET_PROB_CONTINUE 16
00140 
00141 #define SPEEX_PREPROCESS_GET_PROB_CONTINUE 17
00142 
00144 #define SPEEX_PREPROCESS_SET_NOISE_SUPPRESS 18
00145 
00146 #define SPEEX_PREPROCESS_GET_NOISE_SUPPRESS 19
00147 
00149 #define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS 20
00150 
00151 #define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS 21
00152 
00154 #define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE 22
00155 
00156 #define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS_ACTIVE 23
00157 
00159 #define SPEEX_PREPROCESS_SET_ECHO_STATE 24
00160 
00161 #define SPEEX_PREPROCESS_GET_ECHO_STATE 25
00162 
00164 #define SPEEX_PREPROCESS_SET_AGC_INCREMENT 26
00165 
00167 #define SPEEX_PREPROCESS_GET_AGC_INCREMENT 27
00168 
00170 #define SPEEX_PREPROCESS_SET_AGC_DECREMENT 28
00171 
00173 #define SPEEX_PREPROCESS_GET_AGC_DECREMENT 29
00174 
00176 #define SPEEX_PREPROCESS_SET_AGC_MAX_GAIN 30
00177 
00179 #define SPEEX_PREPROCESS_GET_AGC_MAX_GAIN 31
00180 
00181 /*  Can't set loudness */
00183 #define SPEEX_PREPROCESS_GET_AGC_LOUDNESS 33
00184 
00185 /*  Can't set gain */
00187 #define SPEEX_PREPROCESS_GET_AGC_GAIN 35
00188 
00189 /*  Can't set spectrum size */
00191 #define SPEEX_PREPROCESS_GET_PSD_SIZE 37
00192 
00193 /*  Can't set power spectrum */
00195 #define SPEEX_PREPROCESS_GET_PSD 39
00196 
00197 /*  Can't set noise size */
00199 #define SPEEX_PREPROCESS_GET_NOISE_PSD_SIZE 41
00200 
00201 /*  Can't set noise estimate */
00203 #define SPEEX_PREPROCESS_GET_NOISE_PSD 43
00204 
00205 /* Can't set speech probability */
00207 #define SPEEX_PREPROCESS_GET_PROB 45
00208 
00210 #define SPEEX_PREPROCESS_SET_AGC_TARGET 46
00211 
00212 #define SPEEX_PREPROCESS_GET_AGC_TARGET 47
00213 
00214 #ifdef __cplusplus
00215 }
00216 #endif
00217 
00219 #endif

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