foo
[dosdemo] / libs / mikmod / playercode / mdreg.c
1 /*      MikMod sound library
2         (c) 1998, 1999 Miodrag Vallat and others - see file AUTHORS for
3         complete list.
4
5         This library is free software; you can redistribute it and/or modify
6         it under the terms of the GNU Library General Public License as
7         published by the Free Software Foundation; either version 2 of
8         the License, or (at your option) any later version.
9
10         This program 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
13         GNU Library General Public License for more details.
14
15         You should have received a copy of the GNU Library General Public
16         License along with this library; if not, write to the Free Software
17         Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18         02111-1307, USA.
19 */
20
21 /*==============================================================================
22
23   Routine for registering all drivers in libmikmod for the current platform.
24
25 ==============================================================================*/
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31 #include "mikmod_internals.h"
32
33 static void _mm_registeralldrivers(void)
34 {
35         /* Register network drivers */
36 #ifdef DRV_AF
37         _mm_registerdriver(&drv_AF);
38 #endif
39 #ifdef DRV_PULSEAUDIO
40         _mm_registerdriver(&drv_pulseaudio);
41 #endif
42 #ifdef DRV_ESD
43         _mm_registerdriver(&drv_esd);
44 #endif
45 #ifdef DRV_NAS
46         _mm_registerdriver(&drv_nas);
47 #endif
48
49         /* Register hardware drivers - hardware mixing */
50 #ifdef DRV_ULTRA
51         _mm_registerdriver(&drv_ultra);
52 #endif
53 #ifdef DRV_SAM9407
54         _mm_registerdriver(&drv_sam9407);
55 #endif
56
57         /* Register multi-platform drivers -- software mixing */
58 #ifdef DRV_SDL
59         _mm_registerdriver(&drv_sdl);
60 #endif
61 #ifdef DRV_OPENAL
62         _mm_registerdriver(&drv_openal);
63 #endif
64
65         /* Register OS-specific hardware drivers - software mixing */
66 #ifdef DRV_AHI
67         _mm_registerdriver(&drv_ahi);
68 #endif
69 #ifdef DRV_AIX
70         _mm_registerdriver(&drv_aix);
71 #endif
72 #ifdef DRV_ALSA
73         _mm_registerdriver(&drv_alsa);
74 #endif
75 #ifdef DRV_HP
76         _mm_registerdriver(&drv_hp);
77 #endif
78 #ifdef DRV_SNDIO
79         _mm_registerdriver(&drv_sndio);
80 #endif
81 #ifdef DRV_OSS
82         _mm_registerdriver(&drv_oss);
83 #endif
84 #ifdef DRV_SGI
85         _mm_registerdriver(&drv_sgi);
86 #endif
87 #ifdef DRV_SUN
88         _mm_registerdriver(&drv_sun);
89 #endif
90 #ifdef DRV_DART
91         _mm_registerdriver(&drv_dart);
92 #endif
93 #ifdef DRV_OS2
94         _mm_registerdriver(&drv_os2);
95 #endif
96 #ifdef DRV_XAUDIO2
97         _mm_registerdriver(&drv_xaudio2);
98 #endif
99 #ifdef DRV_DS
100         _mm_registerdriver(&drv_ds);
101 #endif
102 #ifdef DRV_WIN
103         _mm_registerdriver(&drv_win);
104 #endif
105 #ifdef DRV_MAC
106         _mm_registerdriver(&drv_mac);
107 #endif
108 #ifdef DRV_OSX
109         _mm_registerdriver(&drv_osx);
110 #endif
111 #ifdef DRV_DC
112         _mm_registerdriver(&drv_dc);
113 #endif
114 #ifdef DRV_GP32
115         _mm_registerdriver(&drv_gp32);
116 #endif
117 #ifdef DRV_PSP
118         _mm_registerdriver(&drv_psp);
119 #endif
120 #ifdef DRV_OSLES
121         _mm_registerdriver(&drv_osles);
122 #endif
123
124         /* dos drivers - wss first, since some cards emulate sb */
125 #ifdef DRV_WSS
126         _mm_registerdriver(&drv_wss);
127 #endif
128 #ifdef DRV_SB
129         _mm_registerdriver(&drv_sb);
130 #endif
131
132         /* Register disk writers */
133 #ifdef DRV_WAV
134         _mm_registerdriver(&drv_wav);
135 #endif
136 #ifdef DRV_AIFF
137         _mm_registerdriver(&drv_aiff);
138 #endif
139 #ifdef DRV_RAW
140         _mm_registerdriver(&drv_raw);
141 #endif
142
143         /* Register other drivers */
144 #ifdef DRV_PIPE
145         _mm_registerdriver(&drv_pipe);
146 #endif
147 #if defined(DRV_STDOUT) && !defined(macintosh)
148         _mm_registerdriver(&drv_stdout);
149 #endif
150
151         /* Register 'nosound' driver */
152         _mm_registerdriver(&drv_nos);
153 }
154
155 MIKMODAPI void MikMod_RegisterAllDrivers(void)
156 {
157         MUTEX_LOCK(lists);
158         _mm_registeralldrivers();
159         MUTEX_UNLOCK(lists);
160 }
161
162 /* ex:set ts=4: */