annotate Plugins/Output/OSS/OSS.h @ 61:fa848bd484d8 trunk

[svn] Move plugins to Plugins/
author nenolod
date Fri, 28 Oct 2005 22:58:11 -0700
parents
children 55dc40ff1aff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
1 /* BMP - Cross-platform multimedia player
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
2 * Copyright (C) 2003-2004 BMP development team.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
3 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
4 * Based on XMMS:
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
5 * Copyright (C) 1998-2003 XMMS development team.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
6 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
10 * (at your option) any later version.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
11 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
15 * GNU General Public License for more details.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
16 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
20 */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
21
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
22 #ifndef OSS_H
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
23 #define OSS_H
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
24
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
25 #ifdef HAVE_CONFIG_H
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
26 # include "config.h"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
27 #endif
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
28
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
29 #include <glib.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
30
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
31 #include "soundcard.h"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
32 #include "audacious/plugin.h"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
33
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
34 #define IS_BIG_ENDIAN (G_BYTE_ORDER == G_BIG_ENDIAN)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
35
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
36 extern OutputPlugin op;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
37
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
38 typedef struct {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
39 gint audio_device;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
40 gint mixer_device;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
41 gint buffer_size;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
42 gint prebuffer;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
43 gboolean use_master;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
44 gboolean use_alt_audio_device, use_alt_mixer_device;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
45 gchar *alt_audio_device, *alt_mixer_device;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
46 } OSSConfig;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
47
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
48 extern OSSConfig oss_cfg;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
49
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
50 void oss_init(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
51 void oss_about(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
52 void oss_configure(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
53
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
54 void oss_get_volume(int *l, int *r);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
55 void oss_set_volume(int l, int r);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
56
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
57 int oss_playing(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
58 int oss_free(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
59 void oss_write(void *ptr, int length);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
60 void oss_close(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
61 void oss_flush(int time);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
62 void oss_pause(short p);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
63 int oss_open(AFormat fmt, int rate, int nch);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
64 int oss_get_output_time(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
65 int oss_get_written_time(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
66 void oss_set_audio_params(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
67
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
68 void oss_free_convert_buffer(void);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
69 int (*oss_get_convert_func(int output, int input)) (void **, int);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
70 int (*oss_get_stereo_convert_func(int output, int input)) (void **, int,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
71 int);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
72
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
73 #endif