comparison libaf/control.h @ 7745:1d3a3dc1f488

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