comparison libaf/af.c @ 32134:12db4ae0b3d1

const-correctness for af_info_t audio filter declarations
author diego
date Mon, 13 Sep 2010 03:54:37 +0000
parents 22aef54d8833
children 4614728cab25
comparison
equal deleted inserted replaced
32133:04071c66eeb1 32134:12db4ae0b3d1
23 #include "osdep/strsep.h" 23 #include "osdep/strsep.h"
24 24
25 #include "af.h" 25 #include "af.h"
26 26
27 // Static list of filters 27 // Static list of filters
28 extern af_info_t af_info_dummy; 28 extern const af_info_t af_info_dummy;
29 extern af_info_t af_info_delay; 29 extern const af_info_t af_info_delay;
30 extern af_info_t af_info_channels; 30 extern const af_info_t af_info_channels;
31 extern af_info_t af_info_format; 31 extern const af_info_t af_info_format;
32 extern af_info_t af_info_resample; 32 extern const af_info_t af_info_resample;
33 extern af_info_t af_info_volume; 33 extern const af_info_t af_info_volume;
34 extern af_info_t af_info_equalizer; 34 extern const af_info_t af_info_equalizer;
35 extern af_info_t af_info_gate; 35 extern const af_info_t af_info_gate;
36 extern af_info_t af_info_comp; 36 extern const af_info_t af_info_comp;
37 extern af_info_t af_info_pan; 37 extern const af_info_t af_info_pan;
38 extern af_info_t af_info_surround; 38 extern const af_info_t af_info_surround;
39 extern af_info_t af_info_sub; 39 extern const af_info_t af_info_sub;
40 extern af_info_t af_info_export; 40 extern const af_info_t af_info_export;
41 extern af_info_t af_info_volnorm; 41 extern const af_info_t af_info_volnorm;
42 extern af_info_t af_info_extrastereo; 42 extern const af_info_t af_info_extrastereo;
43 extern af_info_t af_info_lavcac3enc; 43 extern const af_info_t af_info_lavcac3enc;
44 extern af_info_t af_info_lavcresample; 44 extern const af_info_t af_info_lavcresample;
45 extern af_info_t af_info_sweep; 45 extern const af_info_t af_info_sweep;
46 extern af_info_t af_info_hrtf; 46 extern const af_info_t af_info_hrtf;
47 extern af_info_t af_info_ladspa; 47 extern const af_info_t af_info_ladspa;
48 extern af_info_t af_info_center; 48 extern const af_info_t af_info_center;
49 extern af_info_t af_info_sinesuppress; 49 extern const af_info_t af_info_sinesuppress;
50 extern af_info_t af_info_karaoke; 50 extern const af_info_t af_info_karaoke;
51 extern af_info_t af_info_scaletempo; 51 extern const af_info_t af_info_scaletempo;
52 extern af_info_t af_info_stats; 52 extern const af_info_t af_info_stats;
53 extern af_info_t af_info_bs2b; 53 extern const af_info_t af_info_bs2b;
54 54
55 static af_info_t* filter_list[]={ 55 static const af_info_t * const filter_list[] = {
56 &af_info_dummy, 56 &af_info_dummy,
57 &af_info_delay, 57 &af_info_delay,
58 &af_info_channels, 58 &af_info_channels,
59 &af_info_format, 59 &af_info_format,
60 &af_info_resample, 60 &af_info_resample,
95 // CPU speed 95 // CPU speed
96 int* af_cpu_speed = NULL; 96 int* af_cpu_speed = NULL;
97 97
98 /* Find a filter in the static list of filters using it's name. This 98 /* Find a filter in the static list of filters using it's name. This
99 function is used internally */ 99 function is used internally */
100 static af_info_t* af_find(char*name) 100 static const af_info_t* af_find(char*name)
101 { 101 {
102 int i=0; 102 int i=0;
103 while(filter_list[i]){ 103 while(filter_list[i]){
104 if(!strcmp(filter_list[i]->name,name)) 104 if(!strcmp(filter_list[i]->name,name))
105 return filter_list[i]; 105 return filter_list[i];