Mercurial > audlegacy
annotate Plugins/Output/alsa/alsa.h @ 211:0b48662886e9 trunk
[svn] Sync ALSA plugin with enhancements/patches from Fatal (XMMS cvs)
author | nenolod |
---|---|
date | Sun, 20 Nov 2005 00:34:09 -0800 |
parents | fa848bd484d8 |
children | 55dc40ff1aff |
rev | line source |
---|---|
61 | 1 /* XMMS - ALSA output plugin |
2 * Copyright (C) 2001-2003 Matthieu Sozeau | |
3 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, | |
4 * Thomas Nilsson and 4Front Technologies | |
5 * Copyright (C) 1999-2004 Håvard Kvålen | |
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
20 */ | |
21 #ifndef ALSA_H | |
22 #define ALSA_H | |
23 | |
24 #include "config.h" | |
25 | |
26 #include <libaudacious/util.h> | |
211
0b48662886e9
[svn] Sync ALSA plugin with enhancements/patches from Fatal (XMMS cvs)
nenolod
parents:
61
diff
changeset
|
27 #include <libaudacious/configdb.h> |
61 | 28 #include <audacious/plugin.h> |
211
0b48662886e9
[svn] Sync ALSA plugin with enhancements/patches from Fatal (XMMS cvs)
nenolod
parents:
61
diff
changeset
|
29 #include <glib/gi18n.h> |
61 | 30 |
31 #define ALSA_PCM_NEW_HW_PARAMS_API | |
32 #define ALSA_PCM_NEW_SW_PARAMS_API | |
33 #include <alsa/asoundlib.h> | |
34 #include <alsa/pcm_plugin.h> | |
35 | |
36 #include <gtk/gtk.h> | |
37 | |
38 #ifdef WORDS_BIGENDIAN | |
39 # define IS_BIG_ENDIAN TRUE | |
40 #else | |
41 # define IS_BIG_ENDIAN FALSE | |
42 #endif | |
43 | |
44 extern OutputPlugin op; | |
45 | |
46 struct alsa_config | |
47 { | |
48 char *pcm_device; | |
49 int mixer_card; | |
50 char *mixer_device; | |
51 int buffer_time; | |
52 int period_time; | |
53 int thread_buffer_time; | |
54 gboolean debug; | |
55 struct | |
56 { | |
57 int left, right; | |
58 } vol; | |
59 gboolean soft_volume; | |
60 }; | |
61 | |
62 extern struct alsa_config alsa_cfg; | |
63 | |
64 void alsa_init(void); | |
65 void alsa_about(void); | |
66 void alsa_configure(void); | |
67 int alsa_get_mixer(snd_mixer_t **mixer, int card); | |
68 void alsa_save_config(void); | |
69 | |
70 void alsa_get_volume(int *l, int *r); | |
71 void alsa_set_volume(int l, int r); | |
72 | |
73 int alsa_playing(void); | |
74 int alsa_free(void); | |
75 void alsa_write(void *ptr, int length); | |
76 void alsa_close(void); | |
77 void alsa_flush(int time); | |
78 void alsa_pause(short p); | |
79 int alsa_open(AFormat fmt, int rate, int nch); | |
80 int alsa_get_output_time(void); | |
81 int alsa_get_written_time(void); | |
82 | |
83 #endif |