Mercurial > audlegacy-plugins
annotate src/OSS4/OSS4.h @ 3183:19e3ec80dac9
alsa-ng: Another arithmetic overflow (hopefully the last one).
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Fri, 12 Jun 2009 17:15:10 -0400 |
parents | 9ec8a613a1d6 |
children |
rev | line source |
---|---|
1214
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
1 /* BMP - Cross-platform multimedia player |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
2 * Copyright (C) 2003-2004 BMP development team. |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
3 * |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
4 * Based on XMMS: |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
5 * Copyright (C) 1998-2003 XMMS development team. |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
6 * |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
10 * (at your option) any later version. |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
11 * |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
15 * GNU General Public License for more details. |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
16 * |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
20 */ |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
21 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
22 #ifndef OSS4_H |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
23 #define OSS4_H |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
24 |
1790 | 25 #include "config.h" |
1214
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
26 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
27 #ifdef HAVE_SYS_SOUNDCARD_H |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
28 #include <sys/soundcard.h> |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
29 #else |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
30 #include <soundcard.h> |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
31 #endif |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
32 |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2695
diff
changeset
|
33 #include <audlegacy/plugin.h> |
1214
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
34 #include <glib.h> |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
35 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
36 #define IS_BIG_ENDIAN (G_BYTE_ORDER == G_BIG_ENDIAN) |
3049 | 37 #define DEFAULT_MIXER "/dev/mixer" |
1214
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
38 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
39 extern OutputPlugin op; |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
40 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
41 typedef struct { |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
42 gint audio_device; |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
43 gint buffer_size; |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
44 gint prebuffer; |
1245
a18b7cdc505d
stripped down the config dialog, added an option for the save dmix volume
Cristi Magherusan <majeru@atheme-project.org>
parents:
1244
diff
changeset
|
45 gboolean save_volume; |
a18b7cdc505d
stripped down the config dialog, added an option for the save dmix volume
Cristi Magherusan <majeru@atheme-project.org>
parents:
1244
diff
changeset
|
46 gboolean use_alt_audio_device; |
a18b7cdc505d
stripped down the config dialog, added an option for the save dmix volume
Cristi Magherusan <majeru@atheme-project.org>
parents:
1244
diff
changeset
|
47 gchar *alt_audio_device; |
1214
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
48 } OSSConfig; |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
49 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
50 extern OSSConfig oss_cfg; |
1244
d0f1e147cf62
now it saves VMIX volume between sessions
Cristi Magherusan <majeru@atheme-project.org>
parents:
1214
diff
changeset
|
51 int vol; |
1214
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
52 void oss_configure(void); |
3048 | 53 int oss_hardware_present(void); |
3049 | 54 void oss_describe_error(); |
1214
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
55 void oss_get_volume(int *l, int *r); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
56 void oss_set_volume(int l, int r); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
57 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
58 int oss_playing(void); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
59 int oss_free(void); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
60 void oss_write(void *ptr, int length); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
61 void oss_close(void); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
62 void oss_flush(int time); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
63 void oss_pause(short p); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
64 int oss_open(AFormat fmt, int rate, int nch); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
65 int oss_get_output_time(void); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
66 int oss_get_written_time(void); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
67 void oss_set_audio_params(void); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
68 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
69 void oss_free_convert_buffer(void); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
70 int (*oss_get_convert_func(int output, int input)) (void **, int); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
71 int (*oss_get_stereo_convert_func(int output, int input)) (void **, int, |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
72 int); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
73 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
74 void oss_tell(AFormat * fmt, gint * rate, gint * nch); |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
75 |
2a722c3ccd9e
damn, I forgot to 'hg add' the sources
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
76 #endif |