Mercurial > mplayer.hg
comparison libaf/control.h @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 72d0b1444141 |
children | 812db1123f7a |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
20 #define MPLAYER_CONTROL_H | 20 #define MPLAYER_CONTROL_H |
21 | 21 |
22 #include <sys/types.h> | 22 #include <sys/types.h> |
23 | 23 |
24 /********************************************* | 24 /********************************************* |
25 // Control info struct. | 25 // Control info struct. |
26 // | 26 // |
27 // This struct is the argument in a info call to a filter. | 27 // This struct is the argument in a info call to a filter. |
28 */ | 28 */ |
29 | 29 |
30 // Argument types | 30 // Argument types |
31 #define AF_CONTROL_TYPE_BOOL (0x0<<0) | 31 #define AF_CONTROL_TYPE_BOOL (0x0<<0) |
32 #define AF_CONTROL_TYPE_CHAR (0x1<<0) | 32 #define AF_CONTROL_TYPE_CHAR (0x1<<0) |
33 #define AF_CONTROL_TYPE_INT (0x2<<0) | 33 #define AF_CONTROL_TYPE_INT (0x2<<0) |
34 #define AF_CONTROL_TYPE_FLOAT (0x3<<0) | 34 #define AF_CONTROL_TYPE_FLOAT (0x3<<0) |
35 #define AF_CONTROL_TYPE_STRUCT (0x4<<0) | 35 #define AF_CONTROL_TYPE_STRUCT (0x4<<0) |
50 | 50 |
51 typedef struct af_control_info_s{ | 51 typedef struct af_control_info_s{ |
52 int def; // Control enumrification | 52 int def; // Control enumrification |
53 char* name; // Name of argument | 53 char* name; // Name of argument |
54 char* info; // Description of what it does | 54 char* info; // Description of what it does |
55 int flags; // Flags as defined above | 55 int flags; // Flags as defined above |
56 float max; // Max and min value | 56 float max; // Max and min value |
57 float min; // (only aplicable on float and int) | 57 float min; // (only aplicable on float and int) |
58 int xdim; // 1st dimension | 58 int xdim; // 1st dimension |
59 int ydim; // 2nd dimension (=0 for everything except matrix) | 59 int ydim; // 2nd dimension (=0 for everything except matrix) |
60 size_t sz; // Size of argument in bytes | 60 size_t sz; // Size of argument in bytes |
61 int ch; // Channel number (for future use) | 61 int ch; // Channel number (for future use) |
62 void* arg; // Data (for future use) | 62 void* arg; // Data (for future use) |
71 void* arg; // Argument | 71 void* arg; // Argument |
72 int ch; // Chanel number | 72 int ch; // Chanel number |
73 }af_control_ext_t; | 73 }af_control_ext_t; |
74 | 74 |
75 /********************************************* | 75 /********************************************* |
76 // Control parameters | 76 // Control parameters |
77 */ | 77 */ |
78 | 78 |
79 /* The control system is divided into 3 levels | 79 /* The control system is divided into 3 levels |
80 mandatory calls - all filters must answer to all of these | 80 mandatory calls - all filters must answer to all of these |
81 optional calls - are optional | 81 optional calls - are optional |
82 filter specific calls - applies only to some filters | 82 filter specific calls - applies only to some filters |
83 */ | 83 */ |
84 | 84 |
113 | 113 |
114 | 114 |
115 // FILTER SPECIFIC CALLS | 115 // FILTER SPECIFIC CALLS |
116 | 116 |
117 // Basic operations: These can be ored with any of the below calls | 117 // Basic operations: These can be ored with any of the below calls |
118 // Set argument | 118 // Set argument |
119 #define AF_CONTROL_SET 0x00000000 | 119 #define AF_CONTROL_SET 0x00000000 |
120 // Get argument | 120 // Get argument |
121 #define AF_CONTROL_GET 0x00000001 | 121 #define AF_CONTROL_GET 0x00000001 |
122 // Get info about the control, i.e fill in everything except argument | 122 // Get info about the control, i.e fill in everything except argument |
123 #define AF_CONTROL_INFO 0x00000002 | 123 #define AF_CONTROL_INFO 0x00000002 |
124 | 124 |
125 // Resample | 125 // Resample |
126 | 126 |
127 // Set output rate in resample | 127 // Set output rate in resample |
128 #define AF_CONTROL_RESAMPLE_RATE 0x00000100 | AF_CONTROL_FILTER_SPECIFIC | 128 #define AF_CONTROL_RESAMPLE_RATE 0x00000100 | AF_CONTROL_FILTER_SPECIFIC |
151 // Set nuber of channel routing pairs, arg is int* | 151 // Set nuber of channel routing pairs, arg is int* |
152 #define AF_CONTROL_CHANNELS_NR 0x00000900 | AF_CONTROL_FILTER_SPECIFIC | 152 #define AF_CONTROL_CHANNELS_NR 0x00000900 | AF_CONTROL_FILTER_SPECIFIC |
153 | 153 |
154 // Set make af_channels into a router | 154 // Set make af_channels into a router |
155 #define AF_CONTROL_CHANNELS_ROUTER 0x00000A00 | AF_CONTROL_FILTER_SPECIFIC | 155 #define AF_CONTROL_CHANNELS_ROUTER 0x00000A00 | AF_CONTROL_FILTER_SPECIFIC |
156 | 156 |
157 // Volume | 157 // Volume |
158 | 158 |
159 // Turn volume control on and off, arg is int* | 159 // Turn volume control on and off, arg is int* |
160 #define AF_CONTROL_VOLUME_ON_OFF 0x00000B00 | AF_CONTROL_FILTER_SPECIFIC | 160 #define AF_CONTROL_VOLUME_ON_OFF 0x00000B00 | AF_CONTROL_FILTER_SPECIFIC |
161 | 161 |
162 // Turn soft clipping of the volume on and off, arg is binary | 162 // Turn soft clipping of the volume on and off, arg is binary |
163 #define AF_CONTROL_VOLUME_SOFTCLIP 0x00000C00 | AF_CONTROL_FILTER_SPECIFIC | 163 #define AF_CONTROL_VOLUME_SOFTCLIP 0x00000C00 | AF_CONTROL_FILTER_SPECIFIC |
164 | 164 |
165 // Set volume level, arg is a float* with the volume for all the channels | 165 // Set volume level, arg is a float* with the volume for all the channels |
166 #define AF_CONTROL_VOLUME_LEVEL 0x00000D00 | AF_CONTROL_FILTER_SPECIFIC | 166 #define AF_CONTROL_VOLUME_LEVEL 0x00000D00 | AF_CONTROL_FILTER_SPECIFIC |
167 | 167 |
168 // Probed power level for all channels, arg is a float* | 168 // Probed power level for all channels, arg is a float* |
169 #define AF_CONTROL_VOLUME_PROBE 0x00000E00 | AF_CONTROL_FILTER_SPECIFIC | 169 #define AF_CONTROL_VOLUME_PROBE 0x00000E00 | AF_CONTROL_FILTER_SPECIFIC |
170 | 170 |
171 // Maximum probed power level for all channels, arg is a float* | 171 // Maximum probed power level for all channels, arg is a float* |
172 #define AF_CONTROL_VOLUME_PROBE_MAX 0x00000F00 | AF_CONTROL_FILTER_SPECIFIC | 172 #define AF_CONTROL_VOLUME_PROBE_MAX 0x00000F00 | AF_CONTROL_FILTER_SPECIFIC |
173 | 173 |
174 // Compressor/expander | 174 // Compressor/expander |
175 | 175 |
176 // Turn compressor/expander on and off | 176 // Turn compressor/expander on and off |
191 // Noise gate | 191 // Noise gate |
192 | 192 |
193 // Turn noise gate on an off | 193 // Turn noise gate on an off |
194 #define AF_CONTROL_GATE_ON_OFF 0x00001500 | AF_CONTROL_FILTER_SPECIFIC | 194 #define AF_CONTROL_GATE_ON_OFF 0x00001500 | AF_CONTROL_FILTER_SPECIFIC |
195 | 195 |
196 // Noise gate threshold [dB] | 196 // Noise gate threshold [dB] |
197 #define AF_CONTROL_GATE_THRESH 0x00001600 | AF_CONTROL_FILTER_SPECIFIC | 197 #define AF_CONTROL_GATE_THRESH 0x00001600 | AF_CONTROL_FILTER_SPECIFIC |
198 | 198 |
199 // Noise gate attack time [ms] | 199 // Noise gate attack time [ms] |
200 #define AF_CONTROL_GATE_ATTACK 0x00001700 | AF_CONTROL_FILTER_SPECIFIC | 200 #define AF_CONTROL_GATE_ATTACK 0x00001700 | AF_CONTROL_FILTER_SPECIFIC |
201 | 201 |
202 // Noise gate release time [ms] | 202 // Noise gate release time [ms] |
203 #define AF_CONTROL_GATE_RELEASE 0x00001800 | AF_CONTROL_FILTER_SPECIFIC | 203 #define AF_CONTROL_GATE_RELEASE 0x00001800 | AF_CONTROL_FILTER_SPECIFIC |
204 | 204 |
205 // Noise gate release range level [dB] | 205 // Noise gate release range level [dB] |
206 #define AF_CONTROL_GATE_RANGE 0x00001900 | AF_CONTROL_FILTER_SPECIFIC | 206 #define AF_CONTROL_GATE_RANGE 0x00001900 | AF_CONTROL_FILTER_SPECIFIC |
207 | 207 |
208 // Pan | 208 // Pan |
209 | 209 |
210 // Pan levels, arg is a control_ext with a float* | 210 // Pan levels, arg is a control_ext with a float* |
211 #define AF_CONTROL_PAN_LEVEL 0x00001A00 | AF_CONTROL_FILTER_SPECIFIC | 211 #define AF_CONTROL_PAN_LEVEL 0x00001A00 | AF_CONTROL_FILTER_SPECIFIC |
212 | 212 |
213 // Number of outputs from pan, arg is int* | 213 // Number of outputs from pan, arg is int* |
214 #define AF_CONTROL_PAN_NOUT 0x00001B00 | AF_CONTROL_FILTER_SPECIFIC | 214 #define AF_CONTROL_PAN_NOUT 0x00001B00 | AF_CONTROL_FILTER_SPECIFIC |
215 | 215 |
216 // Balance, arg is float*; range -1 (left) to 1 (right), 0 center | 216 // Balance, arg is float*; range -1 (left) to 1 (right), 0 center |
217 #define AF_CONTROL_PAN_BALANCE 0x00002500 | AF_CONTROL_FILTER_SPECIFIC | 217 #define AF_CONTROL_PAN_BALANCE 0x00002500 | AF_CONTROL_FILTER_SPECIFIC |
218 | 218 |
219 // Set equalizer gain, arg is a control_ext with a float* | 219 // Set equalizer gain, arg is a control_ext with a float* |
220 #define AF_CONTROL_EQUALIZER_GAIN 0x00001C00 | AF_CONTROL_FILTER_SPECIFIC | 220 #define AF_CONTROL_EQUALIZER_GAIN 0x00001C00 | AF_CONTROL_FILTER_SPECIFIC |
221 | 221 |
222 | 222 |
223 // Delay length in ms, arg is a control_ext with a float* | 223 // Delay length in ms, arg is a control_ext with a float* |
224 #define AF_CONTROL_DELAY_LEN 0x00001D00 | AF_CONTROL_FILTER_SPECIFIC | 224 #define AF_CONTROL_DELAY_LEN 0x00001D00 | AF_CONTROL_FILTER_SPECIFIC |