blob: 1e160f460f643c2d03137969320fedcac6a8be79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#ifndef __af_control_h
#define __af_control_h
/*********************************************
// Control parameters
*/
/* The control system is divided into 3 levels
mandatory calls - all filters must answer to all of these
optional calls - are optional
filter specific calls - applies only to some filters
*/
#define AF_CONTROL_MANDATORY_BASE 0
#define AF_CONTROL_OPTIONAL_BASE 100
#define AF_CONTROL_FILTER_SPECIFIC_BASE 200
// MANDATORY CALLS
/* Reinitialize filter. The optional argument contains the new
configuration in form of a af_data_t struct. If the filter does not
support the new format the struct should be changed and AF_FALSE
should be returned. If the incoming and outgoing data streams are
identical the filter can return AF_DETACH. This will remove the
filter. */
#define AF_CONTROL_REINIT 01 + AF_CONTROL_MANDATORY_BASE
// OPTIONAL CALLS
/* Called just after creation with the af_cfg for the stream in which
the filter resides as input parameter this call can be used by the
filter to initialize itself */
#define AF_CONTROL_POST_CREATE 1 + AF_CONTROL_OPTIONAL_BASE
// Called just before destruction of a filter
#define AF_CONTROL_PRE_DESTROY 2 + AF_CONTROL_OPTIONAL_BASE
/* Commandline parameters. If there were any commandline parameters
for this specific filter, they will be given as a char* in the
argument */
#define AF_CONTROL_COMMAND_LINE 3 + AF_CONTROL_OPTIONAL_BASE
// FILTER SPECIFIC CALLS
// Set output rate in resample
#define AF_CONTROL_RESAMPLE 1 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Set output format in format
#define AF_CONTROL_FORMAT 2 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Set number of output channels in channels
#define AF_CONTROL_CHANNELS 3 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Set delay length in delay
#define AF_CONTROL_DELAY_SET_LEN 4 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Volume
// Set volume level, arg is a float* with the volume for all the channels
#define AF_CONTROL_VOLUME_SET 5 + AF_CONTROL_FILTER_SPECIFIC_BASE
/* Get volume level for all channels, arg is a float* that will
contain the volume for all the channels */
#define AF_CONTROL_VOLUME_GET 6 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Turn volume control on and off, arg is binary
#define AF_CONTROL_VOLUME_ON_OFF 7 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Turn soft clipping of the volume on and off, arg is binary
#define AF_CONTROL_VOLUME_SOFTCLIP 8 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Get the probed power level for all channels, arg is a float*
#define AF_CONTROL_VOLUME_PROBE_GET 9 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Get the maximum probed power level for all channels, arg is a float*
#define AF_CONTROL_VOLUME_PROBE_GET_MAX 10 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Turn probing on and off, arg is binary
#define AF_CONTROL_VOLUME_PROBE_ON_OFF 11 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Set equalizer gain, arg is an equalizer_t*
#define AF_CONTROL_EQUALIZER_SET_GAIN 12 + AF_CONTROL_FILTER_SPECIFIC_BASE
// Get equalizer gain, arg is an equalizer_t*
#define AF_CONTROL_EQUALIZER_GET_GAIN 13 + AF_CONTROL_FILTER_SPECIFIC_BASE
#endif /*__af_control_h */
|