annotate libao2/audio_plugin.h @ 10431:1fafac4b6abe

better consistency
author diego
date Mon, 14 Jul 2003 16:39:28 +0000
parents 12b1790038b0
children 815f03b7cee5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
1 #ifndef __audio_plugin_h__
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
2 #define __audio_plugin_h__
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
3
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
4 // Functions supplied by plugins
3096
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
5 typedef struct ao_plugin_functions_s
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
6 {
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
7 ao_info_t *info;
9633
12b1790038b0 64bit libao2 fix by Jens Axboe <mplayer-dev@kernel.dk>
alex
parents: 6795
diff changeset
8 int (*control)(int cmd, void *arg);
3096
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
9 int (*init)();
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
10 void (*uninit)();
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
11 void (*reset)();
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
12 int (*play)();
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
13 } ao_plugin_functions_t;
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
14
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
15 // Global data for all audio plugins
3096
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
16 typedef struct ao_plugin_data_s
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
17 {
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
18 void* data; /* current data block read only ok to change */
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
19 int len; /* setup and current buffer length */
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
20 int rate; /* setup data rate */
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
21 int channels; /* setup number of channels */
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
22 int format; /* setup format */
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
23 double sz_mult; /* Buffer size multiplier */
3107
ef2287ccc42b Changes to audio out plugin, first plugin added
anders
parents: 3096
diff changeset
24 double sz_fix; /* Fix (as in static) extra buffer size */
3096
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
25 float delay_mult; /* Delay multiplier */
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
26 float delay_fix; /* Fix delay */
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
27 }ao_plugin_data_t;
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
28
3335
af2a76fdba9c CVS is still broken with gcc3. This fixes it.
pl
parents: 3315
diff changeset
29 extern volatile ao_plugin_data_t ao_plugin_data;
3096
15abd9121737 ao_plugin.c and plugin headers added
anders
parents:
diff changeset
30
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
31 // Plugin confuguration data set by cmd-line parameters
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
32 typedef struct ao_plugin_cfg_s
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
33 {
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
34 char* plugin_list; // List of used plugins read from cfg
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
35 int pl_format_type; // Output format
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
36 int pl_delay_len; // Number of samples to delay sound output
3631
5f5189ac6a41 Added plugin for fractional resampling (alpha code)
anders
parents: 3335
diff changeset
37 int pl_resample_fout; // Output frequency from resampling
4859
c72b386debb4 Adding SW volume control
anders
parents: 3631
diff changeset
38 int pl_volume_volume; // Initial volume setting
4927
3022570ad7d4 Extrastereo plugin: increases linearly the difference between left and right
pl
parents: 4859
diff changeset
39 float pl_extrastereo_mul; // Stereo enhancer multiplier
5063
be67d073f23b Added soft clipping for software volume control
anders
parents: 4941
diff changeset
40 int pl_volume_softclip; // Enable soft clipping
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
41 } ao_plugin_cfg_t;
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
42
4859
c72b386debb4 Adding SW volume control
anders
parents: 3631
diff changeset
43 extern ao_plugin_cfg_t ao_plugin_cfg;
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
44
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
45 // Configuration defaults
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
46 #define CFG_DEFAULTS { \
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
47 NULL, \
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
48 AFMT_S16_LE, \
3631
5f5189ac6a41 Added plugin for fractional resampling (alpha code)
anders
parents: 3335
diff changeset
49 0, \
4859
c72b386debb4 Adding SW volume control
anders
parents: 3631
diff changeset
50 48000, \
5063
be67d073f23b Added soft clipping for software volume control
anders
parents: 4941
diff changeset
51 101, \
be67d073f23b Added soft clipping for software volume control
anders
parents: 4941
diff changeset
52 2.5, \
be67d073f23b Added soft clipping for software volume control
anders
parents: 4941
diff changeset
53 0 \
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
54 };
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
55
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
56 // This block should not be available in the pl_xxxx files
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
57 // due to compilation issues
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
58 #ifndef PLUGIN
6430
97857ca97a8f Adding equalizer plugin
anders
parents: 5063
diff changeset
59 #define NPL 8+1 // Number of PLugins ( +1 list ends with NULL )
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
60 // List of plugins
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
61 extern ao_plugin_functions_t audio_plugin_delay;
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
62 extern ao_plugin_functions_t audio_plugin_format;
3315
bbd0a1c1262a include pl_surround in available plugins
steve
parents: 3194
diff changeset
63 extern ao_plugin_functions_t audio_plugin_surround;
3631
5f5189ac6a41 Added plugin for fractional resampling (alpha code)
anders
parents: 3335
diff changeset
64 extern ao_plugin_functions_t audio_plugin_resample;
4859
c72b386debb4 Adding SW volume control
anders
parents: 3631
diff changeset
65 extern ao_plugin_functions_t audio_plugin_volume;
4927
3022570ad7d4 Extrastereo plugin: increases linearly the difference between left and right
pl
parents: 4859
diff changeset
66 extern ao_plugin_functions_t audio_plugin_extrastereo;
4941
9a468a190c4c volume normalizer plugin support
pl
parents: 4927
diff changeset
67 extern ao_plugin_functions_t audio_plugin_volnorm;
6430
97857ca97a8f Adding equalizer plugin
anders
parents: 5063
diff changeset
68 extern ao_plugin_functions_t audio_plugin_eq;
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
69
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
70 #define AO_PLUGINS { \
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
71 &audio_plugin_delay, \
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
72 &audio_plugin_format, \
3315
bbd0a1c1262a include pl_surround in available plugins
steve
parents: 3194
diff changeset
73 &audio_plugin_surround, \
3631
5f5189ac6a41 Added plugin for fractional resampling (alpha code)
anders
parents: 3335
diff changeset
74 &audio_plugin_resample, \
4859
c72b386debb4 Adding SW volume control
anders
parents: 3631
diff changeset
75 &audio_plugin_volume, \
4927
3022570ad7d4 Extrastereo plugin: increases linearly the difference between left and right
pl
parents: 4859
diff changeset
76 &audio_plugin_extrastereo, \
4941
9a468a190c4c volume normalizer plugin support
pl
parents: 4927
diff changeset
77 &audio_plugin_volnorm, \
6430
97857ca97a8f Adding equalizer plugin
anders
parents: 5063
diff changeset
78 &audio_plugin_eq, \
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
79 NULL \
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
80 }
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
81 #endif /* PLUGIN */
3107
ef2287ccc42b Changes to audio out plugin, first plugin added
anders
parents: 3096
diff changeset
82
ef2287ccc42b Changes to audio out plugin, first plugin added
anders
parents: 3096
diff changeset
83
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
84 // Control parameters used by the plugins
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
85 #define AOCONTROL_PLUGIN_SET_LEN 1 // All plugins must respond to this parameter
6795
776b686069af - add some control (ao_oss, pl_extrastereo)
pontscho
parents: 6430
diff changeset
86 #define AOCONTROL_PLUGIN_ES_SET 4 // set extra stereo coefficient
776b686069af - add some control (ao_oss, pl_extrastereo)
pontscho
parents: 6430
diff changeset
87 #define AOCONTROL_PLUGIN_ES_GET 5 // get extra stereo coefficient
3194
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
88
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
89 #endif
1648d11fc36c commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents: 3107
diff changeset
90