annotate Output/alsa/alsa.h @ 60:1771f253e1b2 trunk

[svn] Updated japanese translation, thanks to dai.
author nenolod
date Fri, 28 Oct 2005 21:36:53 -0700
parents cb178e5ad177
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* XMMS - ALSA output plugin
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 2001-2003 Matthieu Sozeau
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * Thomas Nilsson and 4Front Technologies
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * Copyright (C) 1999-2004 Håvard Kvålen
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 #ifndef ALSA_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 #define ALSA_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 #include "config.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 #include <libaudacious/util.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 #include <audacious/plugin.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 #define ALSA_PCM_NEW_HW_PARAMS_API
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 #define ALSA_PCM_NEW_SW_PARAMS_API
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 #include <alsa/asoundlib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 #include <alsa/pcm_plugin.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 #include <gtk/gtk.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 #ifdef WORDS_BIGENDIAN
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 # define IS_BIG_ENDIAN TRUE
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 #else
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 # define IS_BIG_ENDIAN FALSE
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 extern OutputPlugin op;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 struct alsa_config
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 char *pcm_device;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 int mixer_card;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 char *mixer_device;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 int buffer_time;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 int period_time;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 int thread_buffer_time;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 gboolean debug;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 gboolean multi_thread;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 gboolean mmap;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 struct
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 int left, right;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 } vol;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 gboolean soft_volume;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 };
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 extern struct alsa_config alsa_cfg;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 void alsa_init(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 void alsa_about(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 void alsa_configure(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 int alsa_get_mixer(snd_mixer_t **mixer, int card);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 void alsa_save_config(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 void alsa_get_volume(int *l, int *r);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 void alsa_set_volume(int l, int r);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 int alsa_playing(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74 int alsa_free(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75 void alsa_write(void *ptr, int length);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76 void alsa_close(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 void alsa_flush(int time);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78 void alsa_pause(short p);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 int alsa_open(AFormat fmt, int rate, int nch);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 int alsa_get_output_time(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 int alsa_get_written_time(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 #endif