annotate libao2/audio_out.h @ 31390:1edec80a4ad7

Rename loader/qt_comp.h --> loader/qt_comp_template.c. It is not a header file but rather a template that is #included multiple times with different DECL_COMPONENT macro definitions. All other similar files follow the _template.c suffix naming scheme.
author diego
date Thu, 17 Jun 2010 10:17:37 +0000
parents 986892228d92
children 1ce66378ae1e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28343
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
1 /*
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
2 * This file is part of MPlayer.
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
3 *
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
5 * it under the terms of the GNU General Public License as published by
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
7 * (at your option) any later version.
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
8 *
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
12 * GNU General Public License for more details.
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
13 *
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
14 * You should have received a copy of the GNU General Public License along
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
17 */
e45b08f2f5d3 Add standard license headers.
diego
parents: 26029
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25913
diff changeset
19 #ifndef MPLAYER_AUDIO_OUT_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25913
diff changeset
20 #define MPLAYER_AUDIO_OUT_H
6795
776b686069af - add some control (ao_oss, pl_extrastereo)
pontscho
parents: 6026
diff changeset
21
954
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
22 typedef struct ao_info_s
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
23 {
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
24 /* driver name ("Matrox Millennium G200/G400" */
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
25 const char *name;
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
26 /* short name (for config strings) ("mga") */
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
27 const char *short_name;
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
28 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
29 const char *author;
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
30 /* any additional comments */
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
31 const char *comment;
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
32 } ao_info_t;
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
33
3095
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
34 /* interface towards mplayer and */
1127
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
35 typedef struct ao_functions_s
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
36 {
28823
9a5b8c2ed6de Make ao_info_t structs const.
reimar
parents: 28343
diff changeset
37 const ao_info_t *info;
9633
12b1790038b0 64bit libao2 fix by Jens Axboe <mplayer-dev@kernel.dk>
alex
parents: 7563
diff changeset
38 int (*control)(int cmd,void *arg);
954
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
39 int (*init)(int rate,int channels,int format,int flags);
12145
99798c3cdb93 uninit immed flag
alex
parents: 9633
diff changeset
40 void (*uninit)(int immed);
17566
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 14618
diff changeset
41 void (*reset)(void);
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 14618
diff changeset
42 int (*get_space)(void);
1127
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
43 int (*play)(void* data,int len,int flags);
17566
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 14618
diff changeset
44 float (*get_delay)(void);
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 14618
diff changeset
45 void (*pause)(void);
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 14618
diff changeset
46 void (*resume)(void);
1127
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
47 } ao_functions_t;
954
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
48
3095
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
49 /* global data used by mplayer and plugins */
31178
986892228d92 Drop pointless _s suffix from struct ao_data.
diego
parents: 29263
diff changeset
50 typedef struct ao_data {
3095
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
51 int samplerate;
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
52 int channels;
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
53 int format;
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
54 int bps;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28823
diff changeset
55 int outburst;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28823
diff changeset
56 int buffersize;
3095
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
57 int pts;
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
58 } ao_data_t;
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
59
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
60 extern char *ao_subdevice;
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
61 extern ao_data_t ao_data;
981a9e5118ce interface to libao2 changed ao_plugin added
anders
parents: 2708
diff changeset
62
17566
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 14618
diff changeset
63 void list_audio_out(void);
25913
21a1dc062bc5 ao_functions_t should be const, part 1
reimar
parents: 25535
diff changeset
64 const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate,int channels,int format,int flags);
7563
e9e4398029de audio out driver list support (example: -ao alsa9,sdl:esd,oss,sdl:oss,)
arpi
parents: 6795
diff changeset
65
954
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
66 // NULL terminated array of all drivers
25913
21a1dc062bc5 ao_functions_t should be const, part 1
reimar
parents: 25535
diff changeset
67 extern const ao_functions_t* const audio_out_drivers[];
954
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
68
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
69 #define CONTROL_OK 1
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
70 #define CONTROL_TRUE 1
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
71 #define CONTROL_FALSE 0
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
72 #define CONTROL_UNKNOWN -1
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
73 #define CONTROL_ERROR -2
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
74 #define CONTROL_NA -3
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
75
db20b90dd34d audio out drivers
arpi_esp
parents:
diff changeset
76 #define AOCONTROL_SET_DEVICE 1
1048
48cf588e2c90 uj aocontrol valtozok
al3x
parents: 1038
diff changeset
77 #define AOCONTROL_GET_DEVICE 2
1127
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
78 #define AOCONTROL_QUERY_FORMAT 3 /* test for availabilty of a format */
1048
48cf588e2c90 uj aocontrol valtozok
al3x
parents: 1038
diff changeset
79 #define AOCONTROL_GET_VOLUME 4
48cf588e2c90 uj aocontrol valtozok
al3x
parents: 1038
diff changeset
80 #define AOCONTROL_SET_VOLUME 5
3107
ef2287ccc42b Changes to audio out plugin, first plugin added
anders
parents: 3095
diff changeset
81 #define AOCONTROL_SET_PLUGIN_DRIVER 6
ef2287ccc42b Changes to audio out plugin, first plugin added
anders
parents: 3095
diff changeset
82 #define AOCONTROL_SET_PLUGIN_LIST 7
1127
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
83
18735
93dd2847bcdc Rewrite audio EOF handling logic fixing some problems that could cause
uau
parents: 17566
diff changeset
84 #define AOPLAY_FINAL_CHUNK 1
93dd2847bcdc Rewrite audio EOF handling logic fixing some problems that could cause
uau
parents: 17566
diff changeset
85
1127
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
86 typedef struct ao_control_vol_s {
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
87 float left;
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
88 float right;
ca1bc9edf735 audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents: 1048
diff changeset
89 } ao_control_vol_t;
3107
ef2287ccc42b Changes to audio out plugin, first plugin added
anders
parents: 3095
diff changeset
90
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25913
diff changeset
91 #endif /* MPLAYER_AUDIO_OUT_H */