1 /*
2 mediastreamer2 library - modular sound and video processing and streaming
3 Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 */
19 
20 #ifndef msequalizer_h
21 #define msequalizer_h
22 
23 #include <mediastreamer2/msfilter.h>
24 
25 typedef struct _MSEqualizerGain{
26 	float frequency; ///< In hz
27 	float gain; ///< between 0-1.2
28 	float width; ///< frequency band width around mid frequency for which the gain is applied, in Hz. Use 0 for the lowest frequency resolution.
29 }MSEqualizerGain;
30 
31 MS2_PUBLIC MSList *ms_parse_equalizer_string(const char *str);
32 
33 #define MS_EQUALIZER_SET_GAIN		MS_FILTER_METHOD(MS_EQUALIZER_ID,0,MSEqualizerGain)
34 #define MS_EQUALIZER_GET_GAIN		MS_FILTER_METHOD(MS_EQUALIZER_ID,1,MSEqualizerGain)
35 #define MS_EQUALIZER_SET_ACTIVE		MS_FILTER_METHOD(MS_EQUALIZER_ID,2,int)
36 /**dump the spectral response into a table of float. The table must be sized according to the value returned by
37  * MS_EQUALIZER_GET_NUM_FREQUENCIES
38 **/
39 #define MS_EQUALIZER_DUMP_STATE		MS_FILTER_METHOD(MS_EQUALIZER_ID,3,float)
40 
41 /**returns the number of frequencies*/
42 #define MS_EQUALIZER_GET_NUM_FREQUENCIES	MS_FILTER_METHOD(MS_EQUALIZER_ID,4,int)
43 
44 
45 #endif
46 
47