Mercurial > audlegacy-plugins
annotate src/crossfade/format.h @ 3146:87b0c47089e5
alac: Various patches from Hans de Goede. (Closes #61)
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sat, 09 May 2009 13:47:30 -0500 |
parents | 2e241e90494a |
children |
rev | line source |
---|---|
3059
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
1 /* |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
2 * XMMS Crossfade Plugin |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
3 * Copyright (C) 2000-2007 Peter Eisenlohr <peter@eisenlohr.org> |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
4 * |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
5 * based on the original OSS Output Plugin |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
6 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
7 * |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
11 * (at your option) any later version. |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
12 * |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
17 * |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
21 * USA. |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
22 */ |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
23 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
24 /* |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
25 * Verify format and setup a struct format_t |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
26 * Returns -1 if an illegal format has been specified |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
27 */ |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
28 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
29 #ifndef __FORMAT_H__ |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
30 #define __FORMAT_H__ |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
31 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
32 #include "crossfade.h" |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
33 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
34 typedef struct |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
35 { |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
36 AFormat fmt; |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
37 gint rate; |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
38 gint nch; |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
39 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
40 gint bps; /* format is valid if (bps > 0) */ |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
41 gboolean is_8bit; |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
42 gboolean is_swapped; |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
43 gboolean is_unsigned; |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
44 } |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
45 format_t; |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
46 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
47 gboolean setup_format(AFormat fmt, gint rate, gint nch, format_t * format); |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
48 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
49 gboolean format_match(AFormat fmt1, AFormat fmt2); |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
50 gchar *format_name(AFormat fmt); |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
51 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
52 void format_copy(format_t * dest, format_t * src); |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
53 |
2e241e90494a
Import work in progress xmms-crossfade rewrite.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
54 #endif /* _FORMAT_H_ */ |