1 | //codecfilter_au.h: |
---|
2 | |
---|
3 | /* |
---|
4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2012 |
---|
5 | * |
---|
6 | * This file is part of roard a part of RoarAudio, |
---|
7 | * a cross-platform sound system for both, home and professional use. |
---|
8 | * See README for details. |
---|
9 | * |
---|
10 | * This file is free software; you can redistribute it and/or modify |
---|
11 | * it under the terms of the GNU General Public License version 3 |
---|
12 | * as published by the Free Software Foundation. |
---|
13 | * |
---|
14 | * RoarAudio is distributed in the hope that it will be useful, |
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | * GNU General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with this software; see the file COPYING. If not, write to |
---|
21 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
22 | * Boston, MA 02110-1301, USA. |
---|
23 | * |
---|
24 | */ |
---|
25 | |
---|
26 | #ifndef _CODECFILTER_AU_H_ |
---|
27 | #define _CODECFILTER_AU_H_ |
---|
28 | |
---|
29 | #include <roaraudio.h> |
---|
30 | |
---|
31 | #ifndef ROAR_WITHOUT_CF_AU |
---|
32 | |
---|
33 | #define ROAR_AU_MIN_HEADER_LEN (6*4) |
---|
34 | #define ROAR_AU_MAGIC 0x2e736e64 |
---|
35 | |
---|
36 | #define ROAR_AU_DATASIZE 0xffffffff |
---|
37 | |
---|
38 | // most important codec IDs: |
---|
39 | #define ROAR_AU_CID_MULAW 0x00000001 |
---|
40 | #define ROAR_AU_CID_PCM_S_8 0x00000002 |
---|
41 | #define ROAR_AU_CID_PCM_S_16 0x00000003 |
---|
42 | #define ROAR_AU_CID_PCM_S_24 0x00000004 |
---|
43 | #define ROAR_AU_CID_PCM_S_32 0x00000005 |
---|
44 | #define ROAR_AU_CID_ALAW 0x00000033 |
---|
45 | |
---|
46 | |
---|
47 | struct codecfilter_au_inst { |
---|
48 | struct roar_stream_server * stream; |
---|
49 | struct roar_stream_server * vstream; |
---|
50 | int opened; |
---|
51 | }; |
---|
52 | |
---|
53 | |
---|
54 | int cf_au_open(CODECFILTER_USERDATA_T * inst, int codec, |
---|
55 | struct roar_stream_server * info, |
---|
56 | struct roar_codecfilter * filter); |
---|
57 | |
---|
58 | int cf_au_close(CODECFILTER_USERDATA_T inst); |
---|
59 | |
---|
60 | int cf_au_read(CODECFILTER_USERDATA_T inst, char * buf, int len); |
---|
61 | int cf_au_write(CODECFILTER_USERDATA_T inst, char * buf, int len); |
---|
62 | |
---|
63 | int cf_au_ctl(CODECFILTER_USERDATA_T inst, int cmd, void * data); |
---|
64 | |
---|
65 | #endif |
---|
66 | |
---|
67 | #endif |
---|
68 | |
---|
69 | //ll |
---|