SDL-1.2.14
[sdl_omap.git] / src / audio / mint / SDL_mintaudio_gsxb.h
1 /*
2     SDL - Simple DirectMedia Layer
3     Copyright (C) 1997-2009 Sam Lantinga
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Lesser General Public
7     License as published by the Free Software Foundation; either
8     version 2.1 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Lesser General Public License for more details.
14
15     You should have received a copy of the GNU Lesser General Public
16     License along with this library; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
19     Sam Lantinga
20     slouken@libsdl.org
21 */
22 #include "SDL_config.h"
23
24 /*
25  * GSXB audio definitions
26  * 
27  * Patrice Mandin
28  */
29
30 #ifndef _SDL_mintaudio_gsxb_h
31 #define _SDL_mintaudio_gsxb_h
32
33 #include <mint/falcon.h>        /* for trap_14_xxx macros */
34
35 /* GSXB Cookie */
36
37 #define C_GSXB          0x47535842L
38
39 /* Bit 5 in cookie _SND */
40
41 #define SND_GSXB        (1<<5)
42
43 /* NSoundcmd modes */
44
45 #define SETRATE                 7       /* Set sample rate */
46 #define SET8BITFORMAT   8       /* 8 bits format */
47 #define SET16BITFORMAT  9       /* 16 bits format */
48 #define SET24BITFORMAT  10      /* 24 bits format */
49 #define SET32BITFORMAT  11      /* 32 bits format */
50 #define LTATTEN_MASTER  12      /* Attenuation */
51 #define RTATTEN_MASTER  13
52 #define LTATTEN_MICIN   14
53 #define RTATTEN_MICIN   15
54 #define LTATTEN_FMGEN   16
55 #define RTATTEN_FMGEN   17
56 #define LTATTEN_LINEIN  18
57 #define RTATTEN_LINEIN  19
58 #define LTATTEN_CDIN    20
59 #define RTATTEN_CDIN    21
60 #define LTATTEN_VIDIN   22
61 #define RTATTEN_VIDIN   23
62 #define LTATTEN_AUXIN   24
63 #define RTATTEN_AUXIN   25
64
65 /* Setmode modes */
66
67 #define MONO16          3
68 #define STEREO24        4
69 #define STEREO32        5
70 #define MONO24          6
71 #define MONO32          7
72
73 /* Sndstatus modes */
74
75 #define SND_QUERYFORMATS        2
76 #define SND_QUERYMIXERS         3
77 #define SND_QUERYSOURCES        4
78 #define SND_QUERYDUPLEX         5
79 #define SND_QUERY8BIT           8
80 #define SND_QUERY16BIT          9
81 #define SND_QUERY24BIT          10
82 #define SND_QUERY32BIT          11
83
84 #define SND_FORMAT8             (1<<0)
85 #define SND_FORMAT16    (1<<1)
86 #define SND_FORMAT24    (1<<2)
87 #define SND_FORMAT32    (1<<3)
88
89 #define SND_FORMATSIGNED                (1<<0)
90 #define SND_FORMATUNSIGNED              (1<<1)
91 #define SND_FORMATBIGENDIAN             (1<<2)
92 #define SND_FORMATLITTLEENDIAN  (1<<3)
93
94 /* Devconnect prescalers */
95
96 #define CLK_44K         1
97 #define CLK_22K         3
98 #define CLK_11K         7
99
100 /* Extra xbios functions */
101
102 #define NSoundcmd(mode,data,data2)      \
103         (long)trap_14_wwl((short)130,(short)(mode),(short)(data),(long)(data2))
104 #define NSetinterrupt(src_inter,cause,inth_addr)        \
105         (long)trap_14_wwwl((short)135,(short)(src_inter),(short)(cause),        \
106                 (long)(inth_addr))
107
108 #endif /* _SDL_mintaudio_gsxb_h */