1 /***********************************************************************\
2 *                               mmsystem.d                              *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module windows.mmsystem;
11 pragma(lib, "winmm");
12 
13 /*	The #defines MAKEFOURCC, mmioFOURCC, sndAlias are used to define
14  *	compile-time constants, so they are implemented as templates.
15  */
16 nothrow:
17 private import windows.w32api, windows.windef, windows.winver;
18 
19 align(1):
20 
21 const MAXPNAMELEN = 32;
22 const MAXERRORLENGTH = 256;
23 const MAX_JOYSTICKOEMVXDNAME = 260;
24 
25 const TIME_MS      = 1;
26 const TIME_SAMPLES = 2;
27 const TIME_BYTES   = 4;
28 const TIME_SMPTE   = 8;
29 const TIME_MIDI    = 16;
30 const TIME_TICKS   = 32;
31 
32 template MAKEFOURCC(char c0, char c1, char c2, char c3)
33 {
34 	const DWORD MAKEFOURCC = c0 | (c1<<8) | (c2<<16) | (cast(DWORD)c3 <<24);
35 }
36 
37 template mmioFOURCC(char c0, char c1, char c2, char c3)
38 {
39 	const DWORD mmioFOURCC = c0 | (c1<<8) | (c2<<16) | (cast(DWORD)c3 <<24);
40 }
41 
42 enum {
43 	MM_JOY1MOVE            = 0x3A0,
44 	MM_JOY2MOVE,
45 	MM_JOY1ZMOVE,
46 	MM_JOY2ZMOVE,       // = 0x3A3
47 	MM_JOY1BUTTONDOWN      = 0x3B5,
48 	MM_JOY2BUTTONDOWN,
49 	MM_JOY1BUTTONUP,
50 	MM_JOY2BUTTONUP,
51 	MM_MCINOTIFY,       // = 0x3B9
52 	MM_WOM_OPEN            = 0x3BB,
53 	MM_WOM_CLOSE,
54 	MM_WOM_DONE,
55 	MM_WIM_OPEN,
56 	MM_WIM_CLOSE,
57 	MM_WIM_DATA,
58 	MM_MIM_OPEN,
59 	MM_MIM_CLOSE,
60 	MM_MIM_DATA,
61 	MM_MIM_LONGDATA,
62 	MM_MIM_ERROR,
63 	MM_MIM_LONGERROR,
64 	MM_MOM_OPEN,
65 	MM_MOM_CLOSE,
66 	MM_MOM_DONE,        // = 0x3C9
67 	MM_DRVM_OPEN           = 0x3D0,
68 	MM_DRVM_CLOSE,
69 	MM_DRVM_DATA,
70 	MM_DRVM_ERROR,
71 	MM_STREAM_OPEN,
72 	MM_STREAM_CLOSE,
73 	MM_STREAM_DONE,
74 	MM_STREAM_ERROR,    // = 0x3D7
75 	MM_MOM_POSITIONCB      = 0x3CA,
76 	MM_MCISIGNAL,
77 	MM_MIM_MOREDATA,    // = 0x3CC
78 	MM_MIXM_LINE_CHANGE    = 0x3D0,
79 	MM_MIXM_CONTROL_CHANGE = 0x3D1
80 }
81 
82 const MMSYSERR_BASE     =    0;
83 const WAVERR_BASE       =   32;
84 const MIDIERR_BASE      =   64;
85 const TIMERR_BASE       =   96;
86 const JOYERR_BASE       =  160;
87 const MCIERR_BASE       =  256;
88 const MIXERR_BASE       = 1024;
89 const MCI_STRING_OFFSET =  512;
90 const MCI_VD_OFFSET     = 1024;
91 const MCI_CD_OFFSET     = 1088;
92 const MCI_WAVE_OFFSET   = 1152;
93 const MCI_SEQ_OFFSET    = 1216;
94 
95 enum {
96 	MMSYSERR_NOERROR        = 0,
97 	MMSYSERR_ERROR          = MMSYSERR_BASE+1,
98 	MMSYSERR_BADDEVICEID,
99 	MMSYSERR_NOTENABLED,
100 	MMSYSERR_ALLOCATED,
101 	MMSYSERR_INVALHANDLE,
102 	MMSYSERR_NODRIVER,
103 	MMSYSERR_NOMEM,
104 	MMSYSERR_NOTSUPPORTED,
105 	MMSYSERR_BADERRNUM,
106 	MMSYSERR_INVALFLAG,
107 	MMSYSERR_INVALPARAM,
108 	MMSYSERR_HANDLEBUSY,
109 	MMSYSERR_INVALIDALIAS,
110 	MMSYSERR_BADDB,
111 	MMSYSERR_KEYNOTFOUND,
112 	MMSYSERR_READERROR,
113 	MMSYSERR_WRITEERROR,
114 	MMSYSERR_DELETEERROR,
115 	MMSYSERR_VALNOTFOUND,
116 	MMSYSERR_NODRIVERCB, // = MMSYSERR_BASE+20
117 	MMSYSERR_LASTERROR      = MMSYSERR_NODRIVERCB
118 }
119 
120 enum {
121 	DRV_LOAD = 1,
122 	DRV_ENABLE,
123 	DRV_OPEN,
124 	DRV_CLOSE,
125 	DRV_DISABLE,
126 	DRV_FREE,
127 	DRV_CONFIGURE,
128 	DRV_QUERYCONFIGURE,
129 	DRV_INSTALL,
130 	DRV_REMOVE,
131 	DRV_EXITSESSION,
132 	DRV_POWER
133 }
134 
135 const DRV_RESERVED = 0x800;
136 const DRV_USER = 0x4000;
137 
138 const DRVCNF_CANCEL = 0;
139 const DRVCNF_OK = 1;
140 const DRVCNF_RESTART = 2;
141 const DRV_CANCEL = DRVCNF_CANCEL;
142 const DRV_OK = DRVCNF_OK;
143 const DRV_RESTART = DRVCNF_RESTART;
144 const DRV_MCI_FIRST = DRV_RESERVED;
145 const DRV_MCI_LAST  = DRV_RESERVED + 0xFFF;
146 
147 const CALLBACK_TYPEMASK = 0x70000;
148 const CALLBACK_NULL     = 0;
149 const CALLBACK_WINDOW   = 0x10000;
150 const CALLBACK_TASK     = 0x20000;
151 const CALLBACK_FUNCTION = 0x30000;
152 const CALLBACK_THREAD   = CALLBACK_TASK;
153 const CALLBACK_EVENT    = 0x50000;
154 
155 const SND_SYNC=0;
156 const SND_ASYNC=1;
157 const SND_NODEFAULT=2;
158 const SND_MEMORY=4;
159 const SND_LOOP=8;
160 const SND_NOSTOP=16;
161 const SND_NOWAIT=0x2000;
162 const SND_ALIAS=0x10000;
163 const SND_ALIAS_ID=0x110000;
164 const SND_FILENAME=0x20000;
165 const SND_RESOURCE=0x40004;
166 const SND_PURGE=0x40;
167 const SND_APPLICATION=0x80;
168 const SND_ALIAS_START=0;
169 
170 template sndAlias(char c0, char c1)
171 {
172 	const DWORD sndAlias = SND_ALIAS_START + c0 | (c1<<8);
173 }
174 
175 const SND_ALIAS_SYSTEMASTERISK    = sndAlias!('S', '*');
176 const SND_ALIAS_SYSTEMQUESTION    = sndAlias!('S', '?');
177 const SND_ALIAS_SYSTEMHAND        = sndAlias!('S', 'H');
178 const SND_ALIAS_SYSTEMEXIT        = sndAlias!('S', 'E');
179 const SND_ALIAS_SYSTEMSTART       = sndAlias!('S', 'S');
180 const SND_ALIAS_SYSTEMWELCOME     = sndAlias!('S', 'W');
181 const SND_ALIAS_SYSTEMEXCLAMATION = sndAlias!('S', '!');
182 const SND_ALIAS_SYSTEMDEFAULT     = sndAlias!('S', 'D');
183 
184 enum {
185 	WAVERR_BADFORMAT  = (WAVERR_BASE + 0),
186 	WAVERR_STILLPLAYING,
187 	WAVERR_UNPREPARED,
188 	WAVERR_SYNC,  // = WAVERR_BASE + 3;
189 	WAVERR_LASTERROR = WAVERR_SYNC
190 }
191 
192 const WOM_OPEN  = MM_WOM_OPEN;
193 const WOM_CLOSE = MM_WOM_CLOSE;
194 const WOM_DONE  = MM_WOM_DONE;
195 const WIM_OPEN  = MM_WIM_OPEN;
196 const WIM_CLOSE = MM_WIM_CLOSE;
197 const WIM_DATA  = MM_WIM_DATA;
198 
199 const UINT WAVE_MAPPER= -1;  // FIXME: This doesn't make sense!
200 const WAVE_FORMAT_QUERY=1;
201 const WAVE_ALLOWSYNC=2;
202 const WAVE_MAPPED=4;
203 const WAVE_FORMAT_DIRECT=8;
204 const WAVE_FORMAT_DIRECT_QUERY=(WAVE_FORMAT_QUERY|WAVE_FORMAT_DIRECT);
205 const WHDR_DONE=1;
206 const WHDR_PREPARED=2;
207 const WHDR_BEGINLOOP=4;
208 const WHDR_ENDLOOP=8;
209 const WHDR_INQUEUE=16;
210 
211 const WAVECAPS_PITCH=1;
212 const WAVECAPS_PLAYBACKRATE=2;
213 const WAVECAPS_VOLUME=4;
214 const WAVECAPS_LRVOLUME=8;
215 const WAVECAPS_SYNC=16;
216 const WAVECAPS_SAMPLEACCURATE=32;
217 const WAVECAPS_DIRECTSOUND=64;
218 
219 const WAVE_INVALIDFORMAT=0;
220 const WAVE_FORMAT_1M08=1;
221 const WAVE_FORMAT_1S08=2;
222 const WAVE_FORMAT_1M16=4;
223 const WAVE_FORMAT_1S16=8;
224 const WAVE_FORMAT_2M08=16;
225 const WAVE_FORMAT_2S08=32;
226 const WAVE_FORMAT_2M16=64;
227 const WAVE_FORMAT_2S16=128;
228 const WAVE_FORMAT_4M08=256;
229 const WAVE_FORMAT_4S08=512;
230 const WAVE_FORMAT_4M16=1024;
231 const WAVE_FORMAT_4S16=2048;
232 const WAVE_FORMAT_PCM=1;
233 
234 enum {
235 	MIDIERR_UNPREPARED = MIDIERR_BASE,
236 	MIDIERR_STILLPLAYING,
237 	MIDIERR_NOMAP,
238 	MIDIERR_NOTREADY,
239 	MIDIERR_NODEVICE,
240 	MIDIERR_INVALIDSETUP,
241 	MIDIERR_BADOPENMODE,
242 	MIDIERR_DONT_CONTINUE, // = MIDIERR_BASE+7
243 	MIDIERR_LASTERROR = MIDIERR_DONT_CONTINUE
244 }
245 
246 const MIDIPATCHSIZE=128;
247 
248 const MIM_OPEN=MM_MIM_OPEN;
249 const MIM_CLOSE=MM_MIM_CLOSE;
250 const MIM_DATA=MM_MIM_DATA;
251 const MIM_LONGDATA=MM_MIM_LONGDATA;
252 const MIM_ERROR=MM_MIM_ERROR;
253 const MIM_LONGERROR=MM_MIM_LONGERROR;
254 const MOM_OPEN=MM_MOM_OPEN;
255 const MOM_CLOSE=MM_MOM_CLOSE;
256 const MOM_DONE=MM_MOM_DONE;
257 const MIM_MOREDATA=MM_MIM_MOREDATA;
258 const MOM_POSITIONCB=MM_MOM_POSITIONCB;
259 
260 const UINT MIDIMAPPER= -1; // FIXME: uint is nonsense for this!
261 const UINT MIDI_MAPPER= -1; // FIXME: uint is nonsense for this!
262 const MIDI_IO_STATUS=32;
263 const MIDI_CACHE_ALL=1;
264 const MIDI_CACHE_BESTFIT=2;
265 const MIDI_CACHE_QUERY=3;
266 const MIDI_UNCACHE=4;
267 const MOD_MIDIPORT=1;
268 const MOD_SYNTH=2;
269 const MOD_SQSYNTH=3;
270 const MOD_FMSYNTH=4;
271 const MOD_MAPPER=5;
272 const MIDICAPS_VOLUME=1;
273 const MIDICAPS_LRVOLUME=2;
274 const MIDICAPS_CACHE=4;
275 const MIDICAPS_STREAM=8;
276 const MHDR_DONE=1;
277 const MHDR_PREPARED=2;
278 const MHDR_INQUEUE=4;
279 const MHDR_ISSTRM=8;
280 const MEVT_F_SHORT=0;
281 const MEVT_F_LONG=0x80000000;
282 const MEVT_F_CALLBACK=0x40000000;
283 
284 BYTE MEVT_EVENTTYPE(DWORD x) { return cast(BYTE)((x>>24) &0xFF); }
285 DWORD MEVT_EVENTPARM(DWORD x) { return x & 0xFFFFFF; }
286 
287 const MEVT_SHORTMSG=0;
288 const MEVT_TEMPO=1;
289 const MEVT_NOP=2;
290 
291 const BYTE MEVT_LONGMSG = 0x80;
292 const BYTE MEVT_COMMENT = 0x82;
293 const BYTE MEVT_VERSION = 0x84;
294 
295 const MIDISTRM_ERROR = -2;
296 
297 const MIDIPROP_SET = 0x80000000;
298 const MIDIPROP_GET = 0x40000000;
299 const MIDIPROP_TIMEDIV = 1;
300 const MIDIPROP_TEMPO = 2;
301 
302 const UINT AUX_MAPPER = -1;
303 
304 const AUXCAPS_CDAUDIO=1;
305 const AUXCAPS_AUXIN=2;
306 const AUXCAPS_VOLUME=1;
307 const AUXCAPS_LRVOLUME=2;
308 const MIXER_SHORT_NAME_CHARS=16;
309 const MIXER_LONG_NAME_CHARS=64;
310 const MIXERR_INVALLINE=MIXERR_BASE;
311 const MIXERR_INVALCONTROL=(MIXERR_BASE+1);
312 const MIXERR_INVALVALUE=(MIXERR_BASE+2);
313 const MIXERR_LASTERROR=(MIXERR_BASE+2);
314 
315 const MIXER_OBJECTF_HANDLE=0x80000000;
316 const MIXER_OBJECTF_MIXER=0;
317 const MIXER_OBJECTF_HMIXER=(MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER);
318 const MIXER_OBJECTF_WAVEOUT=0x10000000;
319 const MIXER_OBJECTF_HWAVEOUT=(MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT);
320 const MIXER_OBJECTF_WAVEIN=0x20000000;
321 const MIXER_OBJECTF_HWAVEIN=(MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN);
322 const MIXER_OBJECTF_MIDIOUT=0x30000000;
323 const MIXER_OBJECTF_HMIDIOUT=(MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT);
324 const MIXER_OBJECTF_MIDIIN=0x40000000;
325 const MIXER_OBJECTF_HMIDIIN=(MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN);
326 const MIXER_OBJECTF_AUX=0x50000000;
327 
328 const MIXERLINE_LINEF_ACTIVE=1;
329 const MIXERLINE_LINEF_DISCONNECTED=0x8000;
330 const MIXERLINE_LINEF_SOURCE=0x80000000;
331 
332 const MIXERLINE_COMPONENTTYPE_DST_FIRST=0;
333 const MIXERLINE_COMPONENTTYPE_DST_UNDEFINED=MIXERLINE_COMPONENTTYPE_DST_FIRST;
334 const MIXERLINE_COMPONENTTYPE_DST_DIGITAL=(MIXERLINE_COMPONENTTYPE_DST_FIRST+1);
335 const MIXERLINE_COMPONENTTYPE_DST_LINE=(MIXERLINE_COMPONENTTYPE_DST_FIRST+2);
336 const MIXERLINE_COMPONENTTYPE_DST_MONITOR=(MIXERLINE_COMPONENTTYPE_DST_FIRST+3);
337 const MIXERLINE_COMPONENTTYPE_DST_SPEAKERS=(MIXERLINE_COMPONENTTYPE_DST_FIRST+4);
338 const MIXERLINE_COMPONENTTYPE_DST_HEADPHONES=(MIXERLINE_COMPONENTTYPE_DST_FIRST+5);
339 const MIXERLINE_COMPONENTTYPE_DST_TELEPHONE=(MIXERLINE_COMPONENTTYPE_DST_FIRST+6);
340 const MIXERLINE_COMPONENTTYPE_DST_WAVEIN=(MIXERLINE_COMPONENTTYPE_DST_FIRST+7);
341 const MIXERLINE_COMPONENTTYPE_DST_VOICEIN=(MIXERLINE_COMPONENTTYPE_DST_FIRST+8);
342 const MIXERLINE_COMPONENTTYPE_DST_LAST=(MIXERLINE_COMPONENTTYPE_DST_FIRST+8);
343 const MIXERLINE_COMPONENTTYPE_SRC_FIRST=0x1000;
344 const MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED=MIXERLINE_COMPONENTTYPE_SRC_FIRST;
345 const MIXERLINE_COMPONENTTYPE_SRC_DIGITAL=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+1);
346 const MIXERLINE_COMPONENTTYPE_SRC_LINE=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+2);
347 const MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+3);
348 const MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+4);
349 const MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+5);
350 const MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+6);
351 const MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+7);
352 const MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+8);
353 const MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+9);
354 const MIXERLINE_COMPONENTTYPE_SRC_ANALOG=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+10);
355 const MIXERLINE_COMPONENTTYPE_SRC_LAST=(MIXERLINE_COMPONENTTYPE_SRC_FIRST+10);
356 
357 enum {
358 	MIXERLINE_TARGETTYPE_UNDEFINED = 0,
359 	MIXERLINE_TARGETTYPE_WAVEOUT,
360 	MIXERLINE_TARGETTYPE_WAVEIN,
361 	MIXERLINE_TARGETTYPE_MIDIOUT,
362 	MIXERLINE_TARGETTYPE_MIDIIN,
363 	MIXERLINE_TARGETTYPE_AUX // =5
364 }
365 
366 const MIXER_GETLINEINFOF_DESTINATION=0;
367 const MIXER_GETLINEINFOF_SOURCE=1;
368 const MIXER_GETLINEINFOF_LINEID=2;
369 const MIXER_GETLINEINFOF_COMPONENTTYPE=3;
370 const MIXER_GETLINEINFOF_TARGETTYPE=4;
371 const MIXER_GETLINEINFOF_QUERYMASK=15;
372 
373 const MIXERCONTROL_CONTROLF_UNIFORM=1;
374 const MIXERCONTROL_CONTROLF_MULTIPLE=2;
375 const MIXERCONTROL_CONTROLF_DISABLED=0x80000000;
376 const MIXERCONTROL_CT_CLASS_MASK=0xF0000000;
377 const MIXERCONTROL_CT_CLASS_CUSTOM=0;
378 const MIXERCONTROL_CT_CLASS_METER=0x10000000;
379 const MIXERCONTROL_CT_CLASS_SWITCH=0x20000000;
380 const MIXERCONTROL_CT_CLASS_NUMBER=0x30000000;
381 const MIXERCONTROL_CT_CLASS_SLIDER=0x40000000;
382 const MIXERCONTROL_CT_CLASS_FADER=0x50000000;
383 const MIXERCONTROL_CT_CLASS_TIME=0x60000000;
384 const MIXERCONTROL_CT_CLASS_LIST=0x70000000;
385 const MIXERCONTROL_CT_SUBCLASS_MASK=0xF000000;
386 const MIXERCONTROL_CT_SC_SWITCH_BOOLEAN=0;
387 const MIXERCONTROL_CT_SC_SWITCH_BUTTON=0x1000000;
388 const MIXERCONTROL_CT_SC_METER_POLLED=0;
389 const MIXERCONTROL_CT_SC_TIME_MICROSECS=0;
390 const MIXERCONTROL_CT_SC_TIME_MILLISECS=0x1000000;
391 const MIXERCONTROL_CT_SC_LIST_SINGLE=0;
392 const MIXERCONTROL_CT_SC_LIST_MULTIPLE=0x1000000;
393 const MIXERCONTROL_CT_UNITS_MASK=0xFF0000;
394 const MIXERCONTROL_CT_UNITS_CUSTOM=0;
395 const MIXERCONTROL_CT_UNITS_BOOLEAN=0x10000;
396 const MIXERCONTROL_CT_UNITS_SIGNED=0x20000;
397 const MIXERCONTROL_CT_UNITS_UNSIGNED=0x30000;
398 const MIXERCONTROL_CT_UNITS_DECIBELS=0x40000;
399 const MIXERCONTROL_CT_UNITS_PERCENT=0x50000;
400 
401 const MIXERCONTROL_CONTROLTYPE_CUSTOM=(MIXERCONTROL_CT_CLASS_CUSTOM|MIXERCONTROL_CT_UNITS_CUSTOM);
402 const MIXERCONTROL_CONTROLTYPE_BOOLEANMETER=(MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_BOOLEAN);
403 const MIXERCONTROL_CONTROLTYPE_SIGNEDMETER=(MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_SIGNED);
404 const MIXERCONTROL_CONTROLTYPE_PEAKMETER=(MIXERCONTROL_CONTROLTYPE_SIGNEDMETER+1);
405 const MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER=(MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_UNSIGNED);
406 const MIXERCONTROL_CONTROLTYPE_BOOLEAN=(MIXERCONTROL_CT_CLASS_SWITCH|MIXERCONTROL_CT_SC_SWITCH_BOOLEAN|MIXERCONTROL_CT_UNITS_BOOLEAN);
407 const MIXERCONTROL_CONTROLTYPE_ONOFF=(MIXERCONTROL_CONTROLTYPE_BOOLEAN+1);
408 const MIXERCONTROL_CONTROLTYPE_MUTE=(MIXERCONTROL_CONTROLTYPE_BOOLEAN+2);
409 const MIXERCONTROL_CONTROLTYPE_MONO=(MIXERCONTROL_CONTROLTYPE_BOOLEAN+3);
410 const MIXERCONTROL_CONTROLTYPE_LOUDNESS=(MIXERCONTROL_CONTROLTYPE_BOOLEAN+4);
411 const MIXERCONTROL_CONTROLTYPE_STEREOENH=(MIXERCONTROL_CONTROLTYPE_BOOLEAN+5);
412 const MIXERCONTROL_CONTROLTYPE_BUTTON=(MIXERCONTROL_CT_CLASS_SWITCH|MIXERCONTROL_CT_SC_SWITCH_BUTTON|MIXERCONTROL_CT_UNITS_BOOLEAN);
413 const MIXERCONTROL_CONTROLTYPE_DECIBELS=(MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_DECIBELS);
414 const MIXERCONTROL_CONTROLTYPE_SIGNED=(MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_SIGNED);
415 const MIXERCONTROL_CONTROLTYPE_UNSIGNED=(MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_UNSIGNED);
416 const MIXERCONTROL_CONTROLTYPE_PERCENT=(MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_PERCENT);
417 const MIXERCONTROL_CONTROLTYPE_SLIDER=(MIXERCONTROL_CT_CLASS_SLIDER|MIXERCONTROL_CT_UNITS_SIGNED);
418 const MIXERCONTROL_CONTROLTYPE_PAN=(MIXERCONTROL_CONTROLTYPE_SLIDER+1);
419 const MIXERCONTROL_CONTROLTYPE_QSOUNDPAN=(MIXERCONTROL_CONTROLTYPE_SLIDER+2);
420 const MIXERCONTROL_CONTROLTYPE_FADER=(MIXERCONTROL_CT_CLASS_FADER|MIXERCONTROL_CT_UNITS_UNSIGNED);
421 const MIXERCONTROL_CONTROLTYPE_VOLUME=(MIXERCONTROL_CONTROLTYPE_FADER+1);
422 const MIXERCONTROL_CONTROLTYPE_BASS=(MIXERCONTROL_CONTROLTYPE_FADER+2);
423 const MIXERCONTROL_CONTROLTYPE_TREBLE=(MIXERCONTROL_CONTROLTYPE_FADER+3);
424 const MIXERCONTROL_CONTROLTYPE_EQUALIZER=(MIXERCONTROL_CONTROLTYPE_FADER+4);
425 const MIXERCONTROL_CONTROLTYPE_SINGLESELECT=(MIXERCONTROL_CT_CLASS_LIST|MIXERCONTROL_CT_SC_LIST_SINGLE|MIXERCONTROL_CT_UNITS_BOOLEAN);
426 const MIXERCONTROL_CONTROLTYPE_MUX=(MIXERCONTROL_CONTROLTYPE_SINGLESELECT+1);
427 const MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT=(MIXERCONTROL_CT_CLASS_LIST|MIXERCONTROL_CT_SC_LIST_MULTIPLE|MIXERCONTROL_CT_UNITS_BOOLEAN);
428 const MIXERCONTROL_CONTROLTYPE_MIXER=(MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT+1);
429 const MIXERCONTROL_CONTROLTYPE_MICROTIME=(MIXERCONTROL_CT_CLASS_TIME|MIXERCONTROL_CT_SC_TIME_MICROSECS|MIXERCONTROL_CT_UNITS_UNSIGNED);
430 const MIXERCONTROL_CONTROLTYPE_MILLITIME=(MIXERCONTROL_CT_CLASS_TIME|MIXERCONTROL_CT_SC_TIME_MILLISECS|MIXERCONTROL_CT_UNITS_UNSIGNED);
431 
432 const MIXER_GETLINECONTROLSF_ALL=0;
433 const MIXER_GETLINECONTROLSF_ONEBYID=1;
434 const MIXER_GETLINECONTROLSF_ONEBYTYPE=2;
435 const MIXER_GETLINECONTROLSF_QUERYMASK=15;
436 const MIXER_GETCONTROLDETAILSF_VALUE=0;
437 const MIXER_GETCONTROLDETAILSF_LISTTEXT=1;
438 const MIXER_GETCONTROLDETAILSF_QUERYMASK=15;
439 const MIXER_SETCONTROLDETAILSF_VALUE=0;
440 const MIXER_SETCONTROLDETAILSF_CUSTOM=1;
441 const MIXER_SETCONTROLDETAILSF_QUERYMASK=15;
442 
443 const TIMERR_NOERROR=0;
444 const TIMERR_NOCANDO=(TIMERR_BASE+1);
445 const TIMERR_STRUCT=(TIMERR_BASE+33);
446 const TIME_ONESHOT=0;
447 const TIME_PERIODIC=1;
448 const TIME_CALLBACK_FUNCTION=0;
449 const TIME_CALLBACK_EVENT_SET=16;
450 const TIME_CALLBACK_EVENT_PULSE=32;
451 
452 static if (_WIN32_WINNT >= 0x501) {
453 
454 const TIME_KILL_SYNCHRONOUS=0x0100;
455 
456 }
457 
458 const JOYERR_NOERROR = 0;
459 const JOYERR_PARMS=(JOYERR_BASE+5);
460 const JOYERR_NOCANDO=(JOYERR_BASE+6);
461 const JOYERR_UNPLUGGED=(JOYERR_BASE+7);
462 
463 const JOY_BUTTON1=1;
464 const JOY_BUTTON2=2;
465 const JOY_BUTTON3=4;
466 const JOY_BUTTON4=8;
467 const JOY_BUTTON1CHG=256;
468 const JOY_BUTTON2CHG=512;
469 const JOY_BUTTON3CHG=1024;
470 const JOY_BUTTON4CHG=2048;
471 const JOY_BUTTON5=257;
472 const JOY_BUTTON6=513;
473 const JOY_BUTTON7=1025;
474 const JOY_BUTTON8=2049;
475 const JOY_BUTTON9=256;
476 const JOY_BUTTON10=512;
477 const JOY_BUTTON11=1024;
478 const JOY_BUTTON12=2048;
479 const JOY_BUTTON13=4096;
480 const JOY_BUTTON14=8192;
481 const JOY_BUTTON15=16384;
482 const JOY_BUTTON16=32768;
483 const JOY_BUTTON17=65536;
484 const JOY_BUTTON18=0x20000;
485 const JOY_BUTTON19=0x40000;
486 const JOY_BUTTON20=0x80000;
487 const JOY_BUTTON21=0x100000;
488 const JOY_BUTTON22=0x200000;
489 const JOY_BUTTON23=0x400000;
490 const JOY_BUTTON24=0x800000;
491 const JOY_BUTTON25=0x1000000;
492 const JOY_BUTTON26=0x2000000;
493 const JOY_BUTTON27=0x4000000;
494 const JOY_BUTTON28=0x8000000;
495 const JOY_BUTTON29=0x10000000;
496 const JOY_BUTTON30=0x20000000;
497 const JOY_BUTTON31=0x40000000;
498 const JOY_BUTTON32=0x80000000;
499 
500 enum  : DWORD {
501 	JOY_POVCENTERED = -1,
502 	JOY_POVFORWARD  = 0,
503 	JOY_POVBACKWARD = 18000,
504 	JOY_POVLEFT     = 27000,
505 	JOY_POVRIGHT    = 9000
506 }
507 
508 const DWORD
509 	JOY_RETURNX        = 0x00000001,
510 	JOY_RETURNY        = 0x00000002,
511 	JOY_RETURNZ        = 0x00000004,
512 	JOY_RETURNR        = 0x00000008,
513 	JOY_RETURNU        = 0x00000010,
514 	JOY_RETURNV        = 0x00000020,
515 	JOY_RETURNPOV      = 0x00000040,
516 	JOY_RETURNBUTTONS  = 0x00000080,
517 	JOY_RETURNRAWDATA  = 0x00000100,
518 	JOY_RETURNPOVCTS   = 0x00000200,
519 	JOY_RETURNCENTERED = 0x00000400,
520 	JOY_USEDEADZONE    = 0x00000800,
521 	JOY_RETURNALL      = JOY_RETURNX | JOY_RETURNY | JOY_RETURNZ | JOY_RETURNR
522 	                     | JOY_RETURNU | JOY_RETURNV | JOY_RETURNPOV
523 	                     | JOY_RETURNBUTTONS,
524 	JOY_CAL_READALWAYS = 0x00010000,
525 	JOY_CAL_READXYONLY = 0x00020000,
526 	JOY_CAL_READ3      = 0x00040000,
527 	JOY_CAL_READ4      = 0x00080000,
528 	JOY_CAL_READXONLY  = 0x00100000,
529 	JOY_CAL_READYONLY  = 0x00200000,
530 	JOY_CAL_READ5      = 0x00400000,
531 	JOY_CAL_READ6      = 0x00800000,
532 	JOY_CAL_READZONLY  = 0x01000000,
533 	JOY_CAL_READRONLY  = 0x02000000,
534 	JOY_CAL_READUONLY  = 0x04000000,
535 	JOY_CAL_READVONLY  = 0x08000000;
536 
537 const JOYSTICKID1=0;
538 const JOYSTICKID2=1;
539 
540 const JOYCAPS_HASZ=1;
541 const JOYCAPS_HASR=2;
542 const JOYCAPS_HASU=4;
543 const JOYCAPS_HASV=8;
544 const JOYCAPS_HASPOV=16;
545 const JOYCAPS_POV4DIR=32;
546 const JOYCAPS_POVCTS=64;
547 
548 const MMIOERR_BASE=256;
549 const MMIOERR_FILENOTFOUND=(MMIOERR_BASE+1);
550 const MMIOERR_OUTOFMEMORY=(MMIOERR_BASE+2);
551 const MMIOERR_CANNOTOPEN=(MMIOERR_BASE+3);
552 const MMIOERR_CANNOTCLOSE=(MMIOERR_BASE+4);
553 const MMIOERR_CANNOTREAD=(MMIOERR_BASE+5);
554 const MMIOERR_CANNOTWRITE=(MMIOERR_BASE+6);
555 const MMIOERR_CANNOTSEEK=(MMIOERR_BASE+7);
556 const MMIOERR_CANNOTEXPAND=(MMIOERR_BASE+8);
557 const MMIOERR_CHUNKNOTFOUND=(MMIOERR_BASE+9);
558 const MMIOERR_UNBUFFERED=(MMIOERR_BASE+10);
559 const MMIOERR_PATHNOTFOUND=(MMIOERR_BASE+11);
560 const MMIOERR_ACCESSDENIED=(MMIOERR_BASE+12);
561 const MMIOERR_SHARINGVIOLATION=(MMIOERR_BASE+13);
562 const MMIOERR_NETWORKERROR=(MMIOERR_BASE+14);
563 const MMIOERR_TOOMANYOPENFILES=(MMIOERR_BASE+15);
564 const MMIOERR_INVALIDFILE=(MMIOERR_BASE+16);
565 
566 const CFSEPCHAR='+';
567 
568 const MMIO_RWMODE=3;
569 const MMIO_SHAREMODE=0x70;
570 const MMIO_CREATE=0x1000;
571 const MMIO_PARSE=256;
572 const MMIO_DELETE=512;
573 const MMIO_EXIST=0x4000;
574 const MMIO_ALLOCBUF=0x10000;
575 const MMIO_GETTEMP=0x20000;
576 const MMIO_DIRTY=0x10000000;
577 const MMIO_READ=0;
578 const MMIO_WRITE=1;
579 const MMIO_READWRITE=2;
580 const MMIO_COMPAT=0;
581 const MMIO_EXCLUSIVE=16;
582 const MMIO_DENYWRITE=32;
583 const MMIO_DENYREAD=0x30;
584 const MMIO_DENYNONE=64;
585 const MMIO_FHOPEN=16;
586 const MMIO_EMPTYBUF=16;
587 const MMIO_TOUPPER=16;
588 const MMIO_INSTALLPROC=0x10000;
589 const MMIO_GLOBALPROC=0x10000000;
590 const MMIO_REMOVEPROC=0x20000;
591 const MMIO_UNICODEPROC=0x1000000;
592 const MMIO_FINDPROC=0x40000;
593 const MMIO_FINDCHUNK=16;
594 const MMIO_FINDRIFF=32;
595 const MMIO_FINDLIST=64;
596 const MMIO_CREATERIFF=32;
597 const MMIO_CREATELIST=64;
598 const MMIOM_READ=MMIO_READ;
599 const MMIOM_WRITE=MMIO_WRITE;
600 const MMIOM_SEEK=2;
601 const MMIOM_OPEN=3;
602 const MMIOM_CLOSE=4;
603 const MMIOM_WRITEFLUSH=5;
604 const MMIOM_RENAME=6;
605 const MMIOM_USER=0x8000;
606 
607 const FOURCC_RIFF = mmioFOURCC!('R', 'I', 'F', 'F');
608 const FOURCC_LIST = mmioFOURCC!('L', 'I', 'S', 'T');
609 const FOURCC_DOS  = mmioFOURCC!('D', 'O', 'S', ' ');
610 const FOURCC_MEM  = mmioFOURCC!('M', 'E', 'M', ' ');
611 
612 const MMIO_DEFAULTBUFFER=8192;
613 
614 enum {
615 	MCIERR_INVALID_DEVICE_ID = MCIERR_BASE + 1,
616 	MCIERR_UNRECOGNIZED_KEYWORD = MCIERR_BASE + 3,
617 	MCIERR_UNRECOGNIZED_COMMAND = MCIERR_BASE + 5,
618 	MCIERR_HARDWARE,
619 	MCIERR_INVALID_DEVICE_NAME,
620 	MCIERR_OUT_OF_MEMORY,
621 	MCIERR_DEVICE_OPEN,
622 	MCIERR_CANNOT_LOAD_DRIVER,
623 	MCIERR_MISSING_COMMAND_STRING,
624 	MCIERR_PARAM_OVERFLOW,
625 	MCIERR_MISSING_STRING_ARGUMENT,
626 	MCIERR_BAD_INTEGER,
627 	MCIERR_PARSER_INTERNAL,
628 	MCIERR_DRIVER_INTERNAL,
629 	MCIERR_MISSING_PARAMETER,
630 	MCIERR_UNSUPPORTED_FUNCTION,
631 	MCIERR_FILE_NOT_FOUND,
632 	MCIERR_DEVICE_NOT_READY,
633 	MCIERR_INTERNAL,
634 	MCIERR_DRIVER,
635 	MCIERR_CANNOT_USE_ALL,
636 	MCIERR_MULTIPLE,
637 	MCIERR_EXTENSION_NOT_FOUND,
638 	MCIERR_OUTOFRANGE, // = MCIERR_BASE+26
639 	MCIERR_FLAGS_NOT_COMPATIBLE = MCIERR_BASE + 28,
640 	MCIERR_FILE_NOT_SAVED = MCIERR_BASE + 30,
641 	MCIERR_DEVICE_TYPE_REQUIRED,
642 	MCIERR_DEVICE_LOCKED,
643 	MCIERR_DUPLICATE_ALIAS,
644 	MCIERR_BAD_CONSTANT,
645 	MCIERR_MUST_USE_SHAREABLE,
646 	MCIERR_MISSING_DEVICE_NAME,
647 	MCIERR_BAD_TIME_FORMAT,
648 	MCIERR_NO_CLOSING_QUOTE,
649 	MCIERR_DUPLICATE_FLAGS,
650 	MCIERR_INVALID_FILE,
651 	MCIERR_NULL_PARAMETER_BLOCK,
652 	MCIERR_UNNAMED_RESOURCE,
653 	MCIERR_NEW_REQUIRES_ALIAS,
654 	MCIERR_NOTIFY_ON_AUTO_OPEN,
655 	MCIERR_NO_ELEMENT_ALLOWED,
656 	MCIERR_NONAPPLICABLE_FUNCTION,
657 	MCIERR_ILLEGAL_FOR_AUTO_OPEN,
658 	MCIERR_FILENAME_REQUIRED,
659 	MCIERR_EXTRA_CHARACTERS,
660 	MCIERR_DEVICE_NOT_INSTALLED,
661 	MCIERR_GET_CD,
662 	MCIERR_SET_CD,
663 	MCIERR_SET_DRIVE,
664 	MCIERR_DEVICE_LENGTH,
665 	MCIERR_DEVICE_ORD_LENGTH,
666 	MCIERR_NO_INTEGER, // = MCIERR_BASE + 56
667 	MCIERR_WAVE_OUTPUTSINUSE = MCIERR_BASE + 64,
668 	MCIERR_WAVE_SETOUTPUTINUSE,
669 	MCIERR_WAVE_INPUTSINUSE,
670 	MCIERR_WAVE_SETINPUTINUSE,
671 	MCIERR_WAVE_OUTPUTUNSPECIFIED,
672 	MCIERR_WAVE_INPUTUNSPECIFIED,
673 	MCIERR_WAVE_OUTPUTSUNSUITABLE,
674 	MCIERR_WAVE_SETOUTPUTUNSUITABLE,
675 	MCIERR_WAVE_INPUTSUNSUITABLE,
676 	MCIERR_WAVE_SETINPUTUNSUITABLE, // = MCIERR_BASE + 73
677 	MCIERR_SEQ_DIV_INCOMPATIBLE = MCIERR_BASE + 80,
678 	MCIERR_SEQ_PORT_INUSE,
679 	MCIERR_SEQ_PORT_NONEXISTENT,
680 	MCIERR_SEQ_PORT_MAPNODEVICE,
681 	MCIERR_SEQ_PORT_MISCERROR,
682 	MCIERR_SEQ_TIMER,
683 	MCIERR_SEQ_PORTUNSPECIFIED,
684 	MCIERR_SEQ_NOMIDIPRESENT, // = MCIERR_BASE + 87
685 	MCIERR_NO_WINDOW = MCIERR_BASE + 90,
686 	MCIERR_CREATEWINDOW,
687 	MCIERR_FILE_READ,
688 	MCIERR_FILE_WRITE,
689 	MCIERR_NO_IDENTITY // = MCIERR_BASE + 94
690 }
691 const MCIERR_CUSTOM_DRIVER_BASE = MCIERR_BASE + 256;
692 
693 const MCI_FIRST=DRV_MCI_FIRST;
694 const MCI_OPEN=0x803;
695 const MCI_CLOSE=0x804;
696 const MCI_ESCAPE=0x805;
697 const MCI_PLAY=0x806;
698 const MCI_SEEK=0x807;
699 const MCI_STOP=0x808;
700 const MCI_PAUSE=0x809;
701 const MCI_INFO=0x80A;
702 const MCI_GETDEVCAPS=0x80B;
703 const MCI_SPIN=0x80C;
704 const MCI_SET=0x80D;
705 const MCI_STEP=0x80E;
706 const MCI_RECORD=0x80F;
707 const MCI_SYSINFO=0x810;
708 const MCI_BREAK=0x811;
709 const MCI_SAVE=0x813;
710 const MCI_STATUS=0x814;
711 const MCI_CUE=0x830;
712 const MCI_REALIZE=0x840;
713 const MCI_WINDOW=0x841;
714 const MCI_PUT=0x842;
715 const MCI_WHERE=0x843;
716 const MCI_FREEZE=0x844;
717 const MCI_UNFREEZE=0x845;
718 const MCI_LOAD=0x850;
719 const MCI_CUT=0x851;
720 const MCI_COPY=0x852;
721 const MCI_PASTE=0x853;
722 const MCI_UPDATE=0x854;
723 const MCI_RESUME=0x855;
724 const MCI_DELETE=0x856;
725 const MCI_USER_MESSAGES=(DRV_MCI_FIRST+0x400);
726 const MCI_LAST=0xFFF;
727 
728 const MCIDEVICEID MCI_ALL_DEVICE_ID = -1;
729 
730 const MCI_DEVTYPE_VCR=513;
731 const MCI_DEVTYPE_VIDEODISC=514;
732 const MCI_DEVTYPE_OVERLAY=515;
733 const MCI_DEVTYPE_CD_AUDIO=516;
734 const MCI_DEVTYPE_DAT=517;
735 const MCI_DEVTYPE_SCANNER=518;
736 const MCI_DEVTYPE_ANIMATION=519;
737 const MCI_DEVTYPE_DIGITAL_VIDEO=520;
738 const MCI_DEVTYPE_OTHER=521;
739 const MCI_DEVTYPE_WAVEFORM_AUDIO=522;
740 const MCI_DEVTYPE_SEQUENCER=523;
741 const MCI_DEVTYPE_FIRST=MCI_DEVTYPE_VCR;
742 const MCI_DEVTYPE_LAST=MCI_DEVTYPE_SEQUENCER;
743 const MCI_DEVTYPE_FIRST_USER=0x1000;
744 const MCI_MODE_NOT_READY=(MCI_STRING_OFFSET+12);
745 const MCI_MODE_STOP=(MCI_STRING_OFFSET+13);
746 const MCI_MODE_PLAY=(MCI_STRING_OFFSET+14);
747 const MCI_MODE_RECORD=(MCI_STRING_OFFSET+15);
748 const MCI_MODE_SEEK=(MCI_STRING_OFFSET+16);
749 const MCI_MODE_PAUSE=(MCI_STRING_OFFSET+17);
750 const MCI_MODE_OPEN=(MCI_STRING_OFFSET+18);
751 const MCI_FORMAT_MILLISECONDS=0;
752 const MCI_FORMAT_HMS=1;
753 const MCI_FORMAT_MSF=2;
754 const MCI_FORMAT_FRAMES=3;
755 const MCI_FORMAT_SMPTE_24=4;
756 const MCI_FORMAT_SMPTE_25=5;
757 const MCI_FORMAT_SMPTE_30=6;
758 const MCI_FORMAT_SMPTE_30DROP=7;
759 const MCI_FORMAT_BYTES=8;
760 const MCI_FORMAT_SAMPLES=9;
761 const MCI_FORMAT_TMSF=10;
762 
763 
764 
765 
766 // Macros
767 BYTE MCI_HMS_HOUR(DWORD t) { return cast(BYTE)(t); }
768 BYTE MCI_HMS_MINUTE(DWORD t) { return cast(BYTE)(t>>>8); }
769 BYTE MCI_HMS_SECOND(DWORD t) { return cast(BYTE)( t>>>16); }
770 DWORD MCI_MAKE_HMS(BYTE h, BYTE m, BYTE s) { return h |(m<<8)|(cast(DWORD)(s)<<16); }
771 DWORD MCI_MAKE_MSF(BYTE m, BYTE s, BYTE f) { return m |(s<<8)|(cast(DWORD)(f)<<16); }
772 DWORD MCI_MAKE_TMSF(BYTE t, BYTE m, BYTE s, BYTE f) {
773  return t |(m<<8)|(s<<16)|(cast(DWORD)(f)<< 24); }
774 
775 BYTE MCI_MSF_MINUTE(DWORD t) { return cast(BYTE)(t); }
776 BYTE MCI_MSF_SECOND(DWORD t) { return cast(BYTE)(t >>> 8); }
777 BYTE MCI_MSF_FRAME(DWORD t)  {  return cast(BYTE)(t >>> 16); }
778 
779 BYTE MCI_TMSF_TRACK(DWORD t)  { return cast(BYTE)(t); }
780 BYTE MCI_TMSF_MINUTE(DWORD t) { return cast(BYTE)(t>>8); }
781 BYTE MCI_TMSF_SECOND(DWORD t) { return cast(BYTE)(t>>16); }
782 BYTE MCI_TMSF_FRAME(DWORD t)  { return cast(BYTE)(t>>24); }
783 
784 
785 const MCI_NOTIFY_SUCCESSFUL=1;
786 const MCI_NOTIFY_SUPERSEDED=2;
787 const MCI_NOTIFY_ABORTED=4;
788 const MCI_NOTIFY_FAILURE=8;
789 const MCI_NOTIFY=1;
790 const MCI_WAIT=2;
791 const MCI_FROM=4;
792 const MCI_TO=8;
793 const MCI_TRACK=16;
794 const MCI_OPEN_SHAREABLE=256;
795 const MCI_OPEN_ELEMENT=512;
796 const MCI_OPEN_ALIAS=1024;
797 const MCI_OPEN_ELEMENT_ID=2048;
798 const MCI_OPEN_TYPE_ID=0x1000;
799 const MCI_OPEN_TYPE=0x2000;
800 const MCI_SEEK_TO_START=256;
801 const MCI_SEEK_TO_END=512;
802 const MCI_STATUS_ITEM=256;
803 const MCI_STATUS_START=512;
804 const MCI_STATUS_LENGTH=1;
805 const MCI_STATUS_POSITION=2;
806 const MCI_STATUS_NUMBER_OF_TRACKS=3;
807 const MCI_STATUS_MODE=4;
808 const MCI_STATUS_MEDIA_PRESENT=5;
809 const MCI_STATUS_TIME_FORMAT=6;
810 const MCI_STATUS_READY=7;
811 const MCI_STATUS_CURRENT_TRACK=8;
812 const MCI_INFO_PRODUCT=256;
813 const MCI_INFO_FILE=512;
814 const MCI_INFO_MEDIA_UPC=1024;
815 const MCI_INFO_MEDIA_IDENTITY=2048;
816 const MCI_INFO_NAME=0x1000;
817 const MCI_INFO_COPYRIGHT=0x2000;
818 
819 const MCI_GETDEVCAPS_ITEM=256;
820 const MCI_GETDEVCAPS_CAN_RECORD=1;
821 const MCI_GETDEVCAPS_HAS_AUDIO=2;
822 const MCI_GETDEVCAPS_HAS_VIDEO=3;
823 const MCI_GETDEVCAPS_DEVICE_TYPE=4;
824 const MCI_GETDEVCAPS_USES_FILES=5;
825 const MCI_GETDEVCAPS_COMPOUND_DEVICE=6;
826 const MCI_GETDEVCAPS_CAN_EJECT=7;
827 const MCI_GETDEVCAPS_CAN_PLAY=8;
828 const MCI_GETDEVCAPS_CAN_SAVE=9;
829 
830 const MCI_SYSINFO_QUANTITY=256;
831 const MCI_SYSINFO_OPEN=512;
832 const MCI_SYSINFO_NAME=1024;
833 const MCI_SYSINFO_INSTALLNAME=2048;
834 const MCI_SET_DOOR_OPEN=256;
835 const MCI_SET_DOOR_CLOSED=512;
836 const MCI_SET_TIME_FORMAT=1024;
837 const MCI_SET_AUDIO=2048;
838 const MCI_SET_VIDEO=0x1000;
839 const MCI_SET_ON=0x2000;
840 const MCI_SET_OFF=0x4000;
841 
842 const MCI_SET_AUDIO_ALL=0;
843 const MCI_SET_AUDIO_LEFT=1;
844 const MCI_SET_AUDIO_RIGHT=2;
845 
846 const MCI_BREAK_KEY=256;
847 const MCI_BREAK_HWND=512;
848 const MCI_BREAK_OFF=1024;
849 
850 const MCI_RECORD_INSERT=256;
851 const MCI_RECORD_OVERWRITE=512;
852 const MCI_SAVE_FILE=256;
853 const MCI_LOAD_FILE=256;
854 
855 const MCI_VD_MODE_PARK=(MCI_VD_OFFSET+1);
856 const MCI_VD_MEDIA_CLV=(MCI_VD_OFFSET+2);
857 const MCI_VD_MEDIA_CAV=(MCI_VD_OFFSET+3);
858 const MCI_VD_MEDIA_OTHER=(MCI_VD_OFFSET+4);
859 
860 const MCI_VD_FORMAT_TRACK=0x4001;
861 const MCI_VD_PLAY_REVERSE=0x10000;
862 const MCI_VD_PLAY_FAST=0x20000;
863 const MCI_VD_PLAY_SPEED=0x40000;
864 const MCI_VD_PLAY_SCAN=0x80000;
865 const MCI_VD_PLAY_SLOW=0x100000;
866 const MCI_VD_SEEK_REVERSE=0x10000;
867 const MCI_VD_STATUS_SPEED=0x4002;
868 const MCI_VD_STATUS_FORWARD=0x4003;
869 const MCI_VD_STATUS_MEDIA_TYPE=0x4004;
870 const MCI_VD_STATUS_SIDE=0x4005;
871 const MCI_VD_STATUS_DISC_SIZE=0x4006;
872 const MCI_VD_GETDEVCAPS_CLV=0x10000;
873 const MCI_VD_GETDEVCAPS_CAV=0x20000;
874 const MCI_VD_SPIN_UP=0x10000;
875 const MCI_VD_SPIN_DOWN=0x20000;
876 const MCI_VD_GETDEVCAPS_CAN_REVERSE=0x4002;
877 const MCI_VD_GETDEVCAPS_FAST_RATE=0x4003;
878 const MCI_VD_GETDEVCAPS_SLOW_RATE=0x4004;
879 const MCI_VD_GETDEVCAPS_NORMAL_RATE=0x4005;
880 const MCI_VD_STEP_FRAMES=0x10000;
881 const MCI_VD_STEP_REVERSE=0x20000;
882 const MCI_VD_ESCAPE_STRING=256;
883 
884 const MCI_CDA_STATUS_TYPE_TRACK=0x4001;
885 const MCI_CDA_TRACK_AUDIO=MCI_CD_OFFSET;
886 const MCI_CDA_TRACK_OTHER=(MCI_CD_OFFSET+1);
887 
888 const MCI_WAVE_PCM=MCI_WAVE_OFFSET;
889 const MCI_WAVE_MAPPER=(MCI_WAVE_OFFSET+1);
890 const MCI_WAVE_OPEN_BUFFER=0x10000;
891 const MCI_WAVE_SET_FORMATTAG=0x10000;
892 const MCI_WAVE_SET_CHANNELS=0x20000;
893 const MCI_WAVE_SET_SAMPLESPERSEC=0x40000;
894 const MCI_WAVE_SET_AVGBYTESPERSEC=0x80000;
895 const MCI_WAVE_SET_BLOCKALIGN=0x100000;
896 const MCI_WAVE_SET_BITSPERSAMPLE=0x200000;
897 const MCI_WAVE_INPUT=0x400000;
898 const MCI_WAVE_OUTPUT=0x800000;
899 const MCI_WAVE_STATUS_FORMATTAG=0x4001;
900 const MCI_WAVE_STATUS_CHANNELS=0x4002;
901 const MCI_WAVE_STATUS_SAMPLESPERSEC=0x4003;
902 const MCI_WAVE_STATUS_AVGBYTESPERSEC=0x4004;
903 const MCI_WAVE_STATUS_BLOCKALIGN=0x4005;
904 const MCI_WAVE_STATUS_BITSPERSAMPLE=0x4006;
905 const MCI_WAVE_STATUS_LEVEL=0x4007;
906 const MCI_WAVE_SET_ANYINPUT=0x4000000;
907 const MCI_WAVE_SET_ANYOUTPUT=0x8000000;
908 const MCI_WAVE_GETDEVCAPS_INPUTS=0x4001;
909 const MCI_WAVE_GETDEVCAPS_OUTPUTS=0x4002;
910 
911 const MCI_SEQ_DIV_PPQN=MCI_SEQ_OFFSET;
912 const MCI_SEQ_DIV_SMPTE_24=(MCI_SEQ_OFFSET+1);
913 const MCI_SEQ_DIV_SMPTE_25=(MCI_SEQ_OFFSET+2);
914 const MCI_SEQ_DIV_SMPTE_30DROP=(MCI_SEQ_OFFSET+3);
915 const MCI_SEQ_DIV_SMPTE_30=(MCI_SEQ_OFFSET+4);
916 const MCI_SEQ_FORMAT_SONGPTR=0x4001;
917 const MCI_SEQ_FILE=0x4002;
918 const MCI_SEQ_MIDI=0x4003;
919 const MCI_SEQ_SMPTE=0x4004;
920 const MCI_SEQ_NONE=65533;
921 const MCI_SEQ_MAPPER=65535;
922 
923 const MCI_SEQ_STATUS_TEMPO=0x4002;
924 const MCI_SEQ_STATUS_PORT=0x4003;
925 const MCI_SEQ_STATUS_SLAVE=0x4007;
926 const MCI_SEQ_STATUS_MASTER=0x4008;
927 const MCI_SEQ_STATUS_OFFSET=0x4009;
928 const MCI_SEQ_STATUS_DIVTYPE=0x400A;
929 const MCI_SEQ_STATUS_NAME=0x400B;
930 const MCI_SEQ_STATUS_COPYRIGHT=0x400C;
931 
932 const MCI_SEQ_SET_TEMPO=0x10000;
933 const MCI_SEQ_SET_PORT=0x20000;
934 const MCI_SEQ_SET_SLAVE=0x40000;
935 const MCI_SEQ_SET_MASTER=0x80000;
936 const MCI_SEQ_SET_OFFSET=0x1000000;
937 
938 const MCI_ANIM_OPEN_WS=0x10000;
939 const MCI_ANIM_OPEN_PARENT=0x20000;
940 const MCI_ANIM_OPEN_NOSTATIC=0x40000;
941 const MCI_ANIM_PLAY_SPEED=0x10000;
942 const MCI_ANIM_PLAY_REVERSE=0x20000;
943 const MCI_ANIM_PLAY_FAST=0x40000;
944 const MCI_ANIM_PLAY_SLOW=0x80000;
945 const MCI_ANIM_PLAY_SCAN=0x100000;
946 const MCI_ANIM_STEP_REVERSE=0x10000;
947 const MCI_ANIM_STEP_FRAMES=0x20000;
948 const MCI_ANIM_STATUS_SPEED=0x4001;
949 const MCI_ANIM_STATUS_FORWARD=0x4002;
950 const MCI_ANIM_STATUS_HWND=0x4003;
951 const MCI_ANIM_STATUS_HPAL=0x4004;
952 const MCI_ANIM_STATUS_STRETCH=0x4005;
953 const MCI_ANIM_INFO_TEXT=0x10000;
954 
955 const MCI_ANIM_GETDEVCAPS_CAN_REVERSE=0x4001;
956 const MCI_ANIM_GETDEVCAPS_FAST_RATE=0x4002;
957 const MCI_ANIM_GETDEVCAPS_SLOW_RATE=0x4003;
958 const MCI_ANIM_GETDEVCAPS_NORMAL_RATE=0x4004;
959 const MCI_ANIM_GETDEVCAPS_PALETTES=0x4006;
960 const MCI_ANIM_GETDEVCAPS_CAN_STRETCH=0x4007;
961 const MCI_ANIM_GETDEVCAPS_MAX_WINDOWS=0x4008;
962 
963 const MCI_ANIM_REALIZE_NORM=0x10000;
964 const MCI_ANIM_REALIZE_BKGD=0x20000;
965 
966 const MCI_ANIM_WINDOW_HWND=0x10000;
967 const MCI_ANIM_WINDOW_STATE=0x40000;
968 const MCI_ANIM_WINDOW_TEXT=0x80000;
969 const MCI_ANIM_WINDOW_ENABLE_STRETCH=0x100000;
970 const MCI_ANIM_WINDOW_DISABLE_STRETCH=0x200000;
971 const MCI_ANIM_WINDOW_DEFAULT=0x0;
972 
973 const MCI_ANIM_RECT=0x10000;
974 const MCI_ANIM_PUT_SOURCE=0x20000;
975 const MCI_ANIM_PUT_DESTINATION=0x40000;
976 const MCI_ANIM_WHERE_SOURCE=0x20000;
977 const MCI_ANIM_WHERE_DESTINATION=0x40000;
978 const MCI_ANIM_UPDATE_HDC=0x20000;
979 
980 const MCI_OVLY_OPEN_WS=0x10000;
981 const MCI_OVLY_OPEN_PARENT=0x20000;
982 const MCI_OVLY_STATUS_HWND=0x4001;
983 const MCI_OVLY_STATUS_STRETCH=0x4002;
984 const MCI_OVLY_INFO_TEXT=0x10000;
985 const MCI_OVLY_GETDEVCAPS_CAN_STRETCH=0x4001;
986 const MCI_OVLY_GETDEVCAPS_CAN_FREEZE=0x4002;
987 const MCI_OVLY_GETDEVCAPS_MAX_WINDOWS=0x4003;
988 const MCI_OVLY_WINDOW_HWND=0x10000;
989 const MCI_OVLY_WINDOW_STATE=0x40000;
990 const MCI_OVLY_WINDOW_TEXT=0x80000;
991 const MCI_OVLY_WINDOW_ENABLE_STRETCH=0x100000;
992 const MCI_OVLY_WINDOW_DISABLE_STRETCH=0x200000;
993 const MCI_OVLY_WINDOW_DEFAULT=0x0;
994 const MCI_OVLY_RECT=0x10000;
995 const MCI_OVLY_PUT_SOURCE=0x20000;
996 const MCI_OVLY_PUT_DESTINATION=0x40000;
997 const MCI_OVLY_PUT_FRAME=0x80000;
998 const MCI_OVLY_PUT_VIDEO=0x100000;
999 const MCI_OVLY_WHERE_SOURCE=0x20000;
1000 const MCI_OVLY_WHERE_DESTINATION=0x40000;
1001 const MCI_OVLY_WHERE_FRAME=0x80000;
1002 const MCI_OVLY_WHERE_VIDEO=0x100000;
1003 
1004 const NEWTRANSPARENT=3;
1005 const QUERYROPSUPPORT=40;
1006 const SELECTDIB=41;
1007 
1008 LONG DIBINDEX(WORD n) {
1009 	return MAKELONG(n, 0x10FF);
1010 }
1011 const CAPS1=94;
1012 const C1_TRANSPARENT=1;
1013 
1014 const SEEK_SET=0;
1015 const SEEK_CUR=1;
1016 const SEEK_END=2;
1017 
1018 alias DWORD MCIERROR;
1019 alias UINT MCIDEVICEID;
1020 alias UINT function (MCIDEVICEID, DWORD) YIELDPROC;
1021 alias UINT MMVERSION;
1022 alias UINT MMRESULT;
1023 
1024 struct MMTIME {
1025 	UINT wType;
1026 	union {
1027 		DWORD ms;
1028 		DWORD sample;
1029 		DWORD cb;
1030 		DWORD ticks;
1031 		struct smpte {
1032 			BYTE hour;
1033 			BYTE min;
1034 			BYTE sec;
1035 			BYTE frame;
1036 			BYTE fps;
1037 			BYTE dummy;
1038 			BYTE[2] pad;
1039 		};
1040 		struct midi {
1041 			DWORD songptrpos;
1042 		}
1043 	}
1044 }
1045 alias MMTIME* PMMTIME, LPMMTIME;
1046 
1047 alias TypeDef!(HANDLE) HDRVR;
1048 
1049 struct DRVCONFIGINFO {
1050 	DWORD dwDCISize;
1051 	LPCWSTR lpszDCISectionName;
1052 	LPCWSTR lpszDCIAliasName;
1053 }
1054 alias DRVCONFIGINFO * PDRVCONFIGINFO, LPDRVCONFIGINFO;
1055 
1056 struct DRVCONFIGINFOEX {
1057 	DWORD dwDCISize;
1058 	LPCWSTR lpszDCISectionName;
1059 	LPCWSTR lpszDCIAliasName;
1060 	DWORD dnDevNode;
1061 }
1062 alias DRVCONFIGINFOEX* PDRVCONFIGINFOEX, LPDRVCONFIGINFOEX;
1063 
1064 extern(Windows):
1065 
1066 /+FIXME: I couldn't find these in MSDN.
1067 alias void function (HDRVR, UINT, DWORD, DWORD, DWORD) DRVCALLBACK;
1068 LRESULT DRIVERPROC (DWORD, HDRVR, UINT, LPARAM, LPARAM);
1069 alias DRVCALLBACK* LPDRVCALLBACK, PDRVCALLBACK;
1070 
1071 alias DRVCALLBACK WAVECALLBACK;
1072 alias WAVECALLBACK* LPWAVECALLBACK;
1073 
1074 alias DRVCALLBACK MIDICALLBACK;
1075 alias MIDICALLBACK* LPMIDICALLBACK;
1076 
1077 +/
1078 
1079 alias TypeDef!(HANDLE) HWAVE;
1080 alias TypeDef!(HANDLE) HWAVEIN;
1081 alias TypeDef!(HANDLE) HWAVEOUT;
1082 
1083 alias HWAVEIN* LPHWAVEIN;
1084 alias HWAVEOUT* LPHWAVEOUT;
1085 
1086 struct WAVEHDR {
1087 	LPSTR lpData;
1088 	DWORD dwBufferLength;
1089 	DWORD dwBytesRecorded;
1090 	DWORD dwUser;
1091 	DWORD dwFlags;
1092 	DWORD dwLoops;
1093 	WAVEHDR *lpNext;
1094 	DWORD reserved;
1095 }
1096 alias WAVEHDR* PWAVEHDR, LPWAVEHDR;
1097 
1098 struct WAVEOUTCAPSA {
1099 	WORD wMid;
1100 	WORD wPid;
1101 	MMVERSION vDriverVersion;
1102 	CHAR[MAXPNAMELEN] szPname;
1103 	DWORD dwFormats;
1104 	WORD wChannels;
1105 	WORD wReserved1;
1106 	DWORD dwSupport;
1107 }
1108 alias WAVEOUTCAPSA* PWAVEOUTCAPSA, LPWAVEOUTCAPSA;
1109 
1110 struct WAVEOUTCAPSW {
1111 	WORD wMid;
1112 	WORD wPid;
1113 	MMVERSION vDriverVersion;
1114 	WCHAR[MAXPNAMELEN] szPname;
1115 	DWORD dwFormats;
1116 	WORD wChannels;
1117 	WORD wReserved1;
1118 	DWORD dwSupport;
1119 }
1120 alias WAVEOUTCAPSW* PWAVEOUTCAPSW, LPWAVEOUTCAPSW;
1121 
1122 struct WAVEINCAPSA {
1123 	WORD wMid;
1124 	WORD wPid;
1125 	MMVERSION vDriverVersion;
1126 	CHAR[MAXPNAMELEN] szPname;
1127 	DWORD dwFormats;
1128 	WORD wChannels;
1129 	WORD wReserved1;
1130 }
1131 alias WAVEINCAPSA* PWAVEINCAPSA, LPWAVEINCAPSA;
1132 
1133 struct WAVEINCAPSW {
1134 	WORD wMid;
1135 	WORD wPid;
1136 	MMVERSION vDriverVersion;
1137 	WCHAR[MAXPNAMELEN] szPname;
1138 	DWORD dwFormats;
1139 	WORD wChannels;
1140 	WORD wReserved1;
1141 }
1142 alias WAVEINCAPSW* PWAVEINCAPSW, LPWAVEINCAPSW;
1143 
1144 struct WAVEFORMAT {
1145 	WORD wFormatTag;
1146 	WORD nChannels;
1147 	DWORD nSamplesPerSec;
1148 	DWORD nAvgBytesPerSec;
1149 	WORD nBlockAlign;
1150 }
1151 alias WAVEFORMAT* PWAVEFORMAT, LPWAVEFORMAT;
1152 
1153 struct PCMWAVEFORMAT {
1154 	WAVEFORMAT wf;
1155 	WORD wBitsPerSample;
1156 }
1157 alias PCMWAVEFORMAT* PPCMWAVEFORMAT, LPPCMWAVEFORMAT;
1158 
1159 struct WAVEFORMATEX {
1160 	WORD wFormatTag;
1161 	WORD nChannels;
1162 	DWORD nSamplesPerSec;
1163 	DWORD nAvgBytesPerSec;
1164 	WORD nBlockAlign;
1165 	WORD wBitsPerSample;
1166 	WORD cbSize;
1167 }
1168 alias WAVEFORMATEX* PWAVEFORMATEX, LPWAVEFORMATEX;
1169 alias const(WAVEFORMATEX)* LPCWAVEFORMATEX;
1170 
1171 alias TypeDef!(HANDLE) HMIDI;
1172 alias TypeDef!(HANDLE) HMIDIIN;
1173 alias TypeDef!(HANDLE) HMIDIOUT;
1174 alias TypeDef!(HANDLE) HMIDISTRM;
1175 
1176 alias HMIDI* LPHMIDI;
1177 alias HMIDIIN* LPHMIDIIN;
1178 alias HMIDIOUT* LPHMIDIOUT;
1179 alias HMIDISTRM* LPHMIDISTRM;
1180 
1181 alias WORD[MIDIPATCHSIZE] PATCHARRAY;
1182 alias WORD* LPPATCHARRAY;
1183 alias WORD[MIDIPATCHSIZE] KEYARRAY;
1184 alias WORD* LPKEYARRAY;
1185 
1186 struct MIDIOUTCAPSA {
1187 	WORD wMid;
1188 	WORD wPid;
1189 	MMVERSION vDriverVersion;
1190 	CHAR[MAXPNAMELEN] szPname;
1191 	WORD wTechnology;
1192 	WORD wVoices;
1193 	WORD wNotes;
1194 	WORD wChannelMask;
1195 	DWORD dwSupport;
1196 }
1197 alias MIDIOUTCAPSA* PMIDIOUTCAPSA, LPMIDIOUTCAPSA;
1198 
1199 struct MIDIOUTCAPSW {
1200 	WORD wMid;
1201 	WORD wPid;
1202 	MMVERSION vDriverVersion;
1203 	WCHAR[MAXPNAMELEN] szPname;
1204 	WORD wTechnology;
1205 	WORD wVoices;
1206 	WORD wNotes;
1207 	WORD wChannelMask;
1208 	DWORD dwSupport;
1209 }
1210 alias MIDIOUTCAPSW* PMIDIOUTCAPSW, LPMIDIOUTCAPSW;
1211 
1212 struct MIDIINCAPSA {
1213 	WORD wMid;
1214 	WORD wPid;
1215 	MMVERSION vDriverVersion;
1216 	CHAR[MAXPNAMELEN] szPname;
1217 	DWORD dwSupport;
1218 }
1219 alias MIDIINCAPSA* PMIDIINCAPSA, LPMIDIINCAPSA;
1220 
1221 struct MIDIINCAPSW {
1222 	WORD wMid;
1223 	WORD wPid;
1224 	MMVERSION vDriverVersion;
1225 	WCHAR[MAXPNAMELEN] szPname;
1226 	DWORD dwSupport;
1227 }
1228 alias MIDIINCAPSW* PMIDIINCAPSW, LPMIDIINCAPSW;
1229 
1230 struct MIDIHDR {
1231 	LPSTR lpData;
1232 	DWORD dwBufferLength;
1233 	DWORD dwBytesRecorded;
1234 	DWORD dwUser;
1235 	DWORD dwFlags;
1236 	MIDIHDR *lpNext;
1237 	DWORD reserved;
1238 	DWORD dwOffset;
1239 	DWORD[8] dwReserved;
1240 }
1241 alias MIDIHDR* PMIDIHDR, LPMIDIHDR;
1242 
1243 struct MIDIEVENT {
1244 	DWORD dwDeltaTime;
1245 	DWORD dwStreamID;
1246 	DWORD dwEvent;
1247 	DWORD[1] dwParms;
1248 }
1249 
1250 struct MIDISTRMBUFFVER {
1251 	DWORD dwVersion;
1252 	DWORD dwMid;
1253 	DWORD dwOEMVersion;
1254 }
1255 
1256 struct MIDIPROPTIMEDIV {
1257 	DWORD cbStruct;
1258 	DWORD dwTimeDiv;
1259 }
1260 alias MIDIPROPTIMEDIV* LPMIDIPROPTIMEDIV;
1261 
1262 struct MIDIPROPTEMPO {
1263 	DWORD cbStruct;
1264 	DWORD dwTempo;
1265 }
1266 alias MIDIPROPTEMPO* LPMIDIPROPTEMPO;
1267 
1268 struct AUXCAPSA {
1269 	WORD wMid;
1270 	WORD wPid;
1271 	MMVERSION vDriverVersion;
1272 	CHAR[MAXPNAMELEN] szPname;
1273 	WORD wTechnology;
1274 	WORD wReserved1;
1275 	DWORD dwSupport;
1276 }
1277 alias AUXCAPSA* PAUXCAPSA, LPAUXCAPSA;
1278 
1279 struct AUXCAPSW {
1280 	WORD wMid;
1281 	WORD wPid;
1282 	MMVERSION vDriverVersion;
1283 	WCHAR[MAXPNAMELEN] szPname;
1284 	WORD wTechnology;
1285 	WORD wReserved1;
1286 	DWORD dwSupport;
1287 }
1288 alias AUXCAPSW* PAUXCAPSW, LPAUXCAPSW;
1289 
1290 alias TypeDef!(HANDLE) HMIXEROBJ;
1291 alias HMIXEROBJ* LPHMIXEROBJ;
1292 
1293 alias TypeDef!(HANDLE) HMIXER;
1294 alias HMIXER* LPHMIXER;
1295 
1296 struct MIXERCAPSA {
1297 	WORD wMid;
1298 	WORD wPid;
1299 	MMVERSION vDriverVersion;
1300 	CHAR[MAXPNAMELEN] szPname;
1301 	DWORD fdwSupport;
1302 	DWORD cDestinations;
1303 }
1304 alias MIXERCAPSA* PMIXERCAPSA, LPMIXERCAPSA;
1305 
1306 struct MIXERCAPSW {
1307 	WORD wMid;
1308 	WORD wPid;
1309 	MMVERSION vDriverVersion;
1310 	WCHAR[MAXPNAMELEN] szPname;
1311 	DWORD fdwSupport;
1312 	DWORD cDestinations;
1313 }
1314 alias MIXERCAPSW* PMIXERCAPSW, LPMIXERCAPSW;
1315 
1316 struct MIXERLINEA {
1317 	DWORD cbStruct;
1318 	DWORD dwDestination;
1319 	DWORD dwSource;
1320 	DWORD dwLineID;
1321 	DWORD fdwLine;
1322 	DWORD dwUser;
1323 	DWORD dwComponentType;
1324 	DWORD cChannels;
1325 	DWORD cConnections;
1326 	DWORD cControls;
1327 	CHAR[MIXER_SHORT_NAME_CHARS] szShortName;
1328 	CHAR[MIXER_LONG_NAME_CHARS] szName;
1329 	struct Target {
1330 		DWORD dwType;
1331 		DWORD dwDeviceID;
1332 		WORD wMid;
1333 		WORD wPid;
1334 		MMVERSION vDriverVersion;
1335 		CHAR[MAXPNAMELEN] szPname;
1336 	}
1337 }
1338 alias MIXERLINEA* PMIXERLINEA, LPMIXERLINEA;
1339 
1340 struct MIXERLINEW {
1341 	DWORD cbStruct;
1342 	DWORD dwDestination;
1343 	DWORD dwSource;
1344 	DWORD dwLineID;
1345 	DWORD fdwLine;
1346 	DWORD dwUser;
1347 	DWORD dwComponentType;
1348 	DWORD cChannels;
1349 	DWORD cConnections;
1350 	DWORD cControls;
1351 	WCHAR[MIXER_SHORT_NAME_CHARS] szShortName;
1352 	WCHAR[MIXER_LONG_NAME_CHARS] szName;
1353 	struct Target {
1354 		DWORD dwType;
1355 		DWORD dwDeviceID;
1356 		WORD wMid;
1357 		WORD wPid;
1358 		MMVERSION vDriverVersion;
1359 		WCHAR[MAXPNAMELEN] szPname;
1360 	}
1361 }
1362 alias MIXERLINEW* PMIXERLINEW, LPMIXERLINEW;
1363 
1364 struct MIXERCONTROLA {
1365 	DWORD cbStruct;
1366 	DWORD dwControlID;
1367 	DWORD dwControlType;
1368 	DWORD fdwControl;
1369 	DWORD cMultipleItems;
1370 	CHAR[MIXER_SHORT_NAME_CHARS] szShortName;
1371 	CHAR[MIXER_LONG_NAME_CHARS] szName;
1372 	union _Bounds {
1373 		struct {
1374 			LONG lMinimum;
1375 			LONG lMaximum;
1376 		}
1377 		struct {
1378 			DWORD dwMinimum;
1379 			DWORD dwMaximum;
1380 		}
1381 		DWORD[6] dwReserved;
1382 	}
1383 	_Bounds Bounds;
1384 	union _Metrics {
1385 		DWORD cSteps;
1386 		DWORD cbCustomData;
1387 		DWORD[6] dwReserved;
1388 	}
1389 	_Metrics Metrics;
1390 }
1391 alias MIXERCONTROLA* PMIXERCONTROLA, LPMIXERCONTROLA;
1392 
1393 struct MIXERCONTROLW {
1394 	DWORD cbStruct;
1395 	DWORD dwControlID;
1396 	DWORD dwControlType;
1397 	DWORD fdwControl;
1398 	DWORD cMultipleItems;
1399 	WCHAR[MIXER_SHORT_NAME_CHARS] szShortName;
1400 	WCHAR[MIXER_LONG_NAME_CHARS] szName;
1401 	union _Bounds {
1402 		struct {
1403 			LONG lMinimum;
1404 			LONG lMaximum;
1405 		}
1406 		struct {
1407 			DWORD dwMinimum;
1408 			DWORD dwMaximum;
1409 		}
1410 		DWORD[6] dwReserved;
1411 	}
1412 	_Bounds Bounds;
1413 	union _Metrics {
1414 		DWORD cSteps;
1415 		DWORD cbCustomData;
1416 		DWORD[6] dwReserved;
1417 	}
1418 	_Metrics Metrics;
1419 }
1420 
1421 alias MIXERCONTROLW* PMIXERCONTROLW, LPMIXERCONTROLW;
1422 
1423 struct MIXERLINECONTROLSA {
1424 	DWORD cbStruct;
1425 	DWORD dwLineID;
1426 	union {
1427 		DWORD dwControlID;
1428 		DWORD dwControlType;
1429 	}
1430 	DWORD cControls;
1431 	DWORD cbmxctrl;
1432 	LPMIXERCONTROLA pamxctrl;
1433 }
1434 alias MIXERLINECONTROLSA* PMIXERLINECONTROLSA, LPMIXERLINECONTROLSA;
1435 
1436 struct MIXERLINECONTROLSW {
1437 	DWORD cbStruct;
1438 	DWORD dwLineID;
1439 	union {
1440 		DWORD dwControlID;
1441 		DWORD dwControlType;
1442 	}
1443 	DWORD cControls;
1444 	DWORD cbmxctrl;
1445 	LPMIXERCONTROLW pamxctrl;
1446 }
1447 alias MIXERLINECONTROLSW* PMIXERLINECONTROLSW, LPMIXERLINECONTROLSW;
1448 
1449 struct MIXERCONTROLDETAILS {
1450 	DWORD cbStruct;
1451 	DWORD dwControlID;
1452 	DWORD cChannels;
1453 	union {
1454 		HWND hwndOwner;
1455 		DWORD cMultipleItems;
1456 	}
1457 	DWORD cbDetails;
1458 	PVOID paDetails;
1459 }
1460 alias MIXERCONTROLDETAILS* PMIXERCONTROLDETAILS, LPMIXERCONTROLDETAILS;
1461 
1462 struct MIXERCONTROLDETAILS_LISTTEXTA {
1463 	DWORD dwParam1;
1464 	DWORD dwParam2;
1465 	CHAR[MIXER_LONG_NAME_CHARS] szName;
1466 }
1467 alias MIXERCONTROLDETAILS_LISTTEXTA* PMIXERCONTROLDETAILS_LISTTEXTA, LPMIXERCONTROLDETAILS_LISTTEXTA;
1468 
1469 struct MIXERCONTROLDETAILS_LISTTEXTW {
1470 	DWORD dwParam1;
1471 	DWORD dwParam2;
1472 	WCHAR[MIXER_LONG_NAME_CHARS] szName;
1473 }
1474 alias MIXERCONTROLDETAILS_LISTTEXTW* PMIXERCONTROLDETAILS_LISTTEXTW, LPMIXERCONTROLDETAILS_LISTTEXTW;
1475 
1476 struct MIXERCONTROLDETAILS_BOOLEAN {
1477 	LONG fValue;
1478 }
1479 alias MIXERCONTROLDETAILS_BOOLEAN* PMIXERCONTROLDETAILS_BOOLEAN, LPMIXERCONTROLDETAILS_BOOLEAN;
1480 
1481 struct MIXERCONTROLDETAILS_SIGNED {
1482 	LONG lValue;
1483 }
1484 alias MIXERCONTROLDETAILS_SIGNED* PMIXERCONTROLDETAILS_SIGNED, LPMIXERCONTROLDETAILS_SIGNED;
1485 
1486 struct MIXERCONTROLDETAILS_UNSIGNED {
1487 	DWORD dwValue;
1488 }
1489 alias MIXERCONTROLDETAILS_UNSIGNED* PMIXERCONTROLDETAILS_UNSIGNED, LPMIXERCONTROLDETAILS_UNSIGNED;
1490 
1491 alias void function (UINT, UINT, DWORD, DWORD, DWORD) LPTIMECALLBACK;
1492 
1493 struct TIMECAPS {
1494 	UINT wPeriodMin;
1495 	UINT wPeriodMax;
1496 }
1497 alias TIMECAPS* PTIMECAPS, LPTIMECAPS;
1498 
1499 struct JOYCAPSA {
1500 	WORD wMid;
1501 	WORD wPid;
1502 	CHAR[MAXPNAMELEN] szPname;
1503 	UINT wXmin;
1504 	UINT wXmax;
1505 	UINT wYmin;
1506 	UINT wYmax;
1507 	UINT wZmin;
1508 	UINT wZmax;
1509 	UINT wNumButtons;
1510 	UINT wPeriodMin;
1511 	UINT wPeriodMax;
1512 	UINT wRmin;
1513 	UINT wRmax;
1514 	UINT wUmin;
1515 	UINT wUmax;
1516 	UINT wVmin;
1517 	UINT wVmax;
1518 	UINT wCaps;
1519 	UINT wMaxAxes;
1520 	UINT wNumAxes;
1521 	UINT wMaxButtons;
1522 	CHAR[MAXPNAMELEN] szRegKey;
1523 	CHAR[MAX_JOYSTICKOEMVXDNAME] szOEMVxD;
1524 }
1525 alias JOYCAPSA* PJOYCAPSA, LPJOYCAPSA;
1526 
1527 struct JOYCAPSW {
1528 	WORD wMid;
1529 	WORD wPid;
1530 	WCHAR[MAXPNAMELEN] szPname;
1531 	UINT wXmin;
1532 	UINT wXmax;
1533 	UINT wYmin;
1534 	UINT wYmax;
1535 	UINT wZmin;
1536 	UINT wZmax;
1537 	UINT wNumButtons;
1538 	UINT wPeriodMin;
1539 	UINT wPeriodMax;
1540 	UINT wRmin;
1541 	UINT wRmax;
1542 	UINT wUmin;
1543 	UINT wUmax;
1544 	UINT wVmin;
1545 	UINT wVmax;
1546 	UINT wCaps;
1547 	UINT wMaxAxes;
1548 	UINT wNumAxes;
1549 	UINT wMaxButtons;
1550 	WCHAR[MAXPNAMELEN] szRegKey;
1551 	WCHAR[MAX_JOYSTICKOEMVXDNAME] szOEMVxD;
1552 }
1553 alias JOYCAPSW* PJOYCAPSW, LPJOYCAPSW;
1554 
1555 struct JOYINFO {
1556 	UINT wXpos;
1557 	UINT wYpos;
1558 	UINT wZpos;
1559 	UINT wButtons;
1560 }
1561 alias JOYINFO* PJOYINFO, LPJOYINFO;
1562 
1563 struct JOYINFOEX {
1564 	DWORD dwSize;
1565 	DWORD dwFlags;
1566 	DWORD dwXpos;
1567 	DWORD dwYpos;
1568 	DWORD dwZpos;
1569 	DWORD dwRpos;
1570 	DWORD dwUpos;
1571 	DWORD dwVpos;
1572 	DWORD dwButtons;
1573 	DWORD dwButtonNumber;
1574 	DWORD dwPOV;
1575 	DWORD dwReserved1;
1576 	DWORD dwReserved2;
1577 }
1578 alias JOYINFOEX* PJOYINFOEX, LPJOYINFOEX;
1579 
1580 alias DWORD FOURCC;
1581 alias char* HPSTR;
1582 
1583 alias TypeDef!(HANDLE) HMMIO;
1584 
1585 alias LRESULT function (LPSTR, UINT, LPARAM, LPARAM) LPMMIOPROC;
1586 
1587 struct MMIOINFO {
1588 	DWORD dwFlags;
1589 	FOURCC fccIOProc;
1590 	LPMMIOPROC pIOProc;
1591 	UINT wErrorRet;
1592 	HTASK htask;
1593 	LONG cchBuffer;
1594 	HPSTR pchBuffer;
1595 	HPSTR pchNext;
1596 	HPSTR pchEndRead;
1597 	HPSTR pchEndWrite;
1598 	LONG lBufOffset;
1599 	LONG lDiskOffset;
1600 	DWORD[3] adwInfo;
1601 	DWORD dwReserved1;
1602 	DWORD dwReserved2;
1603 	HMMIO hmmio;
1604 }
1605 alias MMIOINFO* PMMIOINFO, LPMMIOINFO;
1606 alias const(MMIOINFO)* LPCMMIOINFO;
1607 
1608 struct MMCKINFO {
1609 	FOURCC ckid;
1610 	DWORD cksize;
1611 	FOURCC fccType;
1612 	DWORD dwDataOffset;
1613 	DWORD dwFlags;
1614 }
1615 alias MMCKINFO* PMMCKINFO, LPMMCKINFO;
1616 alias const(MMCKINFO)* LPCMMCKINFO;
1617 
1618 struct MCI_GENERIC_PARMS {
1619 	DWORD dwCallback;
1620 }
1621 alias MCI_GENERIC_PARMS* PMCI_GENERIC_PARMS, LPMCI_GENERIC_PARMS;
1622 
1623 struct MCI_OPEN_PARMSA {
1624 	DWORD dwCallback;
1625 	MCIDEVICEID wDeviceID;
1626 	LPCSTR lpstrDeviceType;
1627 	LPCSTR lpstrElementName;
1628 	LPCSTR lpstrAlias;
1629 }
1630 alias MCI_OPEN_PARMSA* PMCI_OPEN_PARMSA, LPMCI_OPEN_PARMSA;
1631 
1632 struct MCI_OPEN_PARMSW {
1633 	DWORD dwCallback;
1634 	MCIDEVICEID wDeviceID;
1635 	LPCWSTR lpstrDeviceType;
1636 	LPCWSTR lpstrElementName;
1637 	LPCWSTR lpstrAlias;
1638 }
1639 alias MCI_OPEN_PARMSW* PMCI_OPEN_PARMSW, LPMCI_OPEN_PARMSW;
1640 
1641 struct MCI_PLAY_PARMS {
1642 	DWORD dwCallback;
1643 	DWORD dwFrom;
1644 	DWORD dwTo;
1645 }
1646 alias MCI_PLAY_PARMS* PMCI_PLAY_PARMS, LPMCI_PLAY_PARMS;
1647 
1648 struct MCI_SEEK_PARMS {
1649 	DWORD dwCallback;
1650 	DWORD dwTo;
1651 }
1652 alias MCI_SEEK_PARMS* PMCI_SEEK_PARMS, LPMCI_SEEK_PARMS;
1653 
1654 struct MCI_STATUS_PARMS {
1655 	DWORD dwCallback;
1656 	DWORD dwReturn;
1657 	DWORD dwItem;
1658 	DWORD dwTrack;
1659 }
1660 alias MCI_STATUS_PARMS* PMCI_STATUS_PARMS, LPMCI_STATUS_PARMS;
1661 
1662 struct MCI_INFO_PARMSA {
1663 	DWORD dwCallback;
1664 	LPSTR lpstrReturn;
1665 	DWORD dwRetSize;
1666 }
1667 alias MCI_INFO_PARMSA* LPMCI_INFO_PARMSA;
1668 
1669 struct MCI_INFO_PARMSW {
1670 	DWORD dwCallback;
1671 	LPWSTR lpstrReturn;
1672 	DWORD dwRetSize;
1673 }
1674 alias MCI_INFO_PARMSW* LPMCI_INFO_PARMSW;
1675 
1676 struct MCI_GETDEVCAPS_PARMS {
1677 	DWORD dwCallback;
1678 	DWORD dwReturn;
1679 	DWORD dwItem;
1680 }
1681 alias MCI_GETDEVCAPS_PARMS* PMCI_GETDEVCAPS_PARMS, LPMCI_GETDEVCAPS_PARMS;
1682 
1683 struct MCI_SYSINFO_PARMSA {
1684 	DWORD dwCallback;
1685 	LPSTR lpstrReturn;
1686 	DWORD dwRetSize;
1687 	DWORD dwNumber;
1688 	UINT wDeviceType;
1689 }
1690 alias MCI_SYSINFO_PARMSA* PMCI_SYSINFO_PARMSA, LPMCI_SYSINFO_PARMSA;
1691 
1692 struct MCI_SYSINFO_PARMSW {
1693 	DWORD dwCallback;
1694 	LPWSTR lpstrReturn;
1695 	DWORD dwRetSize;
1696 	DWORD dwNumber;
1697 	UINT wDeviceType;
1698 }
1699 alias MCI_SYSINFO_PARMSW* PMCI_SYSINFO_PARMSW, LPMCI_SYSINFO_PARMSW;
1700 
1701 struct MCI_SET_PARMS {
1702 	DWORD dwCallback;
1703 	DWORD dwTimeFormat;
1704 	DWORD dwAudio;
1705 }
1706 alias MCI_SET_PARMS* PMCI_SET_PARMS, LPMCI_SET_PARMS;
1707 
1708 struct MCI_BREAK_PARMS {
1709 	DWORD dwCallback;
1710 	int nVirtKey;
1711 	HWND hwndBreak;
1712 }
1713 alias MCI_BREAK_PARMS* PMCI_BREAK_PARMS, LPMCI_BREAK_PARMS;
1714 
1715 struct MCI_SAVE_PARMSA {
1716 	DWORD dwCallback;
1717 	LPCSTR lpfilename;
1718 }
1719 alias MCI_SAVE_PARMSA* PMCI_SAVE_PARMSA, LPMCI_SAVE_PARMSA;
1720 
1721 struct MCI_SAVE_PARMSW {
1722 	DWORD dwCallback;
1723 	LPCWSTR lpfilename;
1724 }
1725 alias MCI_SAVE_PARMSW* PMCI_SAVE_PARMSW, LPMCI_SAVE_PARMSW;
1726 
1727 struct MCI_LOAD_PARMSA {
1728 	DWORD dwCallback;
1729 	LPCSTR lpfilename;
1730 }
1731 alias MCI_LOAD_PARMSA* PMCI_LOAD_PARMSA, LPMCI_LOAD_PARMSA;
1732 
1733 struct MCI_LOAD_PARMSW {
1734 	DWORD dwCallback;
1735 	LPCWSTR lpfilename;
1736 }
1737 alias MCI_LOAD_PARMSW* PMCI_LOAD_PARMSW, LPMCI_LOAD_PARMSW;
1738 
1739 struct MCI_RECORD_PARMS {
1740 	DWORD dwCallback;
1741 	DWORD dwFrom;
1742 	DWORD dwTo;
1743 }
1744 alias MCI_RECORD_PARMS* LPMCI_RECORD_PARMS;
1745 
1746 struct MCI_VD_PLAY_PARMS {
1747 	DWORD dwCallback;
1748 	DWORD dwFrom;
1749 	DWORD dwTo;
1750 	DWORD dwSpeed;
1751 }
1752 alias MCI_VD_PLAY_PARMS* PMCI_VD_PLAY_PARMS, LPMCI_VD_PLAY_PARMS;
1753 
1754 struct MCI_VD_STEP_PARMS {
1755 	DWORD dwCallback;
1756 	DWORD dwFrames;
1757 }
1758 alias MCI_VD_STEP_PARMS* PMCI_VD_STEP_PARMS, LPMCI_VD_STEP_PARMS;
1759 
1760 struct MCI_VD_ESCAPE_PARMSA {
1761 	DWORD dwCallback;
1762 	LPCSTR lpstrCommand;
1763 }
1764 alias MCI_VD_ESCAPE_PARMSA* PMCI_VD_ESCAPE_PARMSA, LPMCI_VD_ESCAPE_PARMSA;
1765 
1766 struct MCI_VD_ESCAPE_PARMSW {
1767 	DWORD dwCallback;
1768 	LPCWSTR lpstrCommand;
1769 }
1770 alias MCI_VD_ESCAPE_PARMSW* PMCI_VD_ESCAPE_PARMSW, LPMCI_VD_ESCAPE_PARMSW;
1771 
1772 struct MCI_WAVE_OPEN_PARMSA {
1773 	DWORD dwCallback;
1774 	MCIDEVICEID wDeviceID;
1775 	LPCSTR lpstrDeviceType;
1776 	LPCSTR lpstrElementName;
1777 	LPCSTR lpstrAlias;
1778 	DWORD dwBufferSeconds;
1779 }
1780 alias MCI_WAVE_OPEN_PARMSA* PMCI_WAVE_OPEN_PARMSA, LPMCI_WAVE_OPEN_PARMSA;
1781 
1782 struct MCI_WAVE_OPEN_PARMSW {
1783 	DWORD dwCallback;
1784 	MCIDEVICEID wDeviceID;
1785 	LPCWSTR lpstrDeviceType;
1786 	LPCWSTR lpstrElementName;
1787 	LPCWSTR lpstrAlias;
1788 	DWORD dwBufferSeconds;
1789 }
1790 alias MCI_WAVE_OPEN_PARMSW* PMCI_WAVE_OPEN_PARMSW, LPMCI_WAVE_OPEN_PARMSW;
1791 
1792 struct MCI_WAVE_DELETE_PARMS {
1793 	DWORD dwCallback;
1794 	DWORD dwFrom;
1795 	DWORD dwTo;
1796 }
1797 alias MCI_WAVE_DELETE_PARMS* PMCI_WAVE_DELETE_PARMS, LPMCI_WAVE_DELETE_PARMS;
1798 
1799 struct MCI_WAVE_SET_PARMS {
1800 	DWORD dwCallback;
1801 	DWORD dwTimeFormat;
1802 	DWORD dwAudio;
1803 	UINT wInput;
1804 	UINT wOutput;
1805 	WORD wFormatTag;
1806 	WORD wReserved2;
1807 	WORD nChannels;
1808 	WORD wReserved3;
1809 	DWORD nSamplesPerSec;
1810 	DWORD nAvgBytesPerSec;
1811 	WORD nBlockAlign;
1812 	WORD wReserved4;
1813 	WORD wBitsPerSample;
1814 	WORD wReserved5;
1815 }
1816 alias MCI_WAVE_SET_PARMS* PMCI_WAVE_SET_PARMS, LPMCI_WAVE_SET_PARMS;
1817 
1818 extern (Windows):
1819 LRESULT CloseDriver(HDRVR, LONG, LONG);
1820 HDRVR OpenDriver(LPCWSTR, LPCWSTR, LONG);
1821 LRESULT SendDriverMessage(HDRVR, UINT, LONG, LONG);
1822 HMODULE DrvGetModuleHandle(HDRVR);
1823 HMODULE GetDriverModuleHandle(HDRVR);
1824 LRESULT DefDriverProc(DWORD, HDRVR, UINT, LPARAM, LPARAM);
1825 UINT mmsystemGetVersion();
1826 // FIXME: I believe this next line is a mistake
1827 //alias OutputDebugString OutputDebugStr;
1828 BOOL sndPlaySoundA(LPCSTR, UINT);
1829 BOOL sndPlaySoundW(LPCWSTR, UINT);
1830 BOOL PlaySoundA(LPCSTR, HMODULE, DWORD);
1831 BOOL PlaySoundW(LPCWSTR, HMODULE, DWORD);
1832 UINT waveOutGetNumDevs();
1833 MMRESULT waveOutGetDevCapsA(UINT, LPWAVEOUTCAPSA, UINT);
1834 MMRESULT waveOutGetDevCapsW(UINT, LPWAVEOUTCAPSW, UINT);
1835 MMRESULT waveOutGetVolume(HWAVEOUT, PDWORD);
1836 MMRESULT waveOutSetVolume(HWAVEOUT, DWORD);
1837 MMRESULT waveOutGetErrorTextA(MMRESULT, LPSTR, UINT);
1838 MMRESULT waveOutGetErrorTextW(MMRESULT, LPWSTR, UINT);
1839 MMRESULT waveOutOpen(LPHWAVEOUT, UINT, LPCWAVEFORMATEX, DWORD, DWORD, DWORD);
1840 MMRESULT waveOutClose(HWAVEOUT);
1841 MMRESULT waveOutPrepareHeader(HWAVEOUT, LPWAVEHDR, UINT);
1842 MMRESULT waveOutUnprepareHeader(HWAVEOUT, LPWAVEHDR, UINT);
1843 MMRESULT waveOutWrite(HWAVEOUT, LPWAVEHDR, UINT);
1844 MMRESULT waveOutPause(HWAVEOUT);
1845 MMRESULT waveOutRestart(HWAVEOUT);
1846 MMRESULT waveOutReset(HWAVEOUT);
1847 MMRESULT waveOutBreakLoop(HWAVEOUT);
1848 MMRESULT waveOutGetPosition(HWAVEOUT, LPMMTIME, UINT);
1849 MMRESULT waveOutGetPitch(HWAVEOUT, PDWORD);
1850 MMRESULT waveOutSetPitch(HWAVEOUT, DWORD);
1851 MMRESULT waveOutGetPlaybackRate(HWAVEOUT, PDWORD);
1852 MMRESULT waveOutSetPlaybackRate(HWAVEOUT, DWORD);
1853 MMRESULT waveOutGetID(HWAVEOUT, LPUINT);
1854 MMRESULT waveOutMessage(HWAVEOUT, UINT, DWORD, DWORD);
1855 UINT waveInGetNumDevs();
1856 MMRESULT waveInGetDevCapsA(UINT, LPWAVEINCAPSA, UINT);
1857 MMRESULT waveInGetDevCapsW(UINT, LPWAVEINCAPSW, UINT);
1858 MMRESULT waveInGetErrorTextA(MMRESULT, LPSTR, UINT);
1859 MMRESULT waveInGetErrorTextW(MMRESULT, LPWSTR, UINT);
1860 MMRESULT waveInOpen(LPHWAVEIN, UINT, LPCWAVEFORMATEX, DWORD, DWORD, DWORD);
1861 MMRESULT waveInClose(HWAVEIN);
1862 MMRESULT waveInPrepareHeader(HWAVEIN, LPWAVEHDR, UINT);
1863 MMRESULT waveInUnprepareHeader(HWAVEIN, LPWAVEHDR, UINT);
1864 MMRESULT waveInAddBuffer(HWAVEIN, LPWAVEHDR, UINT);
1865 MMRESULT waveInStart(HWAVEIN);
1866 MMRESULT waveInStop(HWAVEIN);
1867 MMRESULT waveInReset(HWAVEIN);
1868 MMRESULT waveInGetPosition(HWAVEIN, LPMMTIME, UINT);
1869 MMRESULT waveInGetID(HWAVEIN, LPUINT);
1870 MMRESULT waveInMessage(HWAVEIN, UINT, DWORD, DWORD);
1871 UINT midiOutGetNumDevs();
1872 MMRESULT midiStreamOpen(LPHMIDISTRM, LPUINT, DWORD, DWORD, DWORD, DWORD);
1873 MMRESULT midiStreamClose(HMIDISTRM);
1874 MMRESULT midiStreamProperty(HMIDISTRM, LPBYTE, DWORD);
1875 MMRESULT midiStreamPosition(HMIDISTRM, LPMMTIME, UINT);
1876 MMRESULT midiStreamOut(HMIDISTRM, LPMIDIHDR, UINT);
1877 MMRESULT midiStreamPause(HMIDISTRM);
1878 MMRESULT midiStreamRestart(HMIDISTRM);
1879 MMRESULT midiStreamStop(HMIDISTRM);
1880 MMRESULT midiConnect(HMIDI, HMIDIOUT, PVOID);
1881 MMRESULT midiDisconnect(HMIDI, HMIDIOUT, PVOID);
1882 MMRESULT midiOutGetDevCapsA(UINT, LPMIDIOUTCAPSA, UINT);
1883 MMRESULT midiOutGetDevCapsW(UINT, LPMIDIOUTCAPSW, UINT);
1884 MMRESULT midiOutGetVolume(HMIDIOUT, PDWORD);
1885 MMRESULT midiOutSetVolume(HMIDIOUT, DWORD);
1886 MMRESULT midiOutGetErrorTextA(MMRESULT, LPSTR, UINT);
1887 MMRESULT midiOutGetErrorTextW(MMRESULT, LPWSTR, UINT);
1888 MMRESULT midiOutOpen(LPHMIDIOUT, UINT, DWORD, DWORD, DWORD);
1889 MMRESULT midiOutClose(HMIDIOUT);
1890 MMRESULT midiOutPrepareHeader(HMIDIOUT, LPMIDIHDR, UINT);
1891 MMRESULT midiOutUnprepareHeader(HMIDIOUT, LPMIDIHDR, UINT);
1892 MMRESULT midiOutShortMsg(HMIDIOUT, DWORD);
1893 MMRESULT midiOutLongMsg(HMIDIOUT, LPMIDIHDR, UINT);
1894 MMRESULT midiOutReset(HMIDIOUT);
1895 MMRESULT midiOutCachePatches(HMIDIOUT, UINT, LPWORD, UINT);
1896 MMRESULT midiOutCacheDrumPatches(HMIDIOUT, UINT, LPWORD, UINT);
1897 MMRESULT midiOutGetID(HMIDIOUT, LPUINT);
1898 MMRESULT midiOutMessage(HMIDIOUT, UINT, DWORD, DWORD);
1899 UINT midiInGetNumDevs();
1900 MMRESULT midiInGetDevCapsA(UINT, LPMIDIINCAPSA, UINT);
1901 MMRESULT midiInGetDevCapsW(UINT, LPMIDIINCAPSW, UINT);
1902 MMRESULT midiInGetErrorTextA(MMRESULT, LPSTR, UINT);
1903 MMRESULT midiInGetErrorTextW(MMRESULT, LPWSTR, UINT);
1904 MMRESULT midiInOpen(LPHMIDIIN, UINT, DWORD, DWORD, DWORD);
1905 MMRESULT midiInClose(HMIDIIN);
1906 MMRESULT midiInPrepareHeader(HMIDIIN, LPMIDIHDR, UINT);
1907 MMRESULT midiInUnprepareHeader(HMIDIIN, LPMIDIHDR, UINT);
1908 MMRESULT midiInAddBuffer(HMIDIIN, LPMIDIHDR, UINT);
1909 MMRESULT midiInStart(HMIDIIN);
1910 MMRESULT midiInStop(HMIDIIN);
1911 MMRESULT midiInReset(HMIDIIN);
1912 MMRESULT midiInGetID(HMIDIIN, LPUINT);
1913 MMRESULT midiInMessage(HMIDIIN, UINT, DWORD, DWORD);
1914 UINT auxGetNumDevs();
1915 MMRESULT auxGetDevCapsA(UINT, LPAUXCAPSA, UINT);
1916 MMRESULT auxGetDevCapsW(UINT, LPAUXCAPSW, UINT);
1917 MMRESULT auxSetVolume(UINT, DWORD);
1918 MMRESULT auxGetVolume(UINT, PDWORD);
1919 MMRESULT auxOutMessage(UINT, UINT, DWORD, DWORD);
1920 UINT mixerGetNumDevs();
1921 MMRESULT mixerGetDevCapsA(UINT, LPMIXERCAPSA, UINT);
1922 MMRESULT mixerGetDevCapsW(UINT, LPMIXERCAPSW, UINT);
1923 MMRESULT mixerOpen(LPHMIXER, UINT, DWORD, DWORD, DWORD);
1924 MMRESULT mixerClose(HMIXER);
1925 DWORD mixerMessage(HMIXER, UINT, DWORD, DWORD);
1926 MMRESULT mixerGetLineInfoA(HMIXEROBJ, LPMIXERLINEA, DWORD);
1927 MMRESULT mixerGetLineInfoW(HMIXEROBJ, LPMIXERLINEW, DWORD);
1928 MMRESULT mixerGetID(HMIXEROBJ, PUINT, DWORD);
1929 MMRESULT mixerGetLineControlsA(HMIXEROBJ, LPMIXERLINECONTROLSA, DWORD);
1930 MMRESULT mixerGetLineControlsW(HMIXEROBJ, LPMIXERLINECONTROLSW, DWORD);
1931 MMRESULT mixerGetControlDetailsA(HMIXEROBJ, LPMIXERCONTROLDETAILS, DWORD);
1932 MMRESULT mixerGetControlDetailsW(HMIXEROBJ, LPMIXERCONTROLDETAILS, DWORD);
1933 MMRESULT mixerSetControlDetails(HMIXEROBJ, LPMIXERCONTROLDETAILS, DWORD);
1934 MMRESULT timeGetSystemTime(LPMMTIME, UINT);
1935 DWORD timeGetTime();
1936 MMRESULT timeSetEvent(UINT, UINT, LPTIMECALLBACK, DWORD, UINT);
1937 MMRESULT timeKillEvent(UINT);
1938 MMRESULT timeGetDevCaps(LPTIMECAPS, UINT);
1939 MMRESULT timeBeginPeriod(UINT);
1940 MMRESULT timeEndPeriod(UINT);
1941 UINT joyGetNumDevs();
1942 MMRESULT joyGetDevCapsA(UINT, LPJOYCAPSA, UINT);
1943 MMRESULT joyGetDevCapsW(UINT, LPJOYCAPSW, UINT);
1944 MMRESULT joyGetPos(UINT, LPJOYINFO);
1945 MMRESULT joyGetPosEx(UINT, LPJOYINFOEX);
1946 MMRESULT joyGetThreshold(UINT, LPUINT);
1947 MMRESULT joyReleaseCapture(UINT);
1948 MMRESULT joySetCapture(HWND, UINT, UINT, BOOL);
1949 MMRESULT joySetThreshold(UINT, UINT);
1950 FOURCC mmioStringToFOURCCA(LPCSTR, UINT);
1951 FOURCC mmioStringToFOURCCW(LPCWSTR, UINT);
1952 LPMMIOPROC mmioInstallIOProcA(FOURCC, LPMMIOPROC, DWORD);
1953 LPMMIOPROC mmioInstallIOProcW(FOURCC, LPMMIOPROC, DWORD);
1954 HMMIO mmioOpenA(LPSTR, LPMMIOINFO, DWORD);
1955 HMMIO mmioOpenW(LPWSTR, LPMMIOINFO, DWORD);
1956 MMRESULT mmioRenameA(LPCSTR, LPCSTR, LPCMMIOINFO, DWORD);
1957 MMRESULT mmioRenameW(LPCWSTR, LPCWSTR, LPCMMIOINFO, DWORD);
1958 MMRESULT mmioClose(HMMIO, UINT);
1959 LONG mmioRead(HMMIO, HPSTR, LONG);
1960 LONG mmioWrite(HMMIO, LPCSTR, LONG);
1961 LONG mmioSeek(HMMIO, LONG, int);
1962 MMRESULT mmioGetInfo(HMMIO, LPMMIOINFO, UINT);
1963 MMRESULT mmioSetInfo(HMMIO, LPCMMIOINFO, UINT);
1964 MMRESULT mmioSetBuffer(HMMIO, LPSTR, LONG, UINT);
1965 MMRESULT mmioFlush(HMMIO, UINT);
1966 MMRESULT mmioAdvance(HMMIO, LPMMIOINFO, UINT);
1967 LRESULT mmioSendMessage(HMMIO, UINT, LPARAM, LPARAM);
1968 MMRESULT mmioDescend(HMMIO, LPMMCKINFO, const(MMCKINFO)*, UINT);
1969 MMRESULT mmioAscend(HMMIO, LPMMCKINFO, UINT);
1970 MMRESULT mmioCreateChunk(HMMIO, LPMMCKINFO, UINT);
1971 MCIERROR mciSendCommandA(MCIDEVICEID, UINT, DWORD, DWORD);
1972 MCIERROR mciSendCommandW(MCIDEVICEID, UINT, DWORD, DWORD);
1973 MCIERROR mciSendStringA(LPCSTR, LPSTR, UINT, HWND);
1974 MCIERROR mciSendStringW(LPCWSTR, LPWSTR, UINT, HWND);
1975 MCIDEVICEID mciGetDeviceIDA(LPCSTR);
1976 MCIDEVICEID mciGetDeviceIDW(LPCWSTR);
1977 MCIDEVICEID mciGetDeviceIDFromElementIDA(DWORD, LPCSTR);
1978 MCIDEVICEID mciGetDeviceIDFromElementIDW(DWORD, LPCWSTR);
1979 BOOL mciGetErrorStringA(MCIERROR, LPSTR, UINT);
1980 BOOL mciGetErrorStringW(MCIERROR, LPWSTR, UINT);
1981 BOOL mciSetYieldProc(MCIDEVICEID, YIELDPROC, DWORD);
1982 HTASK mciGetCreatorTask(MCIDEVICEID);
1983 YIELDPROC mciGetYieldProc(MCIDEVICEID, PDWORD);
1984 
1985 struct MCI_SEQ_SET_PARMS {
1986 	DWORD dwCallback;
1987 	DWORD dwTimeFormat;
1988 	DWORD dwAudio;
1989 	DWORD dwTempo;
1990 	DWORD dwPort;
1991 	DWORD dwSlave;
1992 	DWORD dwMaster;
1993 	DWORD dwOffset;
1994 }
1995 alias MCI_SEQ_SET_PARMS* PMCI_SEQ_SET_PARMS, LPMCI_SEQ_SET_PARMS;
1996 
1997 struct MCI_ANIM_OPEN_PARMSA {
1998 	DWORD dwCallback;
1999 	MCIDEVICEID wDeviceID;
2000 	LPCSTR lpstrDeviceType;
2001 	LPCSTR lpstrElementName;
2002 	LPCSTR lpstrAlias;
2003 	DWORD dwStyle;
2004 	HWND hWndParent;
2005 }
2006 alias MCI_ANIM_OPEN_PARMSA* PMCI_ANIM_OPEN_PARMSA, LPMCI_ANIM_OPEN_PARMSA;
2007 
2008 struct MCI_ANIM_OPEN_PARMSW {
2009 	DWORD dwCallback;
2010 	MCIDEVICEID wDeviceID;
2011 	LPCWSTR lpstrDeviceType;
2012 	LPCWSTR lpstrElementName;
2013 	LPCWSTR lpstrAlias;
2014 	DWORD dwStyle;
2015 	HWND hWndParent;
2016 }
2017 alias MCI_ANIM_OPEN_PARMSW* PMCI_ANIM_OPEN_PARMSW, LPMCI_ANIM_OPEN_PARMSW;
2018 
2019 struct MCI_ANIM_PLAY_PARMS {
2020 	DWORD dwCallback;
2021 	DWORD dwFrom;
2022 	DWORD dwTo;
2023 	DWORD dwSpeed;
2024 }
2025 alias MCI_ANIM_PLAY_PARMS* PMCI_ANIM_PLAY_PARMS, LPMCI_ANIM_PLAY_PARMS;
2026 
2027 struct MCI_ANIM_STEP_PARMS {
2028 	DWORD dwCallback;
2029 	DWORD dwFrames;
2030 }
2031 alias MCI_ANIM_STEP_PARMS* PMCI_ANIM_STEP_PARMS, LPMCI_ANIM_STEP_PARMS;
2032 
2033 struct MCI_ANIM_WINDOW_PARMSA {
2034 	DWORD dwCallback;
2035 	HWND hWnd;
2036 	UINT nCmdShow;
2037 	LPCSTR lpstrText;
2038 }
2039 alias MCI_ANIM_WINDOW_PARMSA* PMCI_ANIM_WINDOW_PARMSA, LPMCI_ANIM_WINDOW_PARMSA;
2040 
2041 struct MCI_ANIM_WINDOW_PARMSW {
2042 	DWORD dwCallback;
2043 	HWND hWnd;
2044 	UINT nCmdShow;
2045 	LPCWSTR lpstrText;
2046 }
2047 alias MCI_ANIM_WINDOW_PARMSW* PMCI_ANIM_WINDOW_PARMSW, LPMCI_ANIM_WINDOW_PARMSW;
2048 
2049 struct MCI_ANIM_RECT_PARMS {
2050 	DWORD dwCallback;
2051 	//#ifdef MCI_USE_OFFEXT
2052 	//	POINT ptOffset;
2053 	//	POINT ptExtent;
2054 	//#else
2055 	RECT rc;
2056 	//#endif
2057 }
2058 alias MCI_ANIM_RECT_PARMS* PMCI_ANIM_RECT_PARMS, LPMCI_ANIM_RECT_PARMS;
2059 
2060 struct MCI_ANIM_UPDATE_PARMS {
2061 	DWORD dwCallback;
2062 	RECT rc;
2063 	HDC hDC;
2064 }
2065 alias MCI_ANIM_UPDATE_PARMS* PMCI_ANIM_UPDATE_PARMS, LPMCI_ANIM_UPDATE_PARMS;
2066 
2067 struct MCI_OVLY_OPEN_PARMSA {
2068 	DWORD dwCallback;
2069 	MCIDEVICEID wDeviceID;
2070 	LPCSTR lpstrDeviceType;
2071 	LPCSTR lpstrElementName;
2072 	LPCSTR lpstrAlias;
2073 	DWORD dwStyle;
2074 	HWND hWndParent;
2075 }
2076 alias MCI_OVLY_OPEN_PARMSA* PMCI_OVLY_OPEN_PARMSA, LPMCI_OVLY_OPEN_PARMSA;
2077 
2078 struct MCI_OVLY_OPEN_PARMSW {
2079 	DWORD dwCallback;
2080 	MCIDEVICEID wDeviceID;
2081 	LPCWSTR lpstrDeviceType;
2082 	LPCWSTR lpstrElementName;
2083 	LPCWSTR lpstrAlias;
2084 	DWORD dwStyle;
2085 	HWND hWndParent;
2086 }
2087 alias MCI_OVLY_OPEN_PARMSW* PMCI_OVLY_OPEN_PARMSW, LPMCI_OVLY_OPEN_PARMSW;
2088 
2089 struct MCI_OVLY_WINDOW_PARMSA {
2090 	DWORD dwCallback;
2091 	HWND hWnd;
2092 	UINT nCmdShow;
2093 	LPCSTR lpstrText;
2094 }
2095 alias MCI_OVLY_WINDOW_PARMSA* PMCI_OVLY_WINDOW_PARMSA, LPMCI_OVLY_WINDOW_PARMSA;
2096 
2097 struct MCI_OVLY_WINDOW_PARMSW {
2098 	DWORD dwCallback;
2099 	HWND hWnd;
2100 	UINT nCmdShow;
2101 	LPCWSTR lpstrText;
2102 }
2103 alias MCI_OVLY_WINDOW_PARMSW* PMCI_OVLY_WINDOW_PARMSW, LPMCI_OVLY_WINDOW_PARMSW;
2104 
2105 struct MCI_OVLY_RECT_PARMS {
2106 	DWORD dwCallback;
2107 	//#ifdef MCI_USE_OFFEXT
2108 	//	POINT ptOffset;
2109 	//	POINT ptExtent;
2110 	//#else
2111 	RECT rc;
2112 	//#endif
2113 }
2114 alias MCI_OVLY_RECT_PARMS* PMCI_OVLY_RECT_PARMS, LPMCI_OVLY_RECT_PARMS;
2115 
2116 struct MCI_OVLY_SAVE_PARMSA {
2117 	DWORD dwCallback;
2118 	LPCSTR lpfilename;
2119 	RECT rc;
2120 }
2121 alias MCI_OVLY_SAVE_PARMSA* PMCI_OVLY_SAVE_PARMSA, LPMCI_OVLY_SAVE_PARMSA;
2122 
2123 struct MCI_OVLY_SAVE_PARMSW {
2124 	DWORD dwCallback;
2125 	LPCWSTR lpfilename;
2126 	RECT rc;
2127 }
2128 alias MCI_OVLY_SAVE_PARMSW* PMCI_OVLY_SAVE_PARMSW, LPMCI_OVLY_SAVE_PARMSW;
2129 
2130 struct MCI_OVLY_LOAD_PARMSA {
2131 	DWORD dwCallback;
2132 	LPCSTR lpfilename;
2133 	RECT rc;
2134 }
2135 alias MCI_OVLY_LOAD_PARMSA* PMCI_OVLY_LOAD_PARMSA, LPMCI_OVLY_LOAD_PARMSA;
2136 
2137 struct MCI_OVLY_LOAD_PARMSW {
2138 	DWORD dwCallback;
2139 	LPCWSTR lpfilename;
2140 	RECT rc;
2141 }
2142 alias MCI_OVLY_LOAD_PARMSW* PMCI_OVLY_LOAD_PARMSW, LPMCI_OVLY_LOAD_PARMSW;
2143 
2144 version(Unicode) {
2145 	alias WAVEOUTCAPSW WAVEOUTCAPS;
2146 	alias WAVEINCAPSW WAVEINCAPS;
2147 	alias MIDIOUTCAPSW MIDIOUTCAPS;
2148 	alias MIDIINCAPSW MIDIINCAPS;
2149 	alias AUXCAPSW AUXCAPS;
2150 	alias MIXERCAPSW MIXERCAPS;
2151 	alias MIXERLINEW MIXERLINE;
2152 	alias MIXERCONTROLA MIXERCONTROL;
2153 	alias MIXERLINECONTROLSW MIXERLINECONTROLS;
2154 	alias MIXERCONTROLDETAILS_LISTTEXTW MIXERCONTROLDETAILS_LISTTEXT;
2155 	alias JOYCAPSW JOYCAPS;
2156 	alias MCI_OPEN_PARMSW MCI_OPEN_PARMS;
2157 	alias MCI_INFO_PARMSW MCI_INFO_PARMS;
2158 	alias MCI_SYSINFO_PARMSW MCI_SYSINFO_PARMS;
2159 	alias MCI_SAVE_PARMSW MCI_SAVE_PARMS;
2160 	alias MCI_LOAD_PARMSW MCI_LOAD_PARMS;
2161 	alias MCI_VD_ESCAPE_PARMSW MCI_VD_ESCAPE_PARMS;
2162 	alias MCI_WAVE_OPEN_PARMSW MCI_WAVE_OPEN_PARMS;
2163 	alias MCI_ANIM_OPEN_PARMSW MCI_ANIM_OPEN_PARMS;
2164 	alias MCI_ANIM_WINDOW_PARMSW MCI_ANIM_WINDOW_PARMS;
2165 	alias MCI_OVLY_OPEN_PARMSW MCI_OVLY_OPEN_PARMS;
2166 	alias MCI_OVLY_WINDOW_PARMSW MCI_OVLY_WINDOW_PARMS;
2167 	alias MCI_OVLY_SAVE_PARMSW MCI_OVLY_SAVE_PARMS;
2168 
2169 	alias sndPlaySoundW sndPlaySound;
2170 	alias PlaySoundW PlaySound;
2171 	alias waveOutGetDevCapsW waveOutGetDevCaps;
2172 	alias waveOutGetErrorTextW waveOutGetErrorText;
2173 	alias waveInGetDevCapsW waveInGetDevCaps;
2174 	alias waveInGetErrorTextW waveInGetErrorText;
2175 	alias midiOutGetDevCapsW midiOutGetDevCaps;
2176 	alias midiOutGetErrorTextW midiOutGetErrorText;
2177 	alias midiInGetDevCapsW midiInGetDevCaps;
2178 	alias midiInGetErrorTextW midiInGetErrorText;
2179 	alias auxGetDevCapsW auxGetDevCaps;
2180 	alias mixerGetDevCapsW mixerGetDevCaps;
2181 	alias mixerGetLineInfoW mixerGetLineInfo;
2182 	alias mixerGetLineControlsW mixerGetLineControls;
2183 	alias mixerGetControlDetailsW mixerGetControlDetails;
2184 	alias joyGetDevCapsW joyGetDevCaps;
2185 	alias mmioInstallIOProcW mmioInstallIOProc;
2186 	alias mmioStringToFOURCCW mmioStringToFOURCC;
2187 	alias mmioOpenW mmioOpen;
2188 	alias mmioRenameW mmioRename;
2189 	alias mciSendCommandW mciSendCommand;
2190 	alias mciSendStringW mciSendString;
2191 	alias mciGetDeviceIDW mciGetDeviceID;
2192 	alias mciGetDeviceIDFromElementIDW mciGetDeviceIDFromElementID;
2193 	alias mciGetErrorStringW mciGetErrorString;
2194 
2195 } else {
2196 	alias WAVEOUTCAPSA WAVEOUTCAPS;
2197 	alias WAVEINCAPSA WAVEINCAPS;
2198 	alias MIDIOUTCAPSA MIDIOUTCAPS;
2199 	alias MIDIINCAPSA MIDIINCAPS;
2200 	alias AUXCAPSA AUXCAPS;
2201 	alias MIXERCAPSA MIXERCAPS;
2202 	alias MIXERLINEA MIXERLINE;
2203 	alias MIXERCONTROLA MIXERCONTROL;
2204 	alias MIXERLINECONTROLSA MIXERLINECONTROLS;
2205 	alias MIXERCONTROLDETAILS_LISTTEXTA MIXERCONTROLDETAILS_LISTTEXT;
2206 	alias JOYCAPSA JOYCAPS;
2207 	alias MCI_OPEN_PARMSA MCI_OPEN_PARMS;
2208 	alias MCI_INFO_PARMSA MCI_INFO_PARMS;
2209 	alias MCI_SYSINFO_PARMSA MCI_SYSINFO_PARMS;
2210 	alias MCI_SAVE_PARMSA MCI_SAVE_PARMS;
2211 	alias MCI_LOAD_PARMSA MCI_LOAD_PARMS;
2212 	alias MCI_VD_ESCAPE_PARMSA MCI_VD_ESCAPE_PARMS;
2213 	alias MCI_WAVE_OPEN_PARMSA MCI_WAVE_OPEN_PARMS;
2214 	alias MCI_ANIM_OPEN_PARMSA MCI_ANIM_OPEN_PARMS;
2215 	alias MCI_ANIM_WINDOW_PARMSA MCI_ANIM_WINDOW_PARMS;
2216 	alias MCI_OVLY_OPEN_PARMSA MCI_OVLY_OPEN_PARMS;
2217 	alias MCI_OVLY_WINDOW_PARMSA MCI_OVLY_WINDOW_PARMS;
2218 	alias MCI_OVLY_SAVE_PARMSA MCI_OVLY_SAVE_PARMS;
2219 
2220 	alias sndPlaySoundA sndPlaySound;
2221 	alias PlaySoundA PlaySound;
2222 	alias waveOutGetDevCapsA waveOutGetDevCaps;
2223 	alias waveOutGetErrorTextA waveOutGetErrorText;
2224 	alias waveInGetDevCapsA waveInGetDevCaps;
2225 	alias waveInGetErrorTextA waveInGetErrorText;
2226 	alias midiOutGetDevCapsA midiOutGetDevCaps;
2227 	alias midiOutGetErrorTextA midiOutGetErrorText;
2228 	alias midiInGetDevCapsA midiInGetDevCaps;
2229 	alias midiInGetErrorTextA midiInGetErrorText;
2230 	alias auxGetDevCapsA auxGetDevCaps;
2231 	alias mixerGetDevCapsA mixerGetDevCaps;
2232 	alias mixerGetLineInfoA mixerGetLineInfo;
2233 	alias mixerGetLineControlsA mixerGetLineControls;
2234 	alias mixerGetControlDetailsA mixerGetControlDetails;
2235 	alias joyGetDevCapsA joyGetDevCaps;
2236 	alias mmioInstallIOProcA mmioInstallIOProc;
2237 	alias mmioStringToFOURCCA mmioStringToFOURCC;
2238 	alias mmioOpenA mmioOpen;
2239 	alias mmioRenameA mmioRename;
2240 	alias mciSendCommandA mciSendCommand;
2241 	alias mciSendStringA mciSendString;
2242 	alias mciGetDeviceIDA mciGetDeviceID;
2243 	alias mciGetDeviceIDFromElementIDA mciGetDeviceIDFromElementID;
2244 	alias mciGetErrorStringA mciGetErrorString;
2245 }
2246 
2247 alias WAVEOUTCAPS* PWAVEOUTCAPS, LPWAVEOUTCAPS;
2248 alias WAVEINCAPS* PWAVEINCAPS, LPWAVEINCAPS;
2249 alias MIDIOUTCAPS* PMIDIOUTCAPS, LPMIDIOUTCAPS;
2250 alias MIDIINCAPS* PMIDIINCAPS, LPMIDIINCAPS;
2251 alias AUXCAPS* PAUXCAPS, LPAUXCAPS;
2252 alias MIXERCAPS* PMIXERCAPS, LPMIXERCAPS;
2253 alias MIXERLINE* PMIXERLINE, LPMIXERLINE;
2254 alias MIXERCONTROL* PMIXERCONTROL, LPMIXERCONTROL;
2255 alias MIXERLINECONTROLS* PMIXERLINECONTROLS, LPMIXERLINECONTROLS;
2256 alias MIXERCONTROLDETAILS_LISTTEXT* PMIXERCONTROLDETAILS_LISTTEXT, LPMIXERCONTROLDETAILS_LISTTEXT;
2257 alias JOYCAPS* PJOYCAPS, LPJOYCAPS;
2258 alias MCI_OPEN_PARMS* PMCI_OPEN_PARMS, LPMCI_OPEN_PARMS;
2259 alias MCI_INFO_PARMS* LPMCI_INFO_PARMS;
2260 alias MCI_SYSINFO_PARMS* PMCI_SYSINFO_PARMS, LPMCI_SYSINFO_PARMS;
2261 alias MCI_SAVE_PARMS* PMCI_SAVE_PARMS, LPMCI_SAVE_PARMS;
2262 alias MCI_LOAD_PARMS* PMCI_LOAD_PARMS, LPMCI_LOAD_PARMS;
2263 alias MCI_VD_ESCAPE_PARMS* PMCI_VD_ESCAPE_PARMS, LPMCI_VD_ESCAPE_PARMS;
2264 alias MCI_WAVE_OPEN_PARMS* PMCI_WAVE_OPEN_PARMS, LPMCI_WAVE_OPEN_PARMS;
2265 alias MCI_ANIM_OPEN_PARMS* PMCI_ANIM_OPEN_PARMS, LPMCI_ANIM_OPEN_PARMS;
2266 alias MCI_ANIM_WINDOW_PARMS* PMCI_ANIM_WINDOW_PARMS, LPMCI_ANIM_WINDOW_PARMS;
2267 alias MCI_OVLY_OPEN_PARMS* PMCI_OVLY_OPEN_PARMS, LPMCI_OVLY_OPEN_PARMS;
2268 alias MCI_OVLY_WINDOW_PARMS* PMCI_OVLY_WINDOW_PARMS, LPMCI_OVLY_WINDOW_PARMS;
2269 alias MCI_OVLY_SAVE_PARMS* PMCI_OVLY_SAVE_PARMS, LPMCI_OVLY_SAVE_PARMS;