comparison src/Output/OSS/OSS.h @ 0:13389e613d67 trunk

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