Mercurial > mplayer.hg
annotate libao2/audio_plugin.h @ 3292:7fa3a928631a
not it looks like this 'MPlayer CVS-011203-19:47-gcc-2.95.3'
author | jaf |
---|---|
date | Mon, 03 Dec 2001 19:13:34 +0000 |
parents | 1648d11fc36c |
children | bbd0a1c1262a |
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 | 5 typedef struct ao_plugin_functions_s |
6 { | |
7 ao_info_t *info; | |
8 int (*control)(int cmd,int arg); | |
9 int (*init)(); | |
10 void (*uninit)(); | |
11 void (*reset)(); | |
12 int (*play)(); | |
13 } ao_plugin_functions_t; | |
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 | 16 typedef struct ao_plugin_data_s |
17 { | |
18 void* data; /* current data block read only ok to change */ | |
19 int len; /* setup and current buffer length */ | |
20 int rate; /* setup data rate */ | |
21 int channels; /* setup number of channels */ | |
22 int format; /* setup format */ | |
23 double sz_mult; /* Buffer size multiplier */ | |
3107 | 24 double sz_fix; /* Fix (as in static) extra buffer size */ |
3096 | 25 float delay_mult; /* Delay multiplier */ |
26 float delay_fix; /* Fix delay */ | |
27 }ao_plugin_data_t; | |
28 | |
29 extern ao_plugin_data_t ao_plugin_data; | |
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 |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
37 } ao_plugin_cfg_t; |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
38 |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
39 extern ao_plugin_cfg_t ao_plugin_cfg; |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
40 |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
41 // Configuration defaults |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
42 #define CFG_DEFAULTS { \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
43 NULL, \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
44 AFMT_S16_LE, \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
45 0 \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
46 }; |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
47 |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
48 // 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
|
49 // due to compilation issues |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
50 #ifndef PLUGIN |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
51 #define NPL 2+1 // Number of PLugins ( +1 list ends with NULL ) |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
52 // List of plugins |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
53 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
|
54 extern ao_plugin_functions_t audio_plugin_format; |
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 #define AO_PLUGINS { \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
57 &audio_plugin_delay, \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
58 &audio_plugin_format, \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
59 NULL \ |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
60 } |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
61 #endif /* PLUGIN */ |
3107 | 62 |
63 | |
3194
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
64 // Control parameters used by the plugins |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
65 #define AOCONTROL_PLUGIN_SET_LEN 1 // All plugins must respond to this parameter |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
66 |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
67 #endif |
1648d11fc36c
commandline configuration of audio plugins now through struct, format conversion plugin added
anders
parents:
3107
diff
changeset
|
68 |