summary refs log tree commit diff stats
path: root/lib/windows/mmsystem.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/windows/mmsystem.nim')
-rwxr-xr-xlib/windows/mmsystem.nim2656
1 files changed, 2656 insertions, 0 deletions
diff --git a/lib/windows/mmsystem.nim b/lib/windows/mmsystem.nim
new file mode 100755
index 000000000..b18ae2be4
--- /dev/null
+++ b/lib/windows/mmsystem.nim
@@ -0,0 +1,2656 @@
+#
+#
+#            Nimrod's Runtime Library
+#        (c) Copyright 2006 Andreas Rumpf
+#
+#    See the file "copying.txt", included in this
+#    distribution, for details about the copyright.
+#
+
+#*********************************
+#*******************************
+# Generated by c2pas32  v0.9b
+#     Fixed by P.V.Ozerski
+# (c) 2001 Oleg Bulychov
+#     Original C header file
+# Gladiators Software
+#     (created at Dec-03-1998)
+# http://www.astonshell.com/
+#   from LCC-win32 is used
+#*********************************
+#   LCC-win32 (c) Jacob Navia
+#*******************************
+
+import
+  windows
+
+type
+  MMRESULT* = UINT
+  MMVERSION* = UINT
+  HWAVEOUT* = THandle
+  LPHWAVEOUT* = ptr HWAVEOUT
+  HWAVEIN* = THandle
+  LPHWAVEIN* = ptr HWAVEOUT
+  HWAVE* = THandle
+  LPHWAVE* = ptr THandle
+  LPUINT* = ptr UINT
+
+const
+  MAXPNAMELEN* = 32
+  MAXERRORLENGTH* = 256
+  MAX_JOYSTICKOEMVXDNAME* = 260
+  MM_MIDI_MAPPER* = 1
+  MM_WAVE_MAPPER* = 2
+  MM_SNDBLST_MIDIOUT* = 3
+  MM_SNDBLST_MIDIIN* = 4
+  MM_SNDBLST_SYNTH* = 5
+  MM_SNDBLST_WAVEOUT* = 6
+  MM_SNDBLST_WAVEIN* = 7
+  MM_ADLIB* = 9
+  MM_MPU401_MIDIOUT* = 10
+  MM_MPU401_MIDIIN* = 11
+  MM_PC_JOYSTICK* = 12
+  TIME_MS* = 1
+  TIME_SAMPLES* = 2
+  TIME_BYTES* = 4
+  TIME_SMPTE* = 8
+  TIME_MIDI* = 16
+  TIME_TICKS* = 32
+  MM_MCINOTIFY* = 0x000003B9
+  MM_WOM_OPEN* = 0x000003BB
+  MM_WOM_CLOSE* = 0x000003BC
+  MM_WOM_DONE* = 0x000003BD
+  MM_WIM_OPEN* = 0x000003BE
+  MM_WIM_CLOSE* = 0x000003BF
+  MM_WIM_DATA* = 0x000003C0
+  MM_MIM_OPEN* = 0x000003C1
+  MM_MIM_CLOSE* = 0x000003C2
+  MM_MIM_DATA* = 0x000003C3
+  MM_MIM_LONGDATA* = 0x000003C4
+  MM_MIM_ERROR* = 0x000003C5
+  MM_MIM_LONGERROR* = 0x000003C6
+  MM_MOM_OPEN* = 0x000003C7
+  MM_MOM_CLOSE* = 0x000003C8
+  MM_MOM_DONE* = 0x000003C9
+  MM_DRVM_OPEN* = 0x000003D0
+  MM_DRVM_CLOSE* = 0x000003D1
+  MM_DRVM_DATA* = 0x000003D2
+  MM_DRVM_ERROR* = 0x000003D3
+  MM_STREAM_OPEN* = 0x000003D4
+  MM_STREAM_CLOSE* = 0x000003D5
+  MM_STREAM_DONE* = 0x000003D6
+  MM_STREAM_ERROR* = 0x000003D7
+  MM_MOM_POSITIONCB* = 0x000003CA
+  MM_MCISIGNAL* = 0x000003CB
+  WAVE_INVALIDFORMAT* = 0
+  WAVE_FORMAT_1M08* = 1
+  WAVE_FORMAT_1S08* = 2
+  WAVE_FORMAT_1M16* = 4
+  WAVE_FORMAT_1S16* = 8
+  WAVE_FORMAT_2M08* = 16
+  WAVE_FORMAT_2S08* = 32
+  WAVE_FORMAT_2M16* = 64
+  WAVE_FORMAT_2S16* = 128
+  WAVE_FORMAT_4M08* = 256
+  WAVE_FORMAT_4S08* = 512
+  WAVE_FORMAT_4M16* = 0x00000400
+  WAVE_FORMAT_4S16* = 0x00000800
+  MM_MIM_MOREDATA* = 0x000003CC
+  MM_MIXM_LINE_CHANGE* = 0x000003D0
+  MM_MIXM_CONTROL_CHANGE* = 0x000003D1
+  MMSYSERR_BASE* = 0
+  WAVERR_BASE* = 32
+  MIDIERR_BASE* = 64
+  TIMERR_BASE* = 96
+  JOYERR_BASE* = 160
+  MCIERR_BASE* = 256
+  MIXERR_BASE* = 1024
+  MCI_STRING_OFFSET* = 512
+  MCI_VD_OFFSET* = 1024
+  MCI_CD_OFFSET* = 1088
+  MCI_WAVE_OFFSET* = 1152
+  MCI_SEQ_OFFSET* = 1216
+  MMSYSERR_NOERROR* = 0
+  MMSYSERR_ERROR* = (MMSYSERR_BASE + 1)
+  MMSYSERR_BADDEVICEID* = (MMSYSERR_BASE + 2)
+  MMSYSERR_NOTENABLED* = (MMSYSERR_BASE + 3)
+  MMSYSERR_ALLOCATED* = (MMSYSERR_BASE + 4)
+  MMSYSERR_INVALHANDLE* = (MMSYSERR_BASE + 5)
+  MMSYSERR_NODRIVER* = (MMSYSERR_BASE + 6)
+  MMSYSERR_NOMEM* = (MMSYSERR_BASE + 7)
+  MMSYSERR_NOTSUPPORTED* = (MMSYSERR_BASE + 8)
+  MMSYSERR_BADERRNUM* = (MMSYSERR_BASE + 9)
+  MMSYSERR_INVALFLAG* = (MMSYSERR_BASE + 10)
+  MMSYSERR_INVALPARAM* = (MMSYSERR_BASE + 11)
+  MMSYSERR_HANDLEBUSY* = (MMSYSERR_BASE + 12)
+  MMSYSERR_INVALIDALIAS* = (MMSYSERR_BASE + 13)
+  MMSYSERR_BADDB* = (MMSYSERR_BASE + 14)
+  MMSYSERR_KEYNOTFOUND* = (MMSYSERR_BASE + 15)
+  MMSYSERR_READERROR* = (MMSYSERR_BASE + 16)
+  MMSYSERR_WRITEERROR* = (MMSYSERR_BASE + 17)
+  MMSYSERR_DELETEERROR* = (MMSYSERR_BASE + 18)
+  MMSYSERR_VALNOTFOUND* = (MMSYSERR_BASE + 19)
+  MMSYSERR_NODRIVERCB* = (MMSYSERR_BASE + 20)
+  MMSYSERR_LASTERROR* = (MMSYSERR_BASE + 20)
+  MM_JOY1MOVE* = 0x000003A0
+  MM_JOY2MOVE* = 0x000003A1
+  MM_JOY1ZMOVE* = 0x000003A2
+  MM_JOY2ZMOVE* = 0x000003A3
+  MM_JOY1BUTTONDOWN* = 0x000003B5
+  MM_JOY2BUTTONDOWN* = 0x000003B6
+  MM_JOY1BUTTONUP* = 0x000003B7
+  MM_JOY2BUTTONUP* = 0x000003B8
+  CALLBACK_TYPEMASK* = 0x00070000
+  CALLBACK_NULL* = 0
+  CALLBACK_EVENT* = 0x00050000
+  CALLBACK_WINDOW* = 0x00010000
+  CALLBACK_TASK* = 0x00020000
+  CALLBACK_THREAD* = CALLBACK_TASK
+  CALLBACK_FUNCTION* = 0x00030000
+
+type
+  HDRVR* = THandle
+
+const
+  DRV_LOAD* = 1
+  DRV_ENABLE* = 2
+  DRV_OPEN* = 0x00000003
+  DRV_CLOSE* = 4
+  DRV_DISABLE* = 0x00000005
+  DRV_FREE* = 0x00000006
+  DRV_CONFIGURE* = 0x00000007
+  DRV_QUERYCONFIGURE* = 8
+  DRV_INSTALL* = 0x00000009
+  DRV_REMOVE* = 0x0000000A
+  DRV_EXITSESSION* = 0x0000000B
+  DRV_POWER* = 0x0000000F
+  DRV_RESERVED* = 0x00000800
+  DRV_USER* = 0x00004000
+  DRVCNF_CANCEL* = 0
+  DRVCNF_OK* = 1
+  DRVCNF_RESTART* = 2
+  DRV_CANCEL* = DRVCNF_CANCEL
+  DRV_OK* = DRVCNF_OK
+  DRV_RESTART* = DRVCNF_RESTART
+  DRV_MCI_FIRST* = DRV_RESERVED
+  DRV_MCI_LAST* = (DRV_RESERVED + 0x00000FFF)
+
+type
+  PDRVCALLBACK* = proc (hdrvr: tHandle, uMsg: UINT, dwUser, dw1, dw2: DWORD){.
+      stdcall.}
+
+proc sndPlaySoundA*(Name: LPCSTR, flags: UINT): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "sndPlaySoundA".}
+proc sndPlaySoundW*(Name: LPCWSTR, flags: UINT): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "sndPlaySoundW".}
+when defined(winUNICODE):
+  proc sndPlaySound*(Name: cstring, flags: UINT): BOOL{.stdcall,
+      dynlib: "winmm.dll", importc: "sndPlaySoundW".}
+else:
+  proc sndPlaySound*(Name: cstring, flags: UINT): BOOL{.stdcall,
+      dynlib: "winmm.dll", importc: "sndPlaySoundA".}
+const
+  SND_NODEFAULT* = 2
+  SND_MEMORY* = 4
+  SND_LOOP* = 8
+  SND_NOSTOP* = 16
+  SND_SYNC* = 0
+  SND_ASYNC* = 1
+  SND_PURGE* = 64
+  SND_APPLICATION* = 128
+  SND_ALIAS_START* = 0
+  SND_ALIAS_SYSTEMHAND* = 18515
+  SND_ALIAS_SYSTEMEXCLAMATION* = 8531
+  SND_ALIAS_SYSTEMASTERISK* = 10835
+  SND_ALIAS_SYSTEMQUESTION* = 16211
+  SND_ALIAS_SYSTEMDEFAULT* = 17491
+  SND_ALIAS_SYSTEMEXIT* = 17747
+  SND_ALIAS_SYSTEMSTART* = 21331
+  SND_ALIAS_SYSTEMWELCOME* = 22355
+  SND_NOWAIT* = 0x00002000
+  SND_ALIAS* = 0x00010000
+  SND_ALIAS_ID* = 0x00110000
+  SND_FILENAME* = 0x00020000
+  SND_RESOURCE* = 0x00040004
+  WAVERR_BADFORMAT* = (WAVERR_BASE + 0)
+  WAVERR_STILLPLAYING* = (WAVERR_BASE + 1)
+  WAVERR_UNPREPARED* = (WAVERR_BASE + 2)
+  WAVERR_SYNC* = (WAVERR_BASE + 3)
+  WAVERR_LASTERROR* = (WAVERR_BASE + 3)
+  WOM_OPEN* = MM_WOM_OPEN
+  WOM_CLOSE* = MM_WOM_CLOSE
+  WOM_DONE* = MM_WOM_DONE
+  WIM_OPEN* = MM_WIM_OPEN
+  WIM_CLOSE* = MM_WIM_CLOSE
+  WIM_DATA* = MM_WIM_DATA
+  WAVE_MAPPER* = UINT(- 1)
+  WAVE_FORMAT_QUERY* = 1
+  WAVE_ALLOWSYNC* = 2
+  WAVE_MAPPED* = 4
+  WAVE_FORMAT_DIRECT* = 8
+  WAVE_FORMAT_DIRECT_QUERY* = (WAVE_FORMAT_QUERY Or WAVE_FORMAT_DIRECT)
+  MIM_OPEN* = MM_MIM_OPEN
+  MIM_CLOSE* = MM_MIM_CLOSE
+  MIM_DATA* = MM_MIM_DATA
+  MIM_LONGDATA* = MM_MIM_LONGDATA
+  MIM_ERROR* = MM_MIM_ERROR
+  MIM_LONGERROR* = MM_MIM_LONGERROR
+  MOM_OPEN* = MM_MOM_OPEN
+  MOM_CLOSE* = MM_MOM_CLOSE
+  MOM_DONE* = MM_MOM_DONE
+  MIM_MOREDATA* = MM_MIM_MOREDATA
+  MOM_POSITIONCB* = MM_MOM_POSITIONCB
+  MIDIMAPPER* = UINT(- 1)
+  MIDI_IO_STATUS* = 32
+  MIDI_CACHE_ALL* = 1
+  MIDI_CACHE_BESTFIT* = 2
+  MIDI_CACHE_QUERY* = 3
+  MIDI_UNCACHE* = 4
+  WHDR_DONE* = 1
+  WHDR_PREPARED* = 2
+  WHDR_BEGINLOOP* = 0x00000004
+  WHDR_ENDLOOP* = 0x00000008
+  WHDR_INQUEUE* = 0x00000010
+  MOD_MIDIPORT* = 1
+  MOD_SYNTH* = 2
+  MOD_SQSYNTH* = 3
+  MOD_FMSYNTH* = 4
+  MOD_MAPPER* = 5
+  MIDICAPS_VOLUME* = 1
+  MIDICAPS_LRVOLUME* = 2
+  MIDICAPS_CACHE* = 4
+  MIDICAPS_STREAM* = 8
+  MHDR_DONE* = 1
+  MHDR_PREPARED* = 2
+  MHDR_INQUEUE* = 0x00000004
+  MHDR_ISSTRM* = 0x00000008
+  MEVT_F_SHORT* = 0
+  MEVT_F_LONG* = 0x80000000
+  MEVT_F_CALLBACK* = 0x40000000
+
+proc MEVT_EVENTTYPE*(x: int8): int8
+proc MEVT_EVENTPARM*(x: DWORD): DWORD
+const
+  MEVT_SHORTMSG* = 0
+  MEVT_TEMPO* = 0x00000001
+  MEVT_NOP* = 0x00000002
+  MEVT_LONGMSG* = 0x00000080
+  MEVT_COMMENT* = 0x00000082
+  MEVT_VERSION* = 0x00000084
+  MIDISTRM_ERROR* = - 2
+  MIDIPROP_SET* = 0x80000000
+  MIDIPROP_GET* = 0x40000000
+  MIDIPROP_TIMEDIV* = 1
+  MIDIPROP_TEMPO* = 2
+  MIXERLINE_LINEF_ACTIVE* = 1
+  MIXERLINE_LINEF_DISCONNECTED* = 0x00008000
+  MIXERLINE_LINEF_SOURCE* = 0x80000000
+  MIXERLINE_COMPONENTTYPE_DST_FIRST* = 0
+  MIXERLINE_COMPONENTTYPE_DST_UNDEFINED* = (MIXERLINE_COMPONENTTYPE_DST_FIRST)
+  MIXERLINE_COMPONENTTYPE_DST_DIGITAL* = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
+  MIXERLINE_COMPONENTTYPE_DST_LINE* = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
+  MIXERLINE_COMPONENTTYPE_DST_MONITOR* = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
+  MIXERLINE_COMPONENTTYPE_DST_SPEAKERS* = (MIXERLINE_COMPONENTTYPE_DST_FIRST +
+      4)
+  MIXERLINE_COMPONENTTYPE_DST_HEADPHONES* = (
+    MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
+  MIXERLINE_COMPONENTTYPE_DST_TELEPHONE* = (
+    MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
+  MIXERLINE_COMPONENTTYPE_DST_WAVEIN* = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
+  MIXERLINE_COMPONENTTYPE_DST_VOICEIN* = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
+  MIXERLINE_COMPONENTTYPE_DST_LAST* = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
+  MIXERLINE_COMPONENTTYPE_SRC_FIRST* = 0x00001000
+  MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED* = (
+    MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
+  MIXERLINE_COMPONENTTYPE_SRC_DIGITAL* = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
+  MIXERLINE_COMPONENTTYPE_SRC_LINE* = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
+  MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE* = (
+    MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
+  MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER* = (
+    MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
+  MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC* = (
+    MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
+  MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE* = (
+    MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
+  MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER* = (
+    MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
+  MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT* = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
+  MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY* = (
+    MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
+  MIXERLINE_COMPONENTTYPE_SRC_ANALOG* = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
+  MIXERLINE_COMPONENTTYPE_SRC_LAST* = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
+  MIXERLINE_TARGETTYPE_UNDEFINED* = 0
+  MIXERLINE_TARGETTYPE_WAVEOUT* = 1
+  MIXERLINE_TARGETTYPE_WAVEIN* = 2
+  MIXERLINE_TARGETTYPE_MIDIOUT* = 3
+  MIXERLINE_TARGETTYPE_MIDIIN* = 4
+  MIXERLINE_TARGETTYPE_AUX* = 5
+  MIDIERR_UNPREPARED* = (MIDIERR_BASE + 0)
+  MIDIERR_STILLPLAYING* = (MIDIERR_BASE + 1)
+  MIDIERR_NOMAP* = (MIDIERR_BASE + 2)
+  MIDIERR_NOTREADY* = (MIDIERR_BASE + 3)
+  MIDIERR_NODEVICE* = (MIDIERR_BASE + 4)
+  MIDIERR_INVALIDSETUP* = (MIDIERR_BASE + 5)
+  MIDIERR_BADOPENMODE* = (MIDIERR_BASE + 6)
+  MIDIERR_DONT_CONTINUE* = (MIDIERR_BASE + 7)
+  MIDIERR_LASTERROR* = (MIDIERR_BASE + 7)
+  MIXERCONTROL_CONTROLF_UNIFORM* = 1
+  MIXERCONTROL_CONTROLF_MULTIPLE* = 2
+  MIXERCONTROL_CONTROLF_DISABLED* = 0x80000000
+  MIXERCONTROL_CT_CLASS_MASK* = 0xF0000000
+  MIXERCONTROL_CT_CLASS_CUSTOM* = 0
+  MIXERCONTROL_CT_CLASS_METER* = 0x10000000
+  MIXERCONTROL_CT_CLASS_SWITCH* = 0x20000000
+  MIXERCONTROL_CT_CLASS_NUMBER* = 0x30000000
+  MIXERCONTROL_CT_CLASS_SLIDER* = 0x40000000
+  MIXERCONTROL_CT_CLASS_FADER* = 0x50000000
+  MIXERCONTROL_CT_CLASS_TIME* = 0x60000000
+  MIXERCONTROL_CT_CLASS_LIST* = 0x70000000
+  MIXERCONTROL_CT_SUBCLASS_MASK* = 0x0F000000
+  MIXERCONTROL_CT_SC_SWITCH_BOOLEAN* = 0
+  MIXERCONTROL_CT_SC_SWITCH_BUTTON* = 0x01000000
+  MIXERCONTROL_CT_SC_METER_POLLED* = 0
+  MIXERCONTROL_CT_SC_TIME_MICROSECS* = 0
+  MIXERCONTROL_CT_SC_TIME_MILLISECS* = 0x01000000
+  MIXERCONTROL_CT_SC_LIST_SINGLE* = 0
+  MIXERCONTROL_CT_SC_LIST_MULTIPLE* = 0x01000000
+  MIXERCONTROL_CT_UNITS_MASK* = 0x00FF0000
+  MIXERCONTROL_CT_UNITS_CUSTOM* = 0
+  MIXERCONTROL_CT_UNITS_BOOLEAN* = 0x00010000
+  MIXERCONTROL_CT_UNITS_SIGNED* = 0x00020000
+  MIXERCONTROL_CT_UNITS_UNSIGNED* = 0x00030000
+  MIXERCONTROL_CT_UNITS_DECIBELS* = 0x00040000
+  MIXERCONTROL_CT_UNITS_PERCENT* = 0x00050000
+  MIXERCONTROL_CONTROLTYPE_CUSTOM* = (
+    MIXERCONTROL_CT_CLASS_CUSTOM Or MIXERCONTROL_CT_UNITS_CUSTOM)
+  MIXERCONTROL_CONTROLTYPE_BOOLEANMETER* = (MIXERCONTROL_CT_CLASS_METER Or
+      MIXERCONTROL_CT_SC_METER_POLLED Or MIXERCONTROL_CT_UNITS_BOOLEAN)
+  MIXERCONTROL_CONTROLTYPE_SIGNEDMETER* = (MIXERCONTROL_CT_CLASS_METER Or
+      MIXERCONTROL_CT_SC_METER_POLLED Or MIXERCONTROL_CT_UNITS_SIGNED)
+  MIXERCONTROL_CONTROLTYPE_PEAKMETER* = (
+    MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
+  MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER* = (MIXERCONTROL_CT_CLASS_METER Or
+      MIXERCONTROL_CT_SC_METER_POLLED Or MIXERCONTROL_CT_UNITS_UNSIGNED)
+  MIXERCONTROL_CONTROLTYPE_BOOLEAN* = (MIXERCONTROL_CT_CLASS_SWITCH Or
+      MIXERCONTROL_CT_SC_SWITCH_BOOLEAN Or MIXERCONTROL_CT_UNITS_BOOLEAN)
+  MIXERCONTROL_CONTROLTYPE_ONOFF* = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
+  MIXERCONTROL_CONTROLTYPE_MUTE* = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
+  MIXERCONTROL_CONTROLTYPE_MONO* = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
+  MIXERCONTROL_CONTROLTYPE_LOUDNESS* = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
+  MIXERCONTROL_CONTROLTYPE_STEREOENH* = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
+  MIXERCONTROL_CONTROLTYPE_BUTTON* = (MIXERCONTROL_CT_CLASS_SWITCH Or
+      MIXERCONTROL_CT_SC_SWITCH_BUTTON Or MIXERCONTROL_CT_UNITS_BOOLEAN)
+  MIXERCONTROL_CONTROLTYPE_DECIBELS* = (
+    MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_DECIBELS)
+  MIXERCONTROL_CONTROLTYPE_SIGNED* = (
+    MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_SIGNED)
+  MIXERCONTROL_CONTROLTYPE_UNSIGNED* = (
+    MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_UNSIGNED)
+  MIXERCONTROL_CONTROLTYPE_PERCENT* = (
+    MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_PERCENT)
+  MIXERCONTROL_CONTROLTYPE_SLIDER* = (
+    MIXERCONTROL_CT_CLASS_SLIDER Or MIXERCONTROL_CT_UNITS_SIGNED)
+  MIXERCONTROL_CONTROLTYPE_PAN* = (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
+  MIXERCONTROL_CONTROLTYPE_QSOUNDPAN* = (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
+  MIXERCONTROL_CONTROLTYPE_FADER* = (
+    MIXERCONTROL_CT_CLASS_FADER Or MIXERCONTROL_CT_UNITS_UNSIGNED)
+  MIXERCONTROL_CONTROLTYPE_VOLUME* = (MIXERCONTROL_CONTROLTYPE_FADER + 1)
+  MIXERCONTROL_CONTROLTYPE_BASS* = (MIXERCONTROL_CONTROLTYPE_FADER + 2)
+  MIXERCONTROL_CONTROLTYPE_TREBLE* = (MIXERCONTROL_CONTROLTYPE_FADER + 3)
+  MIXERCONTROL_CONTROLTYPE_EQUALIZER* = (MIXERCONTROL_CONTROLTYPE_FADER + 4)
+  MIXERCONTROL_CONTROLTYPE_SINGLESELECT* = (MIXERCONTROL_CT_CLASS_LIST Or
+      MIXERCONTROL_CT_SC_LIST_SINGLE Or MIXERCONTROL_CT_UNITS_BOOLEAN)
+  MIXERCONTROL_CONTROLTYPE_MUX* = (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
+  MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT* = (MIXERCONTROL_CT_CLASS_LIST Or
+      MIXERCONTROL_CT_SC_LIST_MULTIPLE Or MIXERCONTROL_CT_UNITS_BOOLEAN)
+  MIXERCONTROL_CONTROLTYPE_MIXER* = (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT +
+      1)
+  MIXERCONTROL_CONTROLTYPE_MICROTIME* = (MIXERCONTROL_CT_CLASS_TIME Or
+      MIXERCONTROL_CT_SC_TIME_MICROSECS Or MIXERCONTROL_CT_UNITS_UNSIGNED)
+  MIXERCONTROL_CONTROLTYPE_MILLITIME* = (MIXERCONTROL_CT_CLASS_TIME Or
+      MIXERCONTROL_CT_SC_TIME_MILLISECS Or MIXERCONTROL_CT_UNITS_UNSIGNED)
+  MIXER_SHORT_NAME_CHARS* = 16
+  MIXER_LONG_NAME_CHARS* = 64
+  MIXERR_INVALLINE* = (MIXERR_BASE + 0)
+  MIXERR_INVALCONTROL* = (MIXERR_BASE + 1)
+  MIXERR_INVALVALUE* = (MIXERR_BASE + 2)
+  MIXERR_LASTERROR* = (MIXERR_BASE + 2)
+  MIXER_OBJECTF_HANDLE* = 0x80000000
+  MIXER_OBJECTF_MIXER* = 0
+  MIXER_OBJECTF_HMIXER* = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_MIXER)
+  MIXER_OBJECTF_WAVEOUT* = 0x10000000
+  MIXER_OBJECTF_HWAVEOUT* = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_WAVEOUT)
+  MIXER_OBJECTF_WAVEIN* = 0x20000000
+  MIXER_OBJECTF_HWAVEIN* = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_WAVEIN)
+  MIXER_OBJECTF_MIDIOUT* = 0x30000000
+  MIXER_OBJECTF_HMIDIOUT* = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_MIDIOUT)
+  MIXER_OBJECTF_MIDIIN* = 0x40000000
+  MIXER_OBJECTF_HMIDIIN* = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_MIDIIN)
+  MIXER_OBJECTF_AUX* = 0x50000000
+  MIXER_GETCONTROLDETAILSF_VALUE* = 0
+  MIXER_GETCONTROLDETAILSF_LISTTEXT* = 1
+  MIXER_GETCONTROLDETAILSF_QUERYMASK* = 0x0000000F
+  MIXER_SETCONTROLDETAILSF_VALUE* = 0
+  MIXER_SETCONTROLDETAILSF_CUSTOM* = 1
+  MIXER_SETCONTROLDETAILSF_QUERYMASK* = 0x0000000F
+  JOYERR_NOERROR* = (0)
+  JOYERR_PARMS* = (JOYERR_BASE + 5)
+  JOYERR_NOCANDO* = (JOYERR_BASE + 6)
+  JOYERR_UNPLUGGED* = (JOYERR_BASE + 7)
+  JOY_BUTTON1* = 1
+  JOY_BUTTON2* = 2
+  JOY_BUTTON3* = 4
+  JOY_BUTTON4* = 8
+  JOY_BUTTON1CHG* = 256
+  JOY_BUTTON2CHG* = 512
+  JOY_BUTTON3CHG* = 0x00000400
+  JOY_BUTTON4CHG* = 0x00000800
+  JOY_BUTTON5* = 16
+  JOY_BUTTON6* = 32
+  JOY_BUTTON7* = 64
+  JOY_BUTTON8* = 128
+  JOY_BUTTON9* = 256
+  JOY_BUTTON10* = 512
+  JOY_BUTTON11* = 0x00000400
+  JOY_BUTTON12* = 0x00000800
+  JOY_BUTTON13* = 0x00001000
+  JOY_BUTTON14* = 0x00002000
+  JOY_BUTTON15* = 0x00004000
+  JOY_BUTTON16* = 0x00008000
+  JOY_BUTTON17* = 0x00010000
+  JOY_BUTTON18* = 0x00020000
+  JOY_BUTTON19* = 0x00040000
+  JOY_BUTTON20* = 0x00080000
+  JOY_BUTTON21* = 0x00100000
+  JOY_BUTTON22* = 0x00200000
+  JOY_BUTTON23* = 0x00400000
+  JOY_BUTTON24* = 0x00800000
+  JOY_BUTTON25* = 0x01000000
+  JOY_BUTTON26* = 0x02000000
+  JOY_BUTTON27* = 0x04000000
+  JOY_BUTTON28* = 0x08000000
+  JOY_BUTTON29* = 0x10000000
+  JOY_BUTTON30* = 0x20000000
+  JOY_BUTTON31* = 0x40000000
+  JOY_BUTTON32* = 0x80000000
+  JOY_POVCENTERED* = - 1
+  JOY_POVFORWARD* = 0
+  JOY_POVRIGHT* = 9000
+  JOY_POVBACKWARD* = 18000
+  JOY_POVLEFT* = 27000
+  JOY_RETURNX* = 1
+  JOY_RETURNY* = 2
+  JOY_RETURNZ* = 4
+  JOY_RETURNR* = 8
+  JOY_RETURNU* = 16
+  JOY_RETURNV* = 32
+  JOY_RETURNPOV* = 64
+  JOY_RETURNBUTTONS* = 128
+  JOY_RETURNRAWDATA* = 256
+  JOY_RETURNPOVCTS* = 512
+  JOY_RETURNCENTERED* = 0x00000400
+  JOY_USEDEADZONE* = 0x00000800
+  JOY_RETURNALL* = (JOY_RETURNX Or JOY_RETURNY Or JOY_RETURNZ Or JOY_RETURNR Or
+      JOY_RETURNU Or JOY_RETURNV Or JOY_RETURNPOV Or JOY_RETURNBUTTONS)
+  JOY_CAL_READALWAYS* = 0x00010000
+  JOY_CAL_READXYONLY* = 0x00020000
+  JOY_CAL_READ3* = 0x00040000
+  JOY_CAL_READ4* = 0x00080000
+  JOY_CAL_READXONLY* = 0x00100000
+  JOY_CAL_READYONLY* = 0x00200000
+  JOY_CAL_READ5* = 0x00400000
+  JOY_CAL_READ6* = 0x00800000
+  JOY_CAL_READZONLY* = 0x01000000
+  JOY_CAL_READRONLY* = 0x02000000
+  JOY_CAL_READUONLY* = 0x04000000
+  JOY_CAL_READVONLY* = 0x08000000
+  JOYSTICKID1* = 0
+  JOYSTICKID2* = 1
+  JOYCAPS_HASZ* = 1
+  JOYCAPS_HASR* = 2
+  JOYCAPS_HASU* = 4
+  JOYCAPS_HASV* = 8
+  JOYCAPS_HASPOV* = 16
+  JOYCAPS_POV4DIR* = 32
+  JOYCAPS_POVCTS* = 64
+  MMIOERR_BASE* = 256
+  MMIOERR_FILENOTFOUND* = (MMIOERR_BASE + 1)
+  MMIOERR_OUTOFMEMORY* = (MMIOERR_BASE + 2)
+  MMIOERR_CANNOTOPEN* = (MMIOERR_BASE + 3)
+  MMIOERR_CANNOTCLOSE* = (MMIOERR_BASE + 4)
+  MMIOERR_CANNOTREAD* = (MMIOERR_BASE + 5)
+  MMIOERR_CANNOTWRITE* = (MMIOERR_BASE + 6)
+  MMIOERR_CANNOTSEEK* = (MMIOERR_BASE + 7)
+  MMIOERR_CANNOTEXPAND* = (MMIOERR_BASE + 8)
+  MMIOERR_CHUNKNOTFOUND* = (MMIOERR_BASE + 9)
+  MMIOERR_UNBUFFERED* = (MMIOERR_BASE + 10)
+  MMIOERR_PATHNOTFOUND* = (MMIOERR_BASE + 11)
+  MMIOERR_ACCESSDENIED* = (MMIOERR_BASE + 12)
+  MMIOERR_SHARINGVIOLATION* = (MMIOERR_BASE + 13)
+  MMIOERR_NETWORKERROR* = (MMIOERR_BASE + 14)
+  MMIOERR_TOOMANYOPENFILES* = (MMIOERR_BASE + 15)
+  MMIOERR_INVALIDFILE* = (MMIOERR_BASE + 16)
+  CFSEPCHAR* = '+'
+  WAVECAPS_PITCH* = 1
+  WAVECAPS_PLAYBACKRATE* = 2
+  WAVECAPS_VOLUME* = 4
+  WAVECAPS_LRVOLUME* = 8
+  WAVECAPS_SYNC* = 16
+  WAVECAPS_SAMPLEACCURATE* = 32
+  WAVECAPS_DIRECTSOUND* = 64
+  MIXER_GETLINEINFOF_DESTINATION* = 0
+  MIXER_GETLINEINFOF_SOURCE* = 1
+  MIXER_GETLINEINFOF_LINEID* = 2
+  MIXER_GETLINEINFOF_COMPONENTTYPE* = 3
+  MIXER_GETLINEINFOF_TARGETTYPE* = 4
+  MIXER_GETLINEINFOF_QUERYMASK* = 0x0000000F
+  MMIO_RWMODE* = 3
+  MMIO_SHAREMODE* = 0x00000070
+  MMIO_CREATE* = 0x00001000
+  MMIO_PARSE* = 256
+  MMIO_DELETE* = 512
+  MMIO_EXIST* = 0x00004000
+  MMIO_ALLOCBUF* = 0x00010000
+  MMIO_GETTEMP* = 0x00020000
+  MMIO_DIRTY* = 0x10000000
+  cMMIO_READ* = 0
+  cMMIO_WRITE* = 1
+  MMIO_READWRITE* = 2
+  MMIO_COMPAT* = 0
+  MMIO_EXCLUSIVE* = 16
+  MMIO_DENYWRITE* = 32
+  MMIO_DENYREAD* = 0x00000030
+  MMIO_DENYNONE* = 64
+  MMIO_FHOPEN* = 16
+  MMIO_EMPTYBUF* = 16
+  MMIO_TOUPPER* = 16
+  MMIO_INSTALLPROC* = 0x00010000
+  MMIO_GLOBALPROC* = 0x10000000
+  MMIO_REMOVEPROC* = 0x00020000
+  MMIO_UNICODEPROC* = 0x01000000
+  MMIO_FINDPROC* = 0x00040000
+  MMIO_FINDCHUNK* = 16
+  MMIO_FINDRIFF* = 32
+  MMIO_FINDLIST* = 64
+  MMIO_CREATERIFF* = 32
+  MMIO_CREATELIST* = 64
+  MMIOM_READ* = cMMIO_READ
+  MMIOM_WRITE* = cMMIO_WRITE
+  MMIOM_SEEK* = 2
+  MMIOM_OPEN* = 3
+  MMIOM_CLOSE* = 4
+  MMIOM_WRITEFLUSH* = 5
+  MMIOM_RENAME* = 6
+  MMIOM_USER* = 0x00008000
+  FOURCC_RIFF* = 0x46464952   #'R','I','F','F'
+  FOURCC_LIST* = 0x5453494C   #'L','I','S','T'
+  FOURCC_DOS* = 0x20532F44    #'D','O','S',' '
+  FOURCC_MEM* = 0x204D454D    #'M','E','M',' '
+  SEEK_SET* = 0
+  SEEK_CUR* = 1
+  SEEK_END* = 2
+  MMIO_DEFAULTBUFFER* = 8192
+  MCIERR_INVALID_DEVICE_ID* = (MCIERR_BASE + 1)
+  MCIERR_UNRECOGNIZED_KEYWORD* = (MCIERR_BASE + 3)
+  MCIERR_UNRECOGNIZED_COMMAND* = (MCIERR_BASE + 5)
+  MCIERR_HARDWARE* = (MCIERR_BASE + 6)
+  MCIERR_INVALID_DEVICE_NAME* = (MCIERR_BASE + 7)
+  MCIERR_OUT_OF_MEMORY* = (MCIERR_BASE + 8)
+  MCIERR_DEVICE_OPEN* = (MCIERR_BASE + 9)
+  MCIERR_CANNOT_LOAD_DRIVER* = (MCIERR_BASE + 10)
+  MCIERR_MISSING_COMMAND_STRING* = (MCIERR_BASE + 11)
+  MCIERR_PARAM_OVERFLOW* = (MCIERR_BASE + 12)
+  MCIERR_MISSING_STRING_ARGUMENT* = (MCIERR_BASE + 13)
+  MCIERR_BAD_INTEGER* = (MCIERR_BASE + 14)
+  MCIERR_PARSER_INTERNAL* = (MCIERR_BASE + 15)
+  MCIERR_DRIVER_INTERNAL* = (MCIERR_BASE + 16)
+  MCIERR_MISSING_PARAMETER* = (MCIERR_BASE + 17)
+  MCIERR_UNSUPPORTED_FUNCTION* = (MCIERR_BASE + 18)
+  MCIERR_FILE_NOT_FOUND* = (MCIERR_BASE + 19)
+  MCIERR_DEVICE_NOT_READY* = (MCIERR_BASE + 20)
+  MCIERR_INTERNAL* = (MCIERR_BASE + 21)
+  MCIERR_DRIVER* = (MCIERR_BASE + 22)
+  MCIERR_CANNOT_USE_ALL* = (MCIERR_BASE + 23)
+  MCIERR_MULTIPLE* = (MCIERR_BASE + 24)
+  MCIERR_EXTENSION_NOT_FOUND* = (MCIERR_BASE + 25)
+  MCIERR_OUTOFRANGE* = (MCIERR_BASE + 26)
+  MCIERR_FLAGS_NOT_COMPATIBLE* = (MCIERR_BASE + 28)
+  MCIERR_FILE_NOT_SAVED* = (MCIERR_BASE + 30)
+  MCIERR_DEVICE_TYPE_REQUIRED* = (MCIERR_BASE + 31)
+  MCIERR_DEVICE_LOCKED* = (MCIERR_BASE + 32)
+  MCIERR_DUPLICATE_ALIAS* = (MCIERR_BASE + 33)
+  MCIERR_BAD_CONSTANT* = (MCIERR_BASE + 34)
+  MCIERR_MUST_USE_SHAREABLE* = (MCIERR_BASE + 35)
+  MCIERR_MISSING_DEVICE_NAME* = (MCIERR_BASE + 36)
+  MCIERR_BAD_TIME_FORMAT* = (MCIERR_BASE + 37)
+  MCIERR_NO_CLOSING_QUOTE* = (MCIERR_BASE + 38)
+  MCIERR_DUPLICATE_FLAGS* = (MCIERR_BASE + 39)
+  MCIERR_INVALID_FILE* = (MCIERR_BASE + 40)
+  MCIERR_NULL_PARAMETER_BLOCK* = (MCIERR_BASE + 41)
+  MCIERR_UNNAMED_RESOURCE* = (MCIERR_BASE + 42)
+  MCIERR_NEW_REQUIRES_ALIAS* = (MCIERR_BASE + 43)
+  MCIERR_NOTIFY_ON_AUTO_OPEN* = (MCIERR_BASE + 44)
+  MCIERR_NO_ELEMENT_ALLOWED* = (MCIERR_BASE + 45)
+  MCIERR_NONAPPLICABLE_FUNCTION* = (MCIERR_BASE + 46)
+  MCIERR_ILLEGAL_FOR_AUTO_OPEN* = (MCIERR_BASE + 47)
+  MCIERR_FILENAME_REQUIRED* = (MCIERR_BASE + 48)
+  MCIERR_EXTRA_CHARACTERS* = (MCIERR_BASE + 49)
+  MCIERR_DEVICE_NOT_INSTALLED* = (MCIERR_BASE + 50)
+  MCIERR_GET_CD* = (MCIERR_BASE + 51)
+  MCIERR_SET_CD* = (MCIERR_BASE + 52)
+  MCIERR_SET_DRIVE* = (MCIERR_BASE + 53)
+  MCIERR_DEVICE_LENGTH* = (MCIERR_BASE + 54)
+  MCIERR_DEVICE_ORD_LENGTH* = (MCIERR_BASE + 55)
+  MCIERR_NO_INTEGER* = (MCIERR_BASE + 56)
+  MCIERR_WAVE_OUTPUTSINUSE* = (MCIERR_BASE + 64)
+  MCIERR_WAVE_SETOUTPUTINUSE* = (MCIERR_BASE + 65)
+  MCIERR_WAVE_INPUTSINUSE* = (MCIERR_BASE + 66)
+  MCIERR_WAVE_SETINPUTINUSE* = (MCIERR_BASE + 67)
+  MCIERR_WAVE_OUTPUTUNSPECIFIED* = (MCIERR_BASE + 68)
+  MCIERR_WAVE_INPUTUNSPECIFIED* = (MCIERR_BASE + 69)
+  MCIERR_WAVE_OUTPUTSUNSUITABLE* = (MCIERR_BASE + 70)
+  MCIERR_WAVE_SETOUTPUTUNSUITABLE* = (MCIERR_BASE + 71)
+  MCIERR_WAVE_INPUTSUNSUITABLE* = (MCIERR_BASE + 72)
+  MCIERR_WAVE_SETINPUTUNSUITABLE* = (MCIERR_BASE + 73)
+  MCIERR_SEQ_DIV_INCOMPATIBLE* = (MCIERR_BASE + 80)
+  MCIERR_SEQ_PORT_INUSE* = (MCIERR_BASE + 81)
+  MCIERR_SEQ_PORT_NONEXISTENT* = (MCIERR_BASE + 82)
+  MCIERR_SEQ_PORT_MAPNODEVICE* = (MCIERR_BASE + 83)
+  MCIERR_SEQ_PORT_MISCERROR* = (MCIERR_BASE + 84)
+  MCIERR_SEQ_TIMER* = (MCIERR_BASE + 85)
+  MCIERR_SEQ_PORTUNSPECIFIED* = (MCIERR_BASE + 86)
+  MCIERR_SEQ_NOMIDIPRESENT* = (MCIERR_BASE + 87)
+  MCIERR_NO_WINDOW* = (MCIERR_BASE + 90)
+  MCIERR_CREATEWINDOW* = (MCIERR_BASE + 91)
+  MCIERR_FILE_READ* = (MCIERR_BASE + 92)
+  MCIERR_FILE_WRITE* = (MCIERR_BASE + 93)
+  MCIERR_NO_IDENTITY* = (MCIERR_BASE + 94)
+  MCIERR_CUSTOM_DRIVER_BASE* = (MCIERR_BASE + 256)
+  MCI_FIRST* = DRV_MCI_FIRST
+  MCI_ESCAPE* = 0x00000805
+  MCI_PLAY* = 0x00000806
+  MCI_SEEK* = 0x00000807
+  MCI_STOP* = 0x00000808
+  MCI_PAUSE* = 0x00000809
+  MCI_INFO* = 0x0000080A
+  MCI_GETDEVCAPS* = 0x0000080B
+  MCI_BREAK* = 0x00000811
+  MCI_WHERE* = 0x00000843
+  MCI_FREEZE* = 0x00000844
+  MCI_UNFREEZE* = 0x00000845
+  MCI_LOAD* = 0x00000850
+  MCI_CUT* = 0x00000851
+  MCI_COPY* = 0x00000852
+  MCI_PASTE* = 0x00000853
+  MCI_UPDATE* = 0x00000854
+  MCI_RESUME* = 0x00000855
+  MCI_DELETE* = 0x00000856
+  MCI_SET* = 0x0000080D
+  MCI_STEP* = 0x0000080E
+  MCI_SAVE* = 0x00000813
+  MCI_SPIN* = 0x0000080C
+  MCI_STATUS* = 0x00000814
+  MCI_CUE* = 0x00000830
+  MCI_REALIZE* = 0x00000840
+  MCI_WINDOW* = 0x00000841
+  MCI_PUT* = 0x00000842
+  MCI_RECORD* = 0x0000080F
+  MCI_SYSINFO* = 0x00000810
+  MCI_OPEN* = 0x00000803
+  MCI_CLOSE* = 0x00000804
+  MCI_USER_MESSAGES* = (DRV_MCI_FIRST + 0x00000400)
+  MCI_LAST* = 0x00000FFF
+  MCI_ALL_DEVICE_ID* = - 1
+  MCI_DEVTYPE_VCR* = 513
+  MCI_DEVTYPE_VIDEODISC* = 514
+  MCI_DEVTYPE_OVERLAY* = 515
+  MCI_DEVTYPE_CD_AUDIO* = 516
+  MCI_DEVTYPE_DAT* = 517
+  MCI_DEVTYPE_SCANNER* = 518
+  MCI_DEVTYPE_ANIMATION* = 519
+  MCI_DEVTYPE_DIGITAL_VIDEO* = 520
+  MCI_DEVTYPE_OTHER* = 521
+  MCI_DEVTYPE_WAVEFORM_AUDIO* = 522
+  MCI_DEVTYPE_SEQUENCER* = 523
+  MCI_DEVTYPE_FIRST* = MCI_DEVTYPE_VCR
+  MCI_DEVTYPE_LAST* = MCI_DEVTYPE_SEQUENCER
+  MCI_DEVTYPE_FIRST_USER* = 0x00001000
+  MCI_MODE_NOT_READY* = (MCI_STRING_OFFSET + 12)
+  MCI_MODE_STOP* = (MCI_STRING_OFFSET + 13)
+  MCI_MODE_PLAY* = (MCI_STRING_OFFSET + 14)
+  MCI_MODE_RECORD* = (MCI_STRING_OFFSET + 15)
+  MCI_MODE_SEEK* = (MCI_STRING_OFFSET + 16)
+  MCI_MODE_PAUSE* = (MCI_STRING_OFFSET + 17)
+  MCI_MODE_OPEN* = (MCI_STRING_OFFSET + 18)
+  MCI_FORMAT_MILLISECONDS* = 0
+  MCI_FORMAT_HMS* = 1
+  MCI_FORMAT_MSF* = 2
+  MCI_FORMAT_FRAMES* = 3
+  MCI_FORMAT_SMPTE_24* = 4
+  MCI_FORMAT_SMPTE_25* = 5
+  MCI_FORMAT_SMPTE_30* = 6
+  MCI_FORMAT_SMPTE_30DROP* = 7
+  MCI_FORMAT_BYTES* = 8
+  MCI_FORMAT_SAMPLES* = 9
+  MCI_FORMAT_TMSF* = 10
+
+proc MCI_MSF_MINUTE*(msf: int32): int8
+proc MCI_MSF_SECOND*(msf: int32): int8
+proc MCI_MSF_FRAME*(msf: int32): int8
+proc MCI_MAKE_MSF*(m, s, f: int8): int32
+const
+  MCI_SET_DOOR_OPEN* = 256
+  MCI_SET_DOOR_CLOSED* = 512
+  MCI_SET_TIME_FORMAT* = 0x00000400
+  MCI_SET_AUDIO* = 0x00000800
+  MCI_SET_VIDEO* = 0x00001000
+  MCI_SET_ON* = 0x00002000
+  MCI_SET_OFF* = 0x00004000
+  MCI_SET_AUDIO_ALL* = 0
+  MCI_SET_AUDIO_LEFT* = 1
+  MCI_SET_AUDIO_RIGHT* = 2
+
+proc MCI_TMSF_TRACK*(tmsf: int32): int8
+proc MCI_TMSF_MINUTE*(tmsf: int32): int8
+proc MCI_TMSF_SECOND*(tmsf: int32): int8
+proc MCI_TMSF_FRAME*(tmsf: int32): int8
+proc MCI_HMS_HOUR*(h: int32): int8
+proc MCI_HMS_MINUTE*(h: int32): int8
+proc MCI_HMS_SECOND*(h: int32): int8
+proc MCI_MAKE_HMS*(h, m, s: int8): int32
+const
+  MCI_INFO_PRODUCT* = 256
+  MCI_INFO_FILE* = 512
+  MCI_INFO_MEDIA_UPC* = 0x00000400
+  MCI_INFO_MEDIA_IDENTITY* = 0x00000800
+  MCI_INFO_NAME* = 0x00001000
+  MCI_INFO_COPYRIGHT* = 0x00002000
+
+proc MCI_MAKE_TMSF*(t, m, s, f: int8): int32
+const
+  MCI_WAIT* = 2
+  MCI_FROM* = 4
+  MCI_TO* = 8
+  MCI_TRACK* = 16
+  MCI_SEEK_TO_START* = 256
+  MCI_SEEK_TO_END* = 512
+  MCI_STATUS_ITEM* = 256
+  MCI_STATUS_START* = 512
+  MCI_STATUS_LENGTH* = 1
+  MCI_STATUS_POSITION* = 2
+  MCI_STATUS_NUMBER_OF_TRACKS* = 3
+  MCI_STATUS_MODE* = 4
+  MCI_STATUS_MEDIA_PRESENT* = 5
+  MCI_STATUS_TIME_FORMAT* = 6
+  MCI_STATUS_READY* = 7
+  MCI_STATUS_CURRENT_TRACK* = 8
+  MCI_OPEN_SHAREABLE* = 256
+  MCI_OPEN_ELEMENT* = 512
+  MCI_OPEN_ALIAS* = 0x00000400
+  MCI_OPEN_ELEMENT_ID* = 0x00000800
+  MCI_OPEN_TYPE_ID* = 0x00001000
+  MCI_OPEN_TYPE* = 0x00002000
+  MCI_GETDEVCAPS_ITEM* = 256
+  MCI_GETDEVCAPS_CAN_RECORD* = 1
+  MCI_GETDEVCAPS_HAS_AUDIO* = 2
+  MCI_GETDEVCAPS_HAS_VIDEO* = 3
+  MCI_GETDEVCAPS_DEVICE_TYPE* = 4
+  MCI_GETDEVCAPS_USES_FILES* = 5
+  MCI_GETDEVCAPS_COMPOUND_DEVICE* = 6
+  MCI_GETDEVCAPS_CAN_EJECT* = 7
+  MCI_GETDEVCAPS_CAN_PLAY* = 8
+  MCI_GETDEVCAPS_CAN_SAVE* = 9
+  MCI_SYSINFO_QUANTITY* = 256
+  MCI_SYSINFO_OPEN* = 512
+  MCI_SYSINFO_NAME* = 0x00000400
+  MCI_SYSINFO_INSTALLNAME* = 0x00000800
+  MCI_NOTIFY_SUCCESSFUL* = 1
+  MCI_NOTIFY_SUPERSEDED* = 2
+  MCI_NOTIFY_ABORTED* = 4
+  MCI_NOTIFY_FAILURE* = 8
+  MCI_NOTIFY* = 1
+  MCI_BREAK_KEY* = 256
+  MCI_BREAK_HWND* = 512
+  MCI_BREAK_OFF* = 0x00000400
+  MCI_RECORD_INSERT* = 256
+  MCI_RECORD_OVERWRITE* = 512
+  MCI_SAVE_FILE* = 256
+  MCI_LOAD_FILE* = 256
+  MCI_VD_GETDEVCAPS_FAST_RATE* = 0x00004003
+  MCI_VD_GETDEVCAPS_SLOW_RATE* = 0x00004004
+  MCI_VD_GETDEVCAPS_NORMAL_RATE* = 0x00004005
+  MCI_VD_STEP_FRAMES* = 0x00010000
+  MCI_VD_STEP_REVERSE* = 0x00020000
+  MCI_VD_ESCAPE_STRING* = 256
+  MCI_VD_FORMAT_TRACK* = 0x00004001
+  MCI_VD_PLAY_REVERSE* = 0x00010000
+  MCI_VD_PLAY_FAST* = 0x00020000
+  MCI_VD_MODE_PARK* = (MCI_VD_OFFSET + 1)
+  MCI_VD_GETDEVCAPS_CAV* = 0x00020000
+  MCI_VD_SPIN_UP* = 0x00010000
+  MCI_VD_SPIN_DOWN* = 0x00020000
+  MCI_VD_SEEK_REVERSE* = 0x00010000
+  MCI_VD_STATUS_SPEED* = 0x00004002
+  MCI_VD_STATUS_FORWARD* = 0x00004003
+  MCI_VD_STATUS_MEDIA_TYPE* = 0x00004004
+  MCI_VD_STATUS_SIDE* = 0x00004005
+  MCI_VD_GETDEVCAPS_CAN_REVERSE* = 0x00004002
+  MCI_VD_MEDIA_CLV* = (MCI_VD_OFFSET + 2)
+  MCI_VD_MEDIA_CAV* = (MCI_VD_OFFSET + 3)
+  MCI_VD_MEDIA_OTHER* = (MCI_VD_OFFSET + 4)
+  MCI_VD_STATUS_DISC_SIZE* = 0x00004006
+  MCI_VD_GETDEVCAPS_CLV* = 0x00010000
+  MCI_VD_PLAY_SPEED* = 0x00040000
+  MCI_VD_PLAY_SCAN* = 0x00080000
+  MCI_VD_PLAY_SLOW* = 0x00100000
+  MCI_WAVE_STATUS_CHANNELS* = 0x00004002
+  MCI_WAVE_STATUS_SAMPLESPERSEC* = 0x00004003
+  MCI_WAVE_PCM* = MCI_WAVE_OFFSET
+  MCI_WAVE_MAPPER* = (MCI_WAVE_OFFSET + 1)
+  MCI_WAVE_OPEN_BUFFER* = 0x00010000
+  MCI_WAVE_STATUS_BITSPERSAMPLE* = 0x00004006
+  MCI_WAVE_STATUS_LEVEL* = 0x00004007
+  MCI_WAVE_SET_FORMATTAG* = 0x00010000
+  MCI_WAVE_SET_CHANNELS* = 0x00020000
+  MCI_WAVE_SET_SAMPLESPERSEC* = 0x00040000
+  MCI_WAVE_SET_AVGBYTESPERSEC* = 0x00080000
+  MCI_WAVE_SET_BLOCKALIGN* = 0x00100000
+  MCI_WAVE_SET_BITSPERSAMPLE* = 0x00200000
+  MCI_WAVE_INPUT* = 0x00400000
+  MCI_WAVE_OUTPUT* = 0x00800000
+  MCI_WAVE_STATUS_FORMATTAG* = 0x00004001
+  MCI_WAVE_SET_ANYINPUT* = 0x04000000
+  MCI_WAVE_SET_ANYOUTPUT* = 0x08000000
+  MCI_WAVE_GETDEVCAPS_INPUTS* = 0x00004001
+  MCI_WAVE_GETDEVCAPS_OUTPUTS* = 0x00004002
+  MCI_WAVE_STATUS_AVGBYTESPERSEC* = 0x00004004
+  MCI_WAVE_STATUS_BLOCKALIGN* = 0x00004005
+  MCI_CDA_STATUS_TYPE_TRACK* = 0x00004001
+  MCI_CDA_TRACK_AUDIO* = (MCI_CD_OFFSET)
+  MCI_CDA_TRACK_OTHER* = (MCI_CD_OFFSET + 1)
+  MCI_SEQ_DIV_PPQN* = (MCI_SEQ_OFFSET)
+  MCI_SEQ_DIV_SMPTE_24* = (MCI_SEQ_OFFSET + 1)
+  MCI_SEQ_DIV_SMPTE_25* = (MCI_SEQ_OFFSET + 2)
+  MCI_SEQ_DIV_SMPTE_30DROP* = (MCI_SEQ_OFFSET + 3)
+  MCI_SEQ_DIV_SMPTE_30* = (MCI_SEQ_OFFSET + 4)
+  MCI_SEQ_FORMAT_SONGPTR* = 0x00004001
+  MCI_SEQ_FILE* = 0x00004002
+  MCI_SEQ_MIDI* = 0x00004003
+  MCI_SEQ_SMPTE* = 0x00004004
+  MCI_SEQ_NONE* = 65533
+  MCI_SEQ_MAPPER* = 65535
+  MCI_SEQ_STATUS_TEMPO* = 0x00004002
+  MCI_SEQ_STATUS_PORT* = 0x00004003
+  MCI_SEQ_STATUS_SLAVE* = 0x00004007
+  MCI_SEQ_STATUS_MASTER* = 0x00004008
+  MCI_SEQ_STATUS_OFFSET* = 0x00004009
+  MCI_SEQ_STATUS_DIVTYPE* = 0x0000400A
+  MCI_SEQ_STATUS_NAME* = 0x0000400B
+  MCI_SEQ_STATUS_COPYRIGHT* = 0x0000400C
+  MCI_SEQ_SET_TEMPO* = 0x00010000
+  MCI_SEQ_SET_PORT* = 0x00020000
+  MCI_SEQ_SET_SLAVE* = 0x00040000
+  MCI_SEQ_SET_MASTER* = 0x00080000
+  MCI_SEQ_SET_OFFSET* = 0x01000000
+  MCI_ANIM_PLAY_SLOW* = 0x00080000
+  MCI_ANIM_PLAY_SCAN* = 0x00100000
+  MCI_ANIM_GETDEVCAPS_SLOW_RATE* = 0x00004003
+  MCI_ANIM_GETDEVCAPS_NORMAL_RATE* = 0x00004004
+  MCI_ANIM_STEP_REVERSE* = 0x00010000
+  MCI_ANIM_STEP_FRAMES* = 0x00020000
+  MCI_ANIM_STATUS_SPEED* = 0x00004001
+  MCI_ANIM_GETDEVCAPS_PALETTES* = 0x00004006
+  MCI_ANIM_OPEN_WS* = 0x00010000
+  MCI_ANIM_OPEN_PARENT* = 0x00020000
+  MCI_ANIM_OPEN_NOSTATIC* = 0x00040000
+  MCI_ANIM_GETDEVCAPS_FAST_RATE* = 0x00004002
+  MCI_ANIM_PLAY_SPEED* = 0x00010000
+  MCI_ANIM_PLAY_REVERSE* = 0x00020000
+  MCI_ANIM_PLAY_FAST* = 0x00040000
+  MCI_ANIM_STATUS_FORWARD* = 0x00004002
+  MCI_ANIM_STATUS_HWND* = 0x00004003
+  MCI_ANIM_STATUS_HPAL* = 0x00004004
+  MCI_ANIM_STATUS_STRETCH* = 0x00004005
+  MCI_ANIM_INFO_TEXT* = 0x00010000
+  MCI_ANIM_GETDEVCAPS_CAN_REVERSE* = 0x00004001
+  MCI_ANIM_WINDOW_TEXT* = 0x00080000
+  MCI_ANIM_WINDOW_ENABLE_STRETCH* = 0x00100000
+  MCI_ANIM_WINDOW_DISABLE_STRETCH* = 0x00200000
+  MCI_ANIM_WINDOW_DEFAULT* = 0
+  MCI_ANIM_RECT* = 0x00010000
+  MCI_ANIM_PUT_SOURCE* = 0x00020000
+  MCI_ANIM_PUT_DESTINATION* = 0x00040000
+  MCI_ANIM_WHERE_SOURCE* = 0x00020000
+  MCI_ANIM_WHERE_DESTINATION* = 0x00040000
+  MCI_ANIM_UPDATE_HDC* = 0x00020000
+  MCI_ANIM_GETDEVCAPS_CAN_STRETCH* = 0x00004007
+  MCI_ANIM_GETDEVCAPS_MAX_WINDOWS* = 0x00004008
+  MCI_ANIM_REALIZE_NORM* = 0x00010000
+  MCI_ANIM_REALIZE_BKGD* = 0x00020000
+  MCI_ANIM_WINDOW_HWND* = 0x00010000
+  MCI_ANIM_WINDOW_STATE* = 0x00040000
+  TIMERR_NOERROR* = 0
+  TIMERR_NOCANDO* = (TIMERR_BASE + 1)
+  TIMERR_STRUCT* = (TIMERR_BASE + 33)
+  TIME_ONESHOT* = 0
+  TIME_PERIODIC* = 1
+  TIME_CALLBACK_FUNCTION* = 0
+  TIME_CALLBACK_EVENT_SET* = 16
+  TIME_CALLBACK_EVENT_PULSE* = 32
+  MCI_OVLY_OPEN_WS* = 0x00010000
+  MCI_OVLY_OPEN_PARENT* = 0x00020000
+  MCI_OVLY_STATUS_HWND* = 0x00004001
+  MCI_OVLY_STATUS_STRETCH* = 0x00004002
+  MCI_OVLY_INFO_TEXT* = 0x00010000
+  MCI_OVLY_GETDEVCAPS_CAN_STRETCH* = 0x00004001
+  MCI_OVLY_GETDEVCAPS_CAN_FREEZE* = 0x00004002
+  MCI_OVLY_GETDEVCAPS_MAX_WINDOWS* = 0x00004003
+  MCI_OVLY_WINDOW_HWND* = 0x00010000
+  MCI_OVLY_WINDOW_STATE* = 0x00040000
+  MCI_OVLY_WINDOW_TEXT* = 0x00080000
+  MCI_OVLY_WINDOW_ENABLE_STRETCH* = 0x00100000
+  MCI_OVLY_WINDOW_DISABLE_STRETCH* = 0x00200000
+  MCI_OVLY_WINDOW_DEFAULT* = 0
+  MCI_OVLY_RECT* = 0x00010000
+  MCI_OVLY_PUT_SOURCE* = 0x00020000
+  MCI_OVLY_PUT_DESTINATION* = 0x00040000
+  MCI_OVLY_PUT_FRAME* = 0x00080000
+  MCI_OVLY_PUT_VIDEO* = 0x00100000
+  MCI_OVLY_WHERE_SOURCE* = 0x00020000
+  MCI_OVLY_WHERE_DESTINATION* = 0x00040000
+  MCI_OVLY_WHERE_FRAME* = 0x00080000
+  MCI_OVLY_WHERE_VIDEO* = 0x00100000
+  AUX_MAPPER* = - 1
+  MIXER_GETLINECONTROLSF_ONEBYID* = 1
+  MIXER_GETLINECONTROLSF_ONEBYTYPE* = 2
+  MIXER_GETLINECONTROLSF_ALL* = 0
+  MIXER_GETLINECONTROLSF_QUERYMASK* = 0x0000000F
+  NEWTRANSPARENT* = 3
+  QUERYROPSUPPORT* = 40
+  SELECTDIB* = 41
+
+proc DIBINDEX*(n: int32): int32
+const
+  SC_SCREENSAVE* = 0x0000F140
+  AUXCAPS_CDAUDIO* = 1
+  AUXCAPS_AUXIN* = 2
+  AUXCAPS_VOLUME* = 1
+  AUXCAPS_LRVOLUME* = 2 #/////////////////////////////////////////////////////////
+                        # Structures and typedefs
+                        #/////////////////////////////////////////////////////////
+
+type
+  mmtime* = record
+    wType*: UINT
+    hour*, min*, sec*, frame*, fps*, dummy*: int8
+    pad*: array[0..1, int8]
+
+  PMMTIME* = ptr mmtime
+  NPMMTIME* = ptr mmtime
+  LPMMTIME* = ptr mmtime
+  PWAVEHDR* = ptr wavehdr
+  TMMTime* = mmtime
+  wavehdr* = record
+    lpData*: cstring
+    dwBufferLength*: DWORD
+    dwBytesRecorded*: DWORD
+    dwUser*: DWORD
+    dwFlags*: DWORD
+    dwLoops*: DWORD
+    lpNext*: PWAVEHDR
+    reserved*: DWORD
+
+  TWAVEHDR* = WAVEHDR
+  NPWAVEHDR* = ptr wavehdr
+  LPWAVEHDR* = ptr wavehdr
+  WAVEOUTCAPSA* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), CHAR]
+    dwFormats*: DWORD
+    wChannels*: int16
+    wReserved1*: int16
+    dwSupport*: DWORD
+
+  TWAVEOUTCAPSA* = WAVEOUTCAPSA
+  PWAVEOUTCAPSA* = ptr WAVEOUTCAPSA
+  NPWAVEOUTCAPSA* = ptr WAVEOUTCAPSA
+  LPWAVEOUTCAPSA* = ptr WAVEOUTCAPSA
+  WAVEOUTCAPSW* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    dwFormats*: DWORD
+    wChannels*: int16
+    wReserved1*: int16
+    dwSupport*: DWORD
+
+  PWAVEOUTCAPSW* = ptr WAVEOUTCAPSW
+  NPWAVEOUTCAPSW* = ptr WAVEOUTCAPSW
+  LPWAVEOUTCAPSW* = ptr WAVEOUTCAPSW
+  TWAVEOUTCAPSW* = WAVEOUTCAPSW
+
+when defined(UNICODE):
+  type
+    WAVEOUTCAPS* = WAVEOUTCAPSW
+    PWAVEOUTCAPS* = PWAVEOUTCAPSW
+    NPWAVEOUTCAPS* = NPWAVEOUTCAPSW
+    LPWAVEOUTCAPS* = LPWAVEOUTCAPSW
+else:
+  type
+    WAVEOUTCAPS* = WAVEOUTCAPSA
+    PWAVEOUTCAPS* = PWAVEOUTCAPSA
+    NPWAVEOUTCAPS* = NPWAVEOUTCAPSA
+    LPWAVEOUTCAPS* = LPWAVEOUTCAPSA
+type
+  TWAVEOUTCAPS* = WAVEOUTCAPS
+  WAVEINCAPSA* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), CHAR]
+    dwFormats*: DWORD
+    wChannels*: int16
+    wReserved1*: int16
+
+  PWAVEINCAPSA* = ptr WAVEINCAPSA
+  NPWAVEINCAPSA* = ptr WAVEINCAPSA
+  LPWAVEINCAPSA* = ptr WAVEINCAPSA
+  TWAVEINCAPSA* = WAVEINCAPSA
+  WAVEINCAPSW* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    dwFormats*: DWORD
+    wChannels*: int16
+    wReserved1*: int16
+
+  PWAVEINCAPSW* = ptr WAVEINCAPSW
+  NPWAVEINCAPSW* = ptr WAVEINCAPSW
+  LPWAVEINCAPSW* = ptr WAVEINCAPSW
+  TWAVEINCAPSW* = WAVEINCAPSW
+
+when defined(UNICODE):
+  type
+    WAVEINCAPS* = WAVEINCAPSW
+    PWAVEINCAPS* = PWAVEINCAPSW
+    NPWAVEINCAPS* = NPWAVEINCAPSW
+    LPWAVEINCAPS* = LPWAVEINCAPSW
+else:
+  type
+    WAVEINCAPS* = WAVEINCAPSA
+    PWAVEINCAPS* = PWAVEINCAPSA
+    NPWAVEINCAPS* = NPWAVEINCAPSA
+    LPWAVEINCAPS* = LPWAVEINCAPSA
+type
+  TWAVEINCAPS* = WAVEINCAPS
+  waveformat* = record
+    wFormatTag*: int16
+    nChannels*: int16
+    nSamplesPerSec*: DWORD
+    nAvgBytesPerSec*: DWORD
+    nBlockAlign*: int16
+
+  PWAVEFORMAT* = ptr waveformat
+  NPWAVEFORMAT* = ptr waveformat
+  LPWAVEFORMAT* = ptr waveformat
+  TWAVEFORMAT* = waveformat
+
+const
+  WAVE_FORMAT_PCM* = 1
+
+type
+  pcmwaveformat* = record
+    wf*: WAVEFORMAT
+    wBitsPerSample*: int16
+
+  PPCMWAVEFORMAT* = ptr pcmwaveformat
+  NPPCMWAVEFORMAT* = ptr pcmwaveformat
+  LPPCMWAVEFORMAT* = ptr pcmwaveformat
+  TPCMWAVEFORMAT* = PCMWAVEFORMAT
+  WAVEFORMATEX* = record
+    wFormatTag*: int16
+    nChannels*: int16
+    nSamplesPerSec*: DWORD
+    nAvgBytesPerSec*: DWORD
+    nBlockAlign*: int16
+    wBitsPerSample*: int16
+    cbSize*: int16
+
+  PWAVEFORMATEX* = ptr WAVEFORMATEX
+  NPWAVEFORMATEX* = ptr WAVEFORMATEX
+  LPWAVEFORMATEX* = ptr WAVEFORMATEX
+  LPCWAVEFORMATEX* = ptr WAVEFORMATEX
+  TWAVEFORMATEX* = WAVEFORMATEX
+  HMIDI* = THandle
+  HMIDIIN* = THandle
+  HMIDIOUT* = THandle
+  HMIDISTRM* = THandle
+  LPHMIDI* = ptr HMIDI
+  LPHMIDIIN* = ptr HMIDIIN
+  LPHMIDIOUT* = ptr HMIDIOUT
+  LPHMIDISTRM* = ptr HMIDISTRM
+  LPMIDICALLBACK* = PDRVCALLBACK
+
+const
+  MIDIPATCHSIZE* = 128
+
+type
+  PATCHARRAY* = array[0..Pred(MIDIPATCHSIZE), int16]
+  LPPATCHARRAY* = ptr int16
+  KEYARRAY* = array[0..Pred(MIDIPATCHSIZE), int16]
+  LPKEYARRAY* = ptr int16
+  MIDIOUTCAPSA* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), CHAR]
+    wTechnology*: int16
+    wVoices*: int16
+    wNotes*: int16
+    wChannelMask*: int16
+    dwSupport*: DWORD
+
+  PMIDIOUTCAPSA* = ptr MIDIOUTCAPSA
+  NPMIDIOUTCAPSA* = ptr MIDIOUTCAPSA
+  LPMIDIOUTCAPSA* = ptr MIDIOUTCAPSA
+  TMIDIOUTCAPSA* = MIDIOUTCAPSA
+  MIDIOUTCAPSW* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    wTechnology*: int16
+    wVoices*: int16
+    wNotes*: int16
+    wChannelMask*: int16
+    dwSupport*: DWORD
+
+  PMIDIOUTCAPSW* = ptr MIDIOUTCAPSW
+  NPMIDIOUTCAPSW* = ptr MIDIOUTCAPSW
+  LPMIDIOUTCAPSW* = ptr MIDIOUTCAPSW
+  TMIDIOUTCAPSW* = MIDIOUTCAPSW
+  MIDIINCAPSA* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), CHAR]
+    dwSupport*: DWORD
+
+  PMIDIINCAPSA* = ptr MIDIINCAPSA
+  NPMIDIINCAPSA* = ptr MIDIINCAPSA
+  LPMIDIINCAPSA* = ptr MIDIINCAPSA
+  TMIDIINCAPSA* = MIDIINCAPSA
+  MIDIINCAPSW* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    dwSupport*: DWORD
+
+  PMIDIINCAPSW* = ptr MIDIINCAPSW
+  NPMIDIINCAPSW* = ptr MIDIINCAPSW
+  LPMIDIINCAPSW* = ptr MIDIINCAPSW
+  TMIDIINCAPSW* = MIDIINCAPSW
+
+when defined(UNICODE):
+  type
+    MIDIINCAPS* = MIDIINCAPSW
+    PMIDIINCAPS* = PMIDIINCAPSW
+    NPMIDIINCAPS* = NPMIDIINCAPSW
+    LPMIDIINCAPS* = LPMIDIINCAPSW
+    MIDIOUTCAPS* = MIDIOUTCAPSW
+    PMIDIOUTCAPS* = PMIDIOUTCAPSW
+    NPMIDIOUTCAPS* = NPMIDIOUTCAPSW
+    LPMIDIOUTCAPS* = LPMIDIOUTCAPSW
+else:
+  type
+    MIDIOUTCAPS* = MIDIOUTCAPSA
+    PMIDIOUTCAPS* = PMIDIOUTCAPSA
+    NPMIDIOUTCAPS* = NPMIDIOUTCAPSA
+    LPMIDIOUTCAPS* = LPMIDIOUTCAPSA
+    MIDIINCAPS* = MIDIINCAPSA
+    PMIDIINCAPS* = PMIDIINCAPSA
+    NPMIDIINCAPS* = NPMIDIINCAPSA
+    LPMIDIINCAPS* = LPMIDIINCAPSA
+type
+  TMIDIINCAPS* = MIDIINCAPS
+  PMIDIHDR* = ptr midihdr
+  midihdr* = record
+    lpData*: cstring
+    dwBufferLength*: DWORD
+    dwBytesRecorded*: DWORD
+    dwUser*: DWORD
+    dwFlags*: DWORD
+    lpNext*: PMIDIHDR
+    reserved*: DWORD
+    dwOffset*: DWORD
+    dwReserved*: array[0..Pred(8), DWORD]
+
+  NPMIDIHDR* = ptr midihdr
+  LPMIDIHDR* = ptr midihdr
+  TMIDIHDR* = MIDIHDR
+  midievent* = record
+    dwDeltaTime*: DWORD
+    dwStreamID*: DWORD
+    dwEvent*: DWORD
+    dwParms*: array[0..Pred(1), DWORD]
+
+  TMIDIEVENT* = MIDIEVENT
+  midistrmbuffver* = record
+    dwVersion*: DWORD
+    dwMid*: DWORD
+    dwOEMVersion*: DWORD
+
+  TMIDISTRMBUFFVER* = MIDISTRMBUFFVER
+  Tmidiproptimediv* = record
+    cbStruct*: DWORD
+    dwTimeDiv*: DWORD
+
+  LPMIDIPROPTIMEDIV* = ptr Tmidiproptimediv
+  Tmidiproptempo* = record
+    cbStruct*: DWORD
+    dwTempo*: DWORD
+
+  LPMIDIPROPTEMPO* = ptr Tmidiproptempo
+  AUXCAPSA* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), CHAR]
+    wTechnology*: int16
+    wReserved1*: int16
+    dwSupport*: DWORD
+
+  PAUXCAPSA* = ptr AUXCAPSA
+  NPAUXCAPSA* = ptr AUXCAPSA
+  LPAUXCAPSA* = ptr AUXCAPSA
+  TAUXCAPSA* = AUXCAPSA
+  AUXCAPSW* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    wTechnology*: int16
+    wReserved1*: int16
+    dwSupport*: DWORD
+
+  PAUXCAPSW* = ptr AUXCAPSW
+  NPAUXCAPSW* = ptr AUXCAPSW
+  LPAUXCAPSW* = ptr AUXCAPSW
+  TAUXCAPSW* = AUXCAPSW
+
+when defined(UNICODE):
+  type
+    AUXCAPS* = AUXCAPSW
+    PAUXCAPS* = PAUXCAPSW
+    NPAUXCAPS* = NPAUXCAPSW
+    LPAUXCAPS* = LPAUXCAPSW
+else:
+  type
+    AUXCAPS* = AUXCAPSA
+    PAUXCAPS* = PAUXCAPSA
+    NPAUXCAPS* = NPAUXCAPSA
+    LPAUXCAPS* = LPAUXCAPSA
+type
+  TAUXCAPS* = AUXCAPS
+  HMIXEROBJ* = THandle
+  LPHMIXEROBJ* = ptr HMIXEROBJ
+  HMIXER* = THandle
+  LPHMIXER* = ptr HMIXER
+
+proc mixerGetNumDevs*(): UINT{.stdcall, dynlib: "winmm.dll",
+                               importc: "mixerGetNumDevs".}
+type
+  MIXERCAPSA* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), CHAR]
+    fdwSupport*: DWORD
+    cDestinations*: DWORD
+
+  PMIXERCAPSA* = ptr MIXERCAPSA
+  LPMIXERCAPSA* = ptr MIXERCAPSA
+  TMIXERCAPSA* = MIXERCAPSA
+  MIXERCAPSW* = record
+    wMid*: int16
+    wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    fdwSupport*: DWORD
+    cDestinations*: DWORD
+
+  PMIXERCAPSW* = ptr MIXERCAPSW
+  LPMIXERCAPSW* = ptr MIXERCAPSW
+  TMIXERCAPSW* = MIXERCAPSW
+
+when defined(UNICODE):
+  type
+    MIXERCAPS* = MIXERCAPSW
+    PMIXERCAPS* = PMIXERCAPSW
+    LPMIXERCAPS* = LPMIXERCAPSW
+else:
+  type
+    MIXERCAPS* = MIXERCAPSA
+    PMIXERCAPS* = PMIXERCAPSA
+    LPMIXERCAPS* = LPMIXERCAPSA
+type
+  TMIXERCAPS* = MIXERCAPS
+  MIXERLINEA* = record
+    cbStruct*: DWORD
+    dwDestination*: DWORD
+    dwSource*: DWORD
+    dwLineID*: DWORD
+    fdwLine*: DWORD
+    dwUser*: DWORD
+    dwComponentType*: DWORD
+    cChannels*: DWORD
+    cConnections*: DWORD
+    cControls*: DWORD
+    szShortName*: array[0..Pred(MIXER_SHORT_NAME_CHARS), CHAR]
+    szName*: array[0..Pred(MIXER_LONG_NAME_CHARS), CHAR]
+    dwType*, dwDeviceID*: DWORD
+    wMid*, wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..pred(MAXPNAMELEN), Char]
+
+  PMIXERLINEA* = ptr MIXERLINEA
+  LPMIXERLINEA* = ptr MIXERLINEA
+  TMIXERLINEA* = MIXERLINEA
+  MIXERLINEW* = record
+    cbStruct*: DWORD
+    dwDestination*: DWORD
+    dwSource*: DWORD
+    dwLineID*: DWORD
+    fdwLine*: DWORD
+    dwUser*: DWORD
+    dwComponentType*: DWORD
+    cChannels*: DWORD
+    cConnections*: DWORD
+    cControls*: DWORD
+    szShortName*: array[0..Pred(MIXER_SHORT_NAME_CHARS), WCHAR]
+    szName*: array[0..Pred(MIXER_LONG_NAME_CHARS), WCHAR]
+    dwType*, dwDeviceID*: DWORD
+    wMid*, wPid*: int16
+    vDriverVersion*: MMVERSION
+    szPname*: array[0..pred(MAXPNAMELEN), WChar]
+
+  TMIXERLINEW* = MIXERLINEW
+  PMIXERLINEW* = ptr MIXERLINEW
+  LPMIXERLINEW* = ptr MIXERLINEW
+
+when defined(UNICODE):
+  type
+    MIXERLINE* = MIXERLINEW
+    PMIXERLINE* = PMIXERLINEW
+    LPMIXERLINE* = LPMIXERLINEW
+else:
+  type
+    MIXERLINE* = MIXERLINEA
+    PMIXERLINE* = PMIXERLINEA
+    LPMIXERLINE* = LPMIXERLINEA
+type
+  TMIXERLINE* = MIXERLINE
+  MIXERCONTROLA* = record
+    cbStruct*: DWORD
+    dwControlID*: DWORD
+    dwControlType*: DWORD
+    fdwControl*: DWORD
+    cMultipleItems*: DWORD
+    szShortName*: array[0..Pred(MIXER_SHORT_NAME_CHARS), CHAR]
+    szName*: array[0..Pred(MIXER_LONG_NAME_CHARS), CHAR]
+    dwMinimum*, dwMaximum*: DWORD
+    dwReserved*: array[0..3, DWORD]
+    cSteps*: DWORD
+    dwReserved2*: array[0..4, DWORD]
+
+  PMIXERCONTROLA* = ptr MIXERCONTROLA
+  LPMIXERCONTROLA* = ptr MIXERCONTROLA
+  TMIXERCONTROLA* = MIXERCONTROLA
+  MIXERCONTROLW* = record
+    cbStruct*: DWORD
+    dwControlID*: DWORD
+    dwControlType*: DWORD
+    fdwControl*: DWORD
+    cMultipleItems*: DWORD
+    szShortName*: array[0..Pred(MIXER_SHORT_NAME_CHARS), WCHAR]
+    szName*: array[0..Pred(MIXER_LONG_NAME_CHARS), WCHAR]
+    dwMinimum*, dwMaximum*: DWORD
+    dwReserved*: array[0..3, DWORD]
+    cSteps*: DWORD
+    dwReserved2*: array[0..4, DWORD]
+
+  PMIXERCONTROLW* = ptr MIXERCONTROLW
+  LPMIXERCONTROLW* = ptr MIXERCONTROLW
+  TMIXERCONTROLW* = MIXERCONTROLW
+
+when defined(UNICODE):
+  type
+    MIXERCONTROL* = MIXERCONTROLW
+    PMIXERCONTROL* = PMIXERCONTROLW
+    LPMIXERCONTROL* = LPMIXERCONTROLW
+else:
+  type
+    MIXERCONTROL* = MIXERCONTROLA
+    PMIXERCONTROL* = PMIXERCONTROLA
+    LPMIXERCONTROL* = LPMIXERCONTROLA
+type
+  TMIXERCONTROL* = MIXERCONTROL
+  MIXERLINECONTROLSA* = record
+    cbStruct*: DWORD
+    dwLineID*: DWORD
+    dwControlType*, cControls*, cbmxctrl*: DWORD
+    pamxctrl*: PMIXERCONTROLA
+
+  PMIXERLINECONTROLSA* = ptr MIXERLINECONTROLSA
+  LPMIXERLINECONTROLSA* = ptr MIXERLINECONTROLSA
+  TMIXERLINECONTROLSA* = MIXERLINECONTROLSA
+  MIXERLINECONTROLSW* = record
+    cbStruct*: DWORD
+    dwLineID*: DWORD
+    dwControlType*, cControls*, cbmxctrl*: DWORD
+    pamxctrl*: PMIXERCONTROLW
+
+  PMIXERLINECONTROLSW* = ptr MIXERLINECONTROLSW
+  LPMIXERLINECONTROLSW* = ptr MIXERLINECONTROLSW
+  TMIXERLINECONTROLSW* = MIXERLINECONTROLSW
+
+when defined(UNICODE):
+  type
+    MIXERLINECONTROLS* = MIXERLINECONTROLSW
+    PMIXERLINECONTROLS* = PMIXERLINECONTROLSW
+    LPMIXERLINECONTROLS* = LPMIXERLINECONTROLSW
+else:
+  type
+    MIXERLINECONTROLS* = MIXERLINECONTROLSA
+    PMIXERLINECONTROLS* = PMIXERLINECONTROLSA
+    LPMIXERLINECONTROLS* = LPMIXERLINECONTROLSA
+type
+  TMIXERLINECONTROLS* = MIXERLINECONTROLS
+  TMIXERCONTROLDETAILS* = record
+    cbStruct*: DWORD
+    dwControlID*: DWORD
+    cChannels*: DWORD
+    cMultipleItems*, cbDetails*: DWORD
+    paDetails*: Pointer
+
+  MIXERCONTROLDETAILS* = tMIXERCONTROLDETAILS
+  PMIXERCONTROLDETAILS* = ptr tMIXERCONTROLDETAILS
+  LPMIXERCONTROLDETAILS* = ptr tMIXERCONTROLDETAILS
+  MIXERCONTROLDETAILS_LISTTEXTA* = record
+    dwParam1*: DWORD
+    dwParam2*: DWORD
+    szName*: array[0..Pred(MIXER_LONG_NAME_CHARS), CHAR]
+
+  PMIXERCONTROLDETAILS_LISTTEXTA* = ptr MIXERCONTROLDETAILS_LISTTEXTA
+  LPMIXERCONTROLDETAILS_LISTTEXTA* = ptr MIXERCONTROLDETAILS_LISTTEXTA
+  TMIXERCONTROLDETAILS_LISTTEXTA* = MIXERCONTROLDETAILS_LISTTEXTA
+  MIXERCONTROLDETAILS_LISTTEXTW* = record
+    dwParam1*: DWORD
+    dwParam2*: DWORD
+    szName*: array[0..Pred(MIXER_LONG_NAME_CHARS), WCHAR]
+
+  PMIXERCONTROLDETAILS_LISTTEXTW* = ptr MIXERCONTROLDETAILS_LISTTEXTW
+  LPMIXERCONTROLDETAILS_LISTTEXTW* = ptr MIXERCONTROLDETAILS_LISTTEXTW
+  TMIXERCONTROLDETAILS_LISTTEXTW* = MIXERCONTROLDETAILS_LISTTEXTW
+
+when defined(UNICODE):
+  type
+    MIXERCONTROLDETAILS_LISTTEXT* = MIXERCONTROLDETAILS_LISTTEXTW
+    PMIXERCONTROLDETAILS_LISTTEXT* = PMIXERCONTROLDETAILS_LISTTEXTW
+    LPMIXERCONTROLDETAILS_LISTTEXT* = LPMIXERCONTROLDETAILS_LISTTEXTW
+else:
+  type
+    MIXERCONTROLDETAILS_LISTTEXT* = MIXERCONTROLDETAILS_LISTTEXTA
+    PMIXERCONTROLDETAILS_LISTTEXT* = PMIXERCONTROLDETAILS_LISTTEXTA
+    LPMIXERCONTROLDETAILS_LISTTEXT* = LPMIXERCONTROLDETAILS_LISTTEXTA
+type
+  TMIXERCONTROLDETAILS_LISTTEXT* = MIXERCONTROLDETAILS_LISTTEXT
+  MIXERCONTROLDETAILS_BOOLEAN* = record
+    fValue*: int32
+
+  PMIXERCONTROLDETAILS_BOOLEAN* = ptr MIXERCONTROLDETAILS_BOOLEAN
+  LPMIXERCONTROLDETAILS_BOOLEAN* = ptr MIXERCONTROLDETAILS_BOOLEAN
+  TMIXERCONTROLDETAILS_BOOLEAN* = MIXERCONTROLDETAILS_BOOLEAN
+  MIXERCONTROLDETAILS_SIGNED* = record
+    lValue*: int32
+
+  PMIXERCONTROLDETAILS_SIGNED* = ptr MIXERCONTROLDETAILS_SIGNED
+  LPMIXERCONTROLDETAILS_SIGNED* = ptr MIXERCONTROLDETAILS_SIGNED
+  TMIXERCONTROLDETAILS_SIGNED* = MIXERCONTROLDETAILS_SIGNED
+  MIXERCONTROLDETAILS_UNSIGNED* = record
+    dwValue*: DWORD
+
+  PMIXERCONTROLDETAILS_UNSIGNED* = ptr MIXERCONTROLDETAILS_UNSIGNED
+  LPMIXERCONTROLDETAILS_UNSIGNED* = ptr MIXERCONTROLDETAILS_UNSIGNED
+  TMIXERCONTROLDETAILS_UNSIGNED* = MIXERCONTROLDETAILS_UNSIGNED
+  LPTIMECALLBACK* = proc (uTimerID, uMsg: UINT, dwUser, dw1, dw2: DWORD){.
+      stdcall.}
+  TTIMECALLBACK* = LPTIMECALLBACK
+  timecaps* = record
+    wPeriodMin*: UINT
+    wPeriodMax*: UINT
+
+  PTIMECAPS* = ptr timecaps
+  NPTIMECAPS* = ptr timecaps
+  LPTIMECAPS* = ptr timecaps
+  TTIMECAS* = TIMECAPS
+  JOYCAPSA* = record
+    wMid*: int16
+    wPid*: int16
+    szPname*: array[0..Pred(MAXPNAMELEN), CHAR]
+    wXmin*: UINT
+    wXmax*: UINT
+    wYmin*: UINT
+    wYmax*: UINT
+    wZmin*: UINT
+    wZmax*: UINT
+    wNumButtons*: UINT
+    wPeriodMin*: UINT
+    wPeriodMax*: UINT
+    wRmin*: UINT
+    wRmax*: UINT
+    wUmin*: UINT
+    wUmax*: UINT
+    wVmin*: UINT
+    wVmax*: UINT
+    wCaps*: UINT
+    wMaxAxes*: UINT
+    wNumAxes*: UINT
+    wMaxButtons*: UINT
+    szRegKey*: array[0..Pred(MAXPNAMELEN), CHAR]
+    szOEMVxD*: array[0..Pred(MAX_JOYSTICKOEMVXDNAME), CHAR]
+
+  PJOYCAPSA* = ptr JOYCAPSA
+  NPJOYCAPSA* = ptr JOYCAPSA
+  LPJOYCAPSA* = ptr JOYCAPSA
+  TJOYCAPSA* = JOYCAPSA
+  JOYCAPSW* = record
+    wMid*: int16
+    wPid*: int16
+    szPname*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    wXmin*: UINT
+    wXmax*: UINT
+    wYmin*: UINT
+    wYmax*: UINT
+    wZmin*: UINT
+    wZmax*: UINT
+    wNumButtons*: UINT
+    wPeriodMin*: UINT
+    wPeriodMax*: UINT
+    wRmin*: UINT
+    wRmax*: UINT
+    wUmin*: UINT
+    wUmax*: UINT
+    wVmin*: UINT
+    wVmax*: UINT
+    wCaps*: UINT
+    wMaxAxes*: UINT
+    wNumAxes*: UINT
+    wMaxButtons*: UINT
+    szRegKey*: array[0..Pred(MAXPNAMELEN), WCHAR]
+    szOEMVxD*: array[0..Pred(MAX_JOYSTICKOEMVXDNAME), WCHAR]
+
+  PJOYCAPSW* = ptr JOYCAPSW
+  NPJOYCAPSW* = ptr JOYCAPSW
+  LPJOYCAPSW* = ptr JOYCAPSW
+  TJOYCAPSW* = JOYCAPSW
+
+when defined(UNICODE):
+  type
+    JOYCAPS* = JOYCAPSW
+    PJOYCAPS* = PJOYCAPSW
+    NPJOYCAPS* = NPJOYCAPSW
+    LPJOYCAPS* = LPJOYCAPSW
+else:
+  type
+    JOYCAPS* = JOYCAPSA
+    PJOYCAPS* = PJOYCAPSA
+    NPJOYCAPS* = NPJOYCAPSA
+    LPJOYCAPS* = LPJOYCAPSA
+type
+  TJOYCAPS* = JOYCAPS
+  joyinfo* = record
+    wXpos*: UINT
+    wYpos*: UINT
+    wZpos*: UINT
+    wButtons*: UINT
+
+  PJOYINFO* = ptr joyinfo
+  NPJOYINFO* = ptr joyinfo
+  LPJOYINFO* = ptr joyinfo
+  TJOYINFO* = JOYINFO
+  joyinfoex* = record
+    dwSize*: DWORD
+    dwFlags*: DWORD
+    wXpos*: UINT
+    wYpos*: UINT
+    wZpos*: UINT
+    dwRpos*: DWORD
+    dwUpos*: DWORD
+    dwVpos*: DWORD
+    wButtons*: UINT
+    dwButtonNumber*: DWORD
+    dwPOV*: DWORD
+    dwReserved1*: DWORD
+    dwReserved2*: DWORD
+
+  PJOYINFOEX* = ptr joyinfoex
+  NPJOYINFOEX* = ptr joyinfoex
+  LPJOYINFOEX* = ptr joyinfoex
+  TJOYINFOEX* = JOYINFOEX
+  FOURCC* = DWORD
+  HPSTR* = cstring
+  HMMIO* = THandle
+  LPMMIOPROC* = proc (x1: LPSTR, x2: UINT, x3, x4: LPARAM): LRESULT{.stdcall.}
+  TMMIOPROC* = LPMMIOPROC
+  MMIOINFO* = record
+    dwFlags*: DWORD
+    fccIOProc*: FOURCC
+    pIOProc*: LPMMIOPROC
+    wErrorRet*: UINT
+    htask*: HTASK
+    cchBuffer*: int32
+    pchBuffer*: HPSTR
+    pchNext*: HPSTR
+    pchEndRead*: HPSTR
+    pchEndWrite*: HPSTR
+    lBufOffset*: int32
+    lDiskOffset*: int32
+    adwInfo*: array[0..Pred(3), DWORD]
+    dwReserved1*: DWORD
+    dwReserved2*: DWORD
+    hmmio*: HMMIO
+
+  PMMIOINFO* = ptr MMIOINFO
+  NPMMIOINFO* = ptr MMIOINFO
+  LPMMIOINFO* = ptr MMIOINFO
+  LPCMMIOINFO* = ptr MMIOINFO
+  TMMIOINFO* = MMIOINFO
+  MMCKINFO* = record
+    ckid*: FOURCC
+    cksize*: DWORD
+    fccType*: FOURCC
+    dwDataOffset*: DWORD
+    dwFlags*: DWORD
+
+  PMMCKINFO* = ptr MMCKINFO
+  NPMMCKINFO* = ptr MMCKINFO
+  LPMMCKINFO* = ptr MMCKINFO
+  LPCMMCKINFO* = ptr MMCKINFO
+  TMMCKINFO* = MMCKINFO
+  MCIERROR* = DWORD
+  MCIDEVICEID* = UINT
+  YIELDPROC* = proc (mciId: MCIDEVICEID, dwYieldData: DWORD): UINT{.stdcall.}
+  TYIELDPROC* = YIELDPROC
+  MCI_GENERIC_PARMS* = record
+    dwCallback*: DWORD
+
+  PMCI_GENERIC_PARMS* = ptr MCI_GENERIC_PARMS
+  LPMCI_GENERIC_PARMS* = ptr MCI_GENERIC_PARMS
+  TMCI_GENERIC_PARMS* = MCI_GENERIC_PARMS
+  MCI_OPEN_PARMSA* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCSTR
+    lpstrElementName*: LPCSTR
+    lpstrAlias*: LPCSTR
+
+  PMCI_OPEN_PARMSA* = ptr MCI_OPEN_PARMSA
+  LPMCI_OPEN_PARMSA* = ptr MCI_OPEN_PARMSA
+  TMCI_OPEN_PARMSA* = MCI_OPEN_PARMSA
+  MCI_OPEN_PARMSW* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCWSTR
+    lpstrElementName*: LPCWSTR
+    lpstrAlias*: LPCWSTR
+
+  PMCI_OPEN_PARMSW* = ptr MCI_OPEN_PARMSW
+  LPMCI_OPEN_PARMSW* = ptr MCI_OPEN_PARMSW
+  TMCI_OPEN_PARMSW* = MCI_OPEN_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_OPEN_PARMS* = MCI_OPEN_PARMSW
+    PMCI_OPEN_PARMS* = PMCI_OPEN_PARMSW
+    LPMCI_OPEN_PARMS* = LPMCI_OPEN_PARMSW
+else:
+  type
+    MCI_OPEN_PARMS* = MCI_OPEN_PARMSA
+    PMCI_OPEN_PARMS* = PMCI_OPEN_PARMSA
+    LPMCI_OPEN_PARMS* = LPMCI_OPEN_PARMSA
+type
+  TMCI_OPEN_PARMS* = MCI_OPEN_PARMS
+  MCI_PLAY_PARMS* = record
+    dwCallback*: DWORD
+    dwFrom*: DWORD
+    dwTo*: DWORD
+
+  PMCI_PLAY_PARMS* = ptr MCI_PLAY_PARMS
+  LPMCI_PLAY_PARMS* = ptr MCI_PLAY_PARMS
+  TMCI_PLAY_PARMS* = MCI_PLAY_PARMS
+  MCI_SEEK_PARMS* = record
+    dwCallback*: DWORD
+    dwTo*: DWORD
+
+  PMCI_SEEK_PARMS* = ptr MCI_SEEK_PARMS
+  LPMCI_SEEK_PARMS* = ptr MCI_SEEK_PARMS
+  TMCI_SEEK_PARMS* = MCI_SEEK_PARMS
+  MCI_STATUS_PARMS* = record
+    dwCallback*: DWORD
+    dwReturn*: DWORD
+    dwItem*: DWORD
+    dwTrack*: DWORD
+
+  PMCI_STATUS_PARMS* = ptr MCI_STATUS_PARMS
+  LPMCI_STATUS_PARMS* = ptr MCI_STATUS_PARMS
+  TMCI_STATUS_PARMS* = MCI_STATUS_PARMS
+  MCI_INFO_PARMSA* = record
+    dwCallback*: DWORD
+    lpstrReturn*: cstring
+    dwRetSize*: DWORD
+
+  LPMCI_INFO_PARMSA* = ptr MCI_INFO_PARMSA
+  TMCI_INFO_PARMSA* = MCI_INFO_PARMSA
+  MCI_INFO_PARMSW* = record
+    dwCallback*: DWORD
+    lpstrReturn*: LPWSTR
+    dwRetSize*: DWORD
+
+  LPMCI_INFO_PARMSW* = ptr MCI_INFO_PARMSW
+  TMCI_INFO_PARMSW* = MCI_INFO_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_INFO_PARMS* = MCI_INFO_PARMSW
+    LPMCI_INFO_PARMS* = LPMCI_INFO_PARMSW
+else:
+  type
+    MCI_INFO_PARMS* = MCI_INFO_PARMSA
+    LPMCI_INFO_PARMS* = LPMCI_INFO_PARMSA
+type
+  TMCI_INFO_PARMS* = MCI_INFO_PARMS
+  MCI_GETDEVCAPS_PARMS* = record
+    dwCallback*: DWORD
+    dwReturn*: DWORD
+    dwItem*: DWORD
+
+  PMCI_GETDEVCAPS_PARMS* = ptr MCI_GETDEVCAPS_PARMS
+  LPMCI_GETDEVCAPS_PARMS* = ptr MCI_GETDEVCAPS_PARMS
+  TMCI_GETDEVCAPS_PARMS* = MCI_GETDEVCAPS_PARMS
+  MCI_SYSINFO_PARMSA* = record
+    dwCallback*: DWORD
+    lpstrReturn*: cstring
+    dwRetSize*: DWORD
+    dwNumber*: DWORD
+    wDeviceType*: UINT
+
+  PMCI_SYSINFO_PARMSA* = ptr MCI_SYSINFO_PARMSA
+  LPMCI_SYSINFO_PARMSA* = ptr MCI_SYSINFO_PARMSA
+  TMCI_SYSINFO_PARMSA* = MCI_SYSINFO_PARMSA
+  MCI_SYSINFO_PARMSW* = record
+    dwCallback*: DWORD
+    lpstrReturn*: LPWSTR
+    dwRetSize*: DWORD
+    dwNumber*: DWORD
+    wDeviceType*: UINT
+
+  PMCI_SYSINFO_PARMSW* = ptr MCI_SYSINFO_PARMSW
+  LPMCI_SYSINFO_PARMSW* = ptr MCI_SYSINFO_PARMSW
+  TMCI_SYSINFO_PARMSW* = MCI_SYSINFO_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_SYSINFO_PARMS* = MCI_SYSINFO_PARMSW
+    PMCI_SYSINFO_PARMS* = PMCI_SYSINFO_PARMSW
+    LPMCI_SYSINFO_PARMS* = LPMCI_SYSINFO_PARMSW
+else:
+  type
+    MCI_SYSINFO_PARMS* = MCI_SYSINFO_PARMSA
+    PMCI_SYSINFO_PARMS* = PMCI_SYSINFO_PARMSA
+    LPMCI_SYSINFO_PARMS* = LPMCI_SYSINFO_PARMSA
+type
+  TMCI_SYSINFO_PARMS* = MCI_SYSINFO_PARMS
+  MCI_SET_PARMS* = record
+    dwCallback*: DWORD
+    dwTimeFormat*: DWORD
+    dwAudio*: DWORD
+
+  PMCI_SET_PARMS* = ptr MCI_SET_PARMS
+  LPMCI_SET_PARMS* = ptr MCI_SET_PARMS
+  TMCI_SET_PARMS* = MCI_SET_PARMS
+  MCI_BREAK_PARMS* = record
+    dwCallback*: DWORD
+    nVirtKey*: int32
+    hwndBreak*: HWND
+
+  PMCI_BREAK_PARMS* = ptr MCI_BREAK_PARMS
+  LPMCI_BREAK_PARMS* = ptr MCI_BREAK_PARMS
+  TMCI_BREAK_PARMS* = MCI_BREAK_PARMS
+  MCI_SAVE_PARMSA* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCSTR
+
+  PMCI_SAVE_PARMSA* = ptr MCI_SAVE_PARMSA
+  LPMCI_SAVE_PARMSA* = ptr MCI_SAVE_PARMSA
+  TMCI_SAVE_PARMSA* = MCI_SAVE_PARMSA
+  MCI_SAVE_PARMSW* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCWSTR
+
+  PMCI_SAVE_PARMSW* = ptr MCI_SAVE_PARMSW
+  LPMCI_SAVE_PARMSW* = ptr MCI_SAVE_PARMSW
+  TMCI_SAVE_PARMSW* = MCI_SAVE_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_SAVE_PARMS* = MCI_SAVE_PARMSW
+    PMCI_SAVE_PARMS* = PMCI_SAVE_PARMSW
+    LPMCI_SAVE_PARMS* = LPMCI_SAVE_PARMSW
+else:
+  type
+    MCI_SAVE_PARMS* = MCI_SAVE_PARMSA
+    PMCI_SAVE_PARMS* = PMCI_SAVE_PARMSA
+    LPMCI_SAVE_PARMS* = LPMCI_SAVE_PARMSA
+type
+  TMCI_SAVE_PARMS* = MCI_SAVE_PARMS
+  MCI_LOAD_PARMSA* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCSTR
+
+  PMCI_LOAD_PARMSA* = ptr MCI_LOAD_PARMSA
+  LPMCI_LOAD_PARMSA* = ptr MCI_LOAD_PARMSA
+  TMCI_LOAD_PARMSA* = MCI_LOAD_PARMSA
+  MCI_LOAD_PARMSW* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCWSTR
+
+  PMCI_LOAD_PARMSW* = ptr MCI_LOAD_PARMSW
+  LPMCI_LOAD_PARMSW* = ptr MCI_LOAD_PARMSW
+  TMCI_LOAD_PARMSW* = MCI_LOAD_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_LOAD_PARMS* = MCI_LOAD_PARMSW
+    PMCI_LOAD_PARMS* = PMCI_LOAD_PARMSW
+    LPMCI_LOAD_PARMS* = LPMCI_LOAD_PARMSW
+else:
+  type
+    MCI_LOAD_PARMS* = MCI_LOAD_PARMSA
+    PMCI_LOAD_PARMS* = PMCI_LOAD_PARMSA
+    LPMCI_LOAD_PARMS* = LPMCI_LOAD_PARMSA
+type
+  TMCI_LOAD_PARMS* = MCI_LOAD_PARMS
+  MCI_RECORD_PARMS* = record
+    dwCallback*: DWORD
+    dwFrom*: DWORD
+    dwTo*: DWORD
+
+  LPMCI_RECORD_PARMS* = ptr MCI_RECORD_PARMS
+  TMCI_RECORD_PARMS* = MCI_RECORD_PARMS
+  MCI_VD_PLAY_PARMS* = record
+    dwCallback*: DWORD
+    dwFrom*: DWORD
+    dwTo*: DWORD
+    dwSpeed*: DWORD
+
+  PMCI_VD_PLAY_PARMS* = ptr MCI_VD_PLAY_PARMS
+  LPMCI_VD_PLAY_PARMS* = ptr MCI_VD_PLAY_PARMS
+  TMCI_VD_PLAY_PARMS* = MCI_VD_PLAY_PARMS
+  MCI_VD_STEP_PARMS* = record
+    dwCallback*: DWORD
+    dwFrames*: DWORD
+
+  PMCI_VD_STEP_PARMS* = ptr MCI_VD_STEP_PARMS
+  LPMCI_VD_STEP_PARMS* = ptr MCI_VD_STEP_PARMS
+  MCI_VD_ESCAPE_PARMSA* = record
+    dwCallback*: DWORD
+    lpstrCommand*: LPCSTR
+
+  PMCI_VD_ESCAPE_PARMSA* = ptr MCI_VD_ESCAPE_PARMSA
+  LPMCI_VD_ESCAPE_PARMSA* = ptr MCI_VD_ESCAPE_PARMSA
+  TMCI_VD_ESCAPE_PARMSA* = MCI_VD_ESCAPE_PARMSA
+  MCI_VD_ESCAPE_PARMSW* = record
+    dwCallback*: DWORD
+    lpstrCommand*: LPCWSTR
+
+  PMCI_VD_ESCAPE_PARMSW* = ptr MCI_VD_ESCAPE_PARMSW
+  LPMCI_VD_ESCAPE_PARMSW* = ptr MCI_VD_ESCAPE_PARMSW
+  TMCI_VD_ESCAPE_PARMSW* = MCI_VD_ESCAPE_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_VD_ESCAPE_PARMS* = MCI_VD_ESCAPE_PARMSW
+    PMCI_VD_ESCAPE_PARMS* = PMCI_VD_ESCAPE_PARMSW
+    LPMCI_VD_ESCAPE_PARMS* = LPMCI_VD_ESCAPE_PARMSW
+else:
+  type
+    MCI_VD_ESCAPE_PARMS* = MCI_VD_ESCAPE_PARMSA
+    PMCI_VD_ESCAPE_PARMS* = PMCI_VD_ESCAPE_PARMSA
+    LPMCI_VD_ESCAPE_PARMS* = LPMCI_VD_ESCAPE_PARMSA
+type
+  TMCI_VD_ESCAPE_PARMS* = MCI_VD_ESCAPE_PARMS
+  MCI_WAVE_OPEN_PARMSA* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCSTR
+    lpstrElementName*: LPCSTR
+    lpstrAlias*: LPCSTR
+    dwBufferSeconds*: DWORD
+
+  PMCI_WAVE_OPEN_PARMSA* = ptr MCI_WAVE_OPEN_PARMSA
+  LPMCI_WAVE_OPEN_PARMSA* = ptr MCI_WAVE_OPEN_PARMSA
+  TMCI_WAVE_OPEN_PARMSA* = MCI_WAVE_OPEN_PARMSA
+  MCI_WAVE_OPEN_PARMSW* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCWSTR
+    lpstrElementName*: LPCWSTR
+    lpstrAlias*: LPCWSTR
+    dwBufferSeconds*: DWORD
+
+  PMCI_WAVE_OPEN_PARMSW* = ptr MCI_WAVE_OPEN_PARMSW
+  LPMCI_WAVE_OPEN_PARMSW* = ptr MCI_WAVE_OPEN_PARMSW
+  TMCI_WAVE_OPEN_PARMSW* = MCI_WAVE_OPEN_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_WAVE_OPEN_PARMS* = MCI_WAVE_OPEN_PARMSW
+    PMCI_WAVE_OPEN_PARMS* = PMCI_WAVE_OPEN_PARMSW
+    LPMCI_WAVE_OPEN_PARMS* = LPMCI_WAVE_OPEN_PARMSW
+else:
+  type
+    MCI_WAVE_OPEN_PARMS* = MCI_WAVE_OPEN_PARMSA
+    PMCI_WAVE_OPEN_PARMS* = PMCI_WAVE_OPEN_PARMSA
+    LPMCI_WAVE_OPEN_PARMS* = LPMCI_WAVE_OPEN_PARMSA
+type
+  TMCI_WAVE_OPEN_PARMS* = MCI_WAVE_OPEN_PARMS
+  MCI_WAVE_DELETE_PARMS* = record
+    dwCallback*: DWORD
+    dwFrom*: DWORD
+    dwTo*: DWORD
+
+  PMCI_WAVE_DELETE_PARMS* = ptr MCI_WAVE_DELETE_PARMS
+  LPMCI_WAVE_DELETE_PARMS* = ptr MCI_WAVE_DELETE_PARMS
+  TMCI_WAVE_DELETE_PARMS* = MCI_WAVE_DELETE_PARMS
+  MCI_WAVE_SET_PARMS* = record
+    dwCallback*: DWORD
+    dwTimeFormat*: DWORD
+    dwAudio*: DWORD
+    wInput*: UINT
+    wOutput*: UINT
+    wFormatTag*: int16
+    wReserved2*: int16
+    nChannels*: int16
+    wReserved3*: int16
+    nSamplesPerSec*: DWORD
+    nAvgBytesPerSec*: DWORD
+    nBlockAlign*: int16
+    wReserved4*: int16
+    wBitsPerSample*: int16
+    wReserved5*: int16
+
+  PMCI_WAVE_SET_PARMS* = ptr MCI_WAVE_SET_PARMS
+  LPMCI_WAVE_SET_PARMS* = ptr MCI_WAVE_SET_PARMS
+  TMCI_WAVE_SET_PARMS* = MCI_WAVE_SET_PARMS
+  MCI_SEQ_SET_PARMS* = record
+    dwCallback*: DWORD
+    dwTimeFormat*: DWORD
+    dwAudio*: DWORD
+    dwTempo*: DWORD
+    dwPort*: DWORD
+    dwSlave*: DWORD
+    dwMaster*: DWORD
+    dwOffset*: DWORD
+
+  PMCI_SEQ_SET_PARMS* = ptr MCI_SEQ_SET_PARMS
+  LPMCI_SEQ_SET_PARMS* = ptr MCI_SEQ_SET_PARMS
+  TMCI_SEQ_SET_PARMS* = MCI_SEQ_SET_PARMS
+  MCI_ANIM_OPEN_PARMSA* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCSTR
+    lpstrElementName*: LPCSTR
+    lpstrAlias*: LPCSTR
+    dwStyle*: DWORD
+    hWndParent*: HWND
+
+  PMCI_ANIM_OPEN_PARMSA* = ptr MCI_ANIM_OPEN_PARMSA
+  LPMCI_ANIM_OPEN_PARMSA* = ptr MCI_ANIM_OPEN_PARMSA
+  TMCI_ANIM_OPEN_PARMSA* = MCI_ANIM_OPEN_PARMSA
+  MCI_ANIM_OPEN_PARMSW* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCWSTR
+    lpstrElementName*: LPCWSTR
+    lpstrAlias*: LPCWSTR
+    dwStyle*: DWORD
+    hWndParent*: HWND
+
+  PMCI_ANIM_OPEN_PARMSW* = ptr MCI_ANIM_OPEN_PARMSW
+  LPMCI_ANIM_OPEN_PARMSW* = ptr MCI_ANIM_OPEN_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_ANIM_OPEN_PARMS* = MCI_ANIM_OPEN_PARMSW
+    PMCI_ANIM_OPEN_PARMS* = PMCI_ANIM_OPEN_PARMSW
+    LPMCI_ANIM_OPEN_PARMS* = LPMCI_ANIM_OPEN_PARMSW
+else:
+  type
+    MCI_ANIM_OPEN_PARMS* = MCI_ANIM_OPEN_PARMSA
+    PMCI_ANIM_OPEN_PARMS* = PMCI_ANIM_OPEN_PARMSA
+    LPMCI_ANIM_OPEN_PARMS* = LPMCI_ANIM_OPEN_PARMSA
+type
+  TMCI_ANIM_OPEN_PARMS* = MCI_ANIM_OPEN_PARMS
+  MCI_ANIM_WINDOW_PARMSW* = record
+    dwCallback*: DWORD
+    hWnd*: HWND
+    nCmdShow*: UINT
+    lpstrText*: LPCWSTR
+
+  PMCI_ANIM_WINDOW_PARMSW* = ptr MCI_ANIM_WINDOW_PARMSW
+  LPMCI_ANIM_WINDOW_PARMSW* = ptr MCI_ANIM_WINDOW_PARMSW
+  TMCI_ANIM_WINDOW_PARMSW* = MCI_ANIM_WINDOW_PARMSW
+  MCI_ANIM_STEP_PARMS* = record
+    dwCallback*: DWORD
+    dwFrames*: DWORD
+
+  PMCI_ANIM_STEP_PARMS* = ptr MCI_ANIM_STEP_PARMS
+  LPMCI_ANIM_STEP_PARMS* = ptr MCI_ANIM_STEP_PARMS
+  TMCI_ANIM_STEP_PARMS* = MCI_ANIM_STEP_PARMS
+  MCI_ANIM_WINDOW_PARMSA* = record
+    dwCallback*: DWORD
+    hWnd*: HWND
+    nCmdShow*: UINT
+    lpstrText*: LPCSTR
+
+  PMCI_ANIM_WINDOW_PARMSA* = ptr MCI_ANIM_WINDOW_PARMSA
+  LPMCI_ANIM_WINDOW_PARMSA* = ptr MCI_ANIM_WINDOW_PARMSA
+  TMCI_ANIM_WINDOW_PARMSA* = MCI_ANIM_WINDOW_PARMSA
+  MCI_ANIM_PLAY_PARMS* = record
+    dwCallback*: DWORD
+    dwFrom*: DWORD
+    dwTo*: DWORD
+    dwSpeed*: DWORD
+
+  PMCI_ANIM_PLAY_PARMS* = ptr MCI_ANIM_PLAY_PARMS
+  LPMCI_ANIM_PLAY_PARMS* = ptr MCI_ANIM_PLAY_PARMS
+
+when defined(UNICODE):
+  type
+    MCI_ANIM_WINDOW_PARMS* = MCI_ANIM_WINDOW_PARMSW
+    PMCI_ANIM_WINDOW_PARMS* = PMCI_ANIM_WINDOW_PARMSW
+    LPMCI_ANIM_WINDOW_PARMS* = LPMCI_ANIM_WINDOW_PARMSW
+else:
+  type
+    MCI_ANIM_WINDOW_PARMS* = MCI_ANIM_WINDOW_PARMSA
+    PMCI_ANIM_WINDOW_PARMS* = PMCI_ANIM_WINDOW_PARMSA
+    LPMCI_ANIM_WINDOW_PARMS* = LPMCI_ANIM_WINDOW_PARMSA
+type
+  MCI_ANIM_RECT_PARMS* = record
+    dwCallback*: DWORD
+    rc*: TRECT
+
+  PMCI_ANIM_RECT_PARMS* = ptr MCI_ANIM_RECT_PARMS
+  LPMCI_ANIM_RECT_PARMS* = ptr MCI_ANIM_RECT_PARMS
+  TMCI_ANIM_RECT_PARMS* = MCI_ANIM_RECT_PARMS
+  MCI_ANIM_UPDATE_PARMS* = record
+    dwCallback*: DWORD
+    rc*: TRECT
+    hDC*: HDC
+
+  PMCI_ANIM_UPDATE_PARMS* = ptr MCI_ANIM_UPDATE_PARMS
+  LPMCI_ANIM_UPDATE_PARMS* = ptr MCI_ANIM_UPDATE_PARMS
+  TMCI_ANIM_UPDATE_PARMS* = MCI_ANIM_UPDATE_PARMS
+  MCI_OVLY_OPEN_PARMSA* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCSTR
+    lpstrElementName*: LPCSTR
+    lpstrAlias*: LPCSTR
+    dwStyle*: DWORD
+    hWndParent*: HWND
+
+  PMCI_OVLY_OPEN_PARMSA* = ptr MCI_OVLY_OPEN_PARMSA
+  LPMCI_OVLY_OPEN_PARMSA* = ptr MCI_OVLY_OPEN_PARMSA
+  TMCI_OVLY_OPEN_PARMSA* = MCI_OVLY_OPEN_PARMSA
+  MCI_OVLY_OPEN_PARMSW* = record
+    dwCallback*: DWORD
+    wDeviceID*: MCIDEVICEID
+    lpstrDeviceType*: LPCWSTR
+    lpstrElementName*: LPCWSTR
+    lpstrAlias*: LPCWSTR
+    dwStyle*: DWORD
+    hWndParent*: HWND
+
+  PMCI_OVLY_OPEN_PARMSW* = ptr MCI_OVLY_OPEN_PARMSW
+  LPMCI_OVLY_OPEN_PARMSW* = ptr MCI_OVLY_OPEN_PARMSW
+  TMCI_OVLY_OPEN_PARMSW* = MCI_OVLY_OPEN_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_OVLY_OPEN_PARMS* = MCI_OVLY_OPEN_PARMSW
+    PMCI_OVLY_OPEN_PARMS* = PMCI_OVLY_OPEN_PARMSW
+    LPMCI_OVLY_OPEN_PARMS* = LPMCI_OVLY_OPEN_PARMSW
+else:
+  type
+    MCI_OVLY_OPEN_PARMS* = MCI_OVLY_OPEN_PARMSA
+    PMCI_OVLY_OPEN_PARMS* = PMCI_OVLY_OPEN_PARMSA
+    LPMCI_OVLY_OPEN_PARMS* = LPMCI_OVLY_OPEN_PARMSA
+type
+  TMCI_OVLY_OPEN_PARMS* = MCI_OVLY_OPEN_PARMS
+  MCI_OVLY_WINDOW_PARMSA* = record
+    dwCallback*: DWORD
+    hWnd*: HWND
+    nCmdShow*: UINT
+    lpstrText*: LPCSTR
+
+  PMCI_OVLY_WINDOW_PARMSA* = ptr MCI_OVLY_WINDOW_PARMSA
+  LPMCI_OVLY_WINDOW_PARMSA* = ptr MCI_OVLY_WINDOW_PARMSA
+  TMCI_OVLY_WINDOW_PARMSA* = MCI_OVLY_WINDOW_PARMSA
+  MCI_OVLY_WINDOW_PARMSW* = record
+    dwCallback*: DWORD
+    hWnd*: HWND
+    nCmdShow*: UINT
+    lpstrText*: LPCWSTR
+
+  PMCI_OVLY_WINDOW_PARMSW* = ptr MCI_OVLY_WINDOW_PARMSW
+  LPMCI_OVLY_WINDOW_PARMSW* = ptr MCI_OVLY_WINDOW_PARMSW
+  TMCI_OVLY_WINDOW_PARMSW* = MCI_OVLY_WINDOW_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_OVLY_WINDOW_PARMS* = MCI_OVLY_WINDOW_PARMSW
+    PMCI_OVLY_WINDOW_PARMS* = PMCI_OVLY_WINDOW_PARMSW
+    LPMCI_OVLY_WINDOW_PARMS* = LPMCI_OVLY_WINDOW_PARMSW
+else:
+  type
+    MCI_OVLY_WINDOW_PARMS* = MCI_OVLY_WINDOW_PARMSA
+    PMCI_OVLY_WINDOW_PARMS* = PMCI_OVLY_WINDOW_PARMSA
+    LPMCI_OVLY_WINDOW_PARMS* = LPMCI_OVLY_WINDOW_PARMSA
+type
+  TMCI_OVLY_WINDOW_PARMS* = MCI_OVLY_WINDOW_PARMSW
+  MCI_OVLY_RECT_PARMS* = record
+    dwCallback*: DWORD
+    rc*: TRECT
+
+  PMCI_OVLY_RECT_PARMS* = ptr MCI_OVLY_RECT_PARMS
+  LPMCI_OVLY_RECT_PARMS* = ptr MCI_OVLY_RECT_PARMS
+  TMCI_OVLY_RECT_PARMS* = MCI_OVLY_RECT_PARMS
+  MCI_OVLY_SAVE_PARMSA* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCSTR
+    rc*: TRECT
+
+  PMCI_OVLY_SAVE_PARMSA* = ptr MCI_OVLY_SAVE_PARMSA
+  LPMCI_OVLY_SAVE_PARMSA* = ptr MCI_OVLY_SAVE_PARMSA
+  TMCI_OVLY_SAVE_PARMSA* = MCI_OVLY_SAVE_PARMSA
+  MCI_OVLY_SAVE_PARMSW* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCWSTR
+    rc*: TRECT
+
+  PMCI_OVLY_SAVE_PARMSW* = ptr MCI_OVLY_SAVE_PARMSW
+  LPMCI_OVLY_SAVE_PARMSW* = ptr MCI_OVLY_SAVE_PARMSW
+  TMCI_OVLY_SAVE_PARMSW* = MCI_OVLY_SAVE_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_OVLY_SAVE_PARMS* = MCI_OVLY_SAVE_PARMSW
+    PMCI_OVLY_SAVE_PARMS* = PMCI_OVLY_SAVE_PARMSW
+    LPMCI_OVLY_SAVE_PARMS* = LPMCI_OVLY_SAVE_PARMSW
+else:
+  type
+    MCI_OVLY_SAVE_PARMS* = MCI_OVLY_SAVE_PARMSA
+    PMCI_OVLY_SAVE_PARMS* = PMCI_OVLY_SAVE_PARMSA
+    LPMCI_OVLY_SAVE_PARMS* = LPMCI_OVLY_SAVE_PARMSA
+type
+  TMCI_OVLY_SAVE_PARMS* = MCI_OVLY_SAVE_PARMS
+  MCI_OVLY_LOAD_PARMSA* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCSTR
+    rc*: TRECT
+
+  PMCI_OVLY_LOAD_PARMSA* = ptr MCI_OVLY_LOAD_PARMSA
+  LPMCI_OVLY_LOAD_PARMSA* = ptr MCI_OVLY_LOAD_PARMSA
+  TMCI_OVLY_LOAD_PARMSA* = MCI_OVLY_LOAD_PARMSA
+  MCI_OVLY_LOAD_PARMSW* = record
+    dwCallback*: DWORD
+    lpfilename*: LPCWSTR
+    rc*: TRECT
+
+  PMCI_OVLY_LOAD_PARMSW* = ptr MCI_OVLY_LOAD_PARMSW
+  LPMCI_OVLY_LOAD_PARMSW* = ptr MCI_OVLY_LOAD_PARMSW
+  TMCI_OVLY_LOAD_PARMSW* = MCI_OVLY_LOAD_PARMSW
+
+when defined(UNICODE):
+  type
+    MCI_OVLY_LOAD_PARMS* = MCI_OVLY_LOAD_PARMSW
+    PMCI_OVLY_LOAD_PARMS* = PMCI_OVLY_LOAD_PARMSW
+    LPMCI_OVLY_LOAD_PARMS* = LPMCI_OVLY_LOAD_PARMSW
+else:
+  type
+    MCI_OVLY_LOAD_PARMS* = MCI_OVLY_LOAD_PARMSA
+    PMCI_OVLY_LOAD_PARMS* = PMCI_OVLY_LOAD_PARMSA
+    LPMCI_OVLY_LOAD_PARMS* = LPMCI_OVLY_LOAD_PARMSA
+type
+  TMCI_OVLY_LOAD_PARMS* = MCI_OVLY_LOAD_PARMS
+
+type
+  pcmwaveformat_tag* = PCMWAVEFORMAT
+
+proc mmioStringToFOURCCA*(x1: LPCSTR, x2: UINT): FOURCC{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioStringToFOURCCA".}
+proc mmioStringToFOURCCW*(x1: LPCWSTR, x2: UINT): FOURCC{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioStringToFOURCCW".}
+proc mmioStringToFOURCC*(x1: cstring, x2: UINT): FOURCC{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioStringToFOURCCA".}
+proc mmioInstallIOProcA*(x1: FOURCC, x2: LPMMIOPROC, x3: DWORD): LPMMIOPROC{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioInstallIOProcA".}
+proc mmioInstallIOProcW*(x1: FOURCC, x2: LPMMIOPROC, x3: DWORD): LPMMIOPROC{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioInstallIOProcW".}
+proc mmioInstallIOProc*(x1: FOURCC, x2: LPMMIOPROC, x3: DWORD): LPMMIOPROC{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioInstallIOProcA".}
+proc mmioOpenA*(x1: LPSTR, x2: LPMMIOINFO, x3: DWORD): HMMIO{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioOpenA".}
+proc mmioOpenW*(x1: LPWSTR, x2: LPMMIOINFO, x3: DWORD): HMMIO{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioOpenW".}
+proc mmioOpen*(x1: cstring, x2: LPMMIOINFO, x3: DWORD): HMMIO{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioOpenA".}
+proc mmioRenameA*(x1: LPCSTR, x2: LPCSTR, x3: LPCMMIOINFO, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioRenameA".}
+proc mmioRenameW*(x1: LPCWSTR, x2: LPCWSTR, x3: LPCMMIOINFO, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioRenameW".}
+proc mmioRename*(x1: cstring, x2: cstring, x3: LPCMMIOINFO, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioRenameA".}
+proc mmioClose*(x1: HMMIO, x2: UINT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "mmioClose".}
+proc mmioRead*(x1: HMMIO, x2: HPSTR, x3: LONG): LONG{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioRead".}
+proc mmioWrite*(x1: HMMIO, x2: cstring, x3: LONG): LONG{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioWrite".}
+proc mmioSeek*(x1: HMMIO, x2: LONG, x3: WINT): LONG{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioSeek".}
+proc mmioGetInfo*(x1: HMMIO, x2: LPMMIOINFO, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioGetInfo".}
+proc mmioSetInfo*(x1: HMMIO, x2: LPCMMIOINFO, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioSetInfo".}
+proc mmioSetBuffer*(x1: HMMIO, x2: LPSTR, x3: LONG, x4: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioSetBuffer".}
+proc mmioFlush*(x1: HMMIO, x2: UINT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "mmioFlush".}
+proc mmioAdvance*(x1: HMMIO, x2: LPMMIOINFO, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioAdvance".}
+proc mmioSendMessage*(x1: HMMIO, x2: UINT, x3: LPARAM, x4: LPARAM): LRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioSendMessage".}
+proc mmioDescend*(x1: HMMIO, x2: LPMMCKINFO, x3: PMMCKINFO, x4: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mmioDescend".}
+proc mmioAscend*(x1: HMMIO, x2: LPMMCKINFO, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioAscend".}
+proc mmioCreateChunk*(x1: HMMIO, x2: LPMMCKINFO, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mmioCreateChunk".}
+proc mciSendCommandA*(x1: MCIDEVICEID, x2: UINT, x3: DWORD, x4: DWORD): MCIERROR{.
+    stdcall, dynlib: "winmm.dll", importc: "mciSendCommandA".}
+proc mciSendCommandW*(x1: MCIDEVICEID, x2: UINT, x3: DWORD, x4: DWORD): MCIERROR{.
+    stdcall, dynlib: "winmm.dll", importc: "mciSendCommandW".}
+proc mciSendCommand*(x1: MCIDEVICEID, x2: UINT, x3: DWORD, x4: DWORD): MCIERROR{.
+    stdcall, dynlib: "winmm.dll", importc: "mciSendCommandA".}
+proc mciSendStringA*(x1: LPCSTR, x2: LPSTR, x3: UINT, x4: HWND): MCIERROR{.
+    stdcall, dynlib: "winmm.dll", importc: "mciSendStringA".}
+proc mciSendStringW*(x1: LPCWSTR, x2: LPWSTR, x3: UINT, x4: HWND): MCIERROR{.
+    stdcall, dynlib: "winmm.dll", importc: "mciSendStringW".}
+proc mciSendString*(x1: cstring, x2: cstring, x3: UINT, x4: HWND): MCIERROR{.
+    stdcall, dynlib: "winmm.dll", importc: "mciSendStringA".}
+proc mciGetDeviceIDA*(x1: LPCSTR): MCIDEVICEID{.stdcall, dynlib: "winmm.dll",
+    importc: "mciGetDeviceIDA".}
+proc mciGetDeviceIDW*(x1: LPCWSTR): MCIDEVICEID{.stdcall, dynlib: "winmm.dll",
+    importc: "mciGetDeviceIDW".}
+proc mciGetDeviceID*(x1: cstring): MCIDEVICEID{.stdcall, dynlib: "winmm.dll",
+    importc: "mciGetDeviceIDA".}
+proc mciGetDeviceIDFromElementIDA*(x1: DWORD, x2: LPCSTR): MCIDEVICEID{.stdcall,
+    dynlib: "winmm.dll", importc: "mciGetDeviceIDFromElementIDA".}
+proc mciGetDeviceIDFromElementIDW*(x1: DWORD, x2: LPCWSTR): MCIDEVICEID{.
+    stdcall, dynlib: "winmm.dll", importc: "mciGetDeviceIDFromElementIDW".}
+proc mciGetDeviceIDFromElementID*(x1: DWORD, x2: cstring): MCIDEVICEID{.stdcall,
+    dynlib: "winmm.dll", importc: "mciGetDeviceIDFromElementIDA".}
+proc mciGetErrorStringA*(x1: MCIERROR, x2: LPSTR, x3: UINT): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "mciGetErrorStringA".}
+proc mciGetErrorStringW*(x1: MCIERROR, x2: LPWSTR, x3: UINT): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "mciGetErrorStringW".}
+proc mciGetErrorString*(x1: MCIERROR, x2: cstring, x3: UINT): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "mciGetErrorStringA".}
+proc mciSetYieldProc*(x1: MCIDEVICEID, x2: YIELDPROC, x3: DWORD): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "mciSetYieldProc".}
+proc mciGetCreatorTask*(x1: MCIDEVICEID): HTASK{.stdcall, dynlib: "winmm.dll",
+    importc: "mciGetCreatorTask".}
+proc mciGetYieldProc*(x1: MCIDEVICEID, x2: LPDWORD): YIELDPROC{.stdcall,
+    dynlib: "winmm.dll", importc: "mciGetYieldProc".}
+proc mciExecute*(x1: LPCSTR): BOOL{.stdcall, dynlib: "winmm.dll",
+                                    importc: "mciExecute".}
+proc joyGetPos*(x1: UINT, x2: LPJOYINFO): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joyGetPos".}
+proc joyGetPosEx*(x1: UINT, x2: LPJOYINFOEX): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joyGetPosEx".}
+proc joyGetThreshold*(x1: UINT, x2: LPUINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joyGetThreshold".}
+proc joyReleaseCapture*(x1: UINT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "joyReleaseCapture".}
+proc joySetCapture*(x1: HWND, x2: UINT, x3: UINT, x4: BOOL): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joySetCapture".}
+proc joySetThreshold*(x1: UINT, x2: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joySetThreshold".}
+proc waveOutGetNumDevs*(): UINT{.stdcall, dynlib: "winmm.dll",
+                                 importc: "waveOutGetNumDevs".}
+proc waveOutGetDevCapsA*(x1: UINT, x2: LPWAVEOUTCAPSA, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutGetDevCapsA".}
+proc waveOutGetDevCapsW*(x1: UINT, x2: LPWAVEOUTCAPSW, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutGetDevCapsW".}
+proc waveOutGetDevCaps*(x1: UINT, x2: LPWAVEOUTCAPS, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutGetDevCapsA".}
+proc waveOutGetVolume*(x1: HWAVEOUT, x2: LPDWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutGetVolume".}
+proc waveOutSetVolume*(x1: HWAVEOUT, x2: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutSetVolume".}
+proc waveOutGetErrorTextA*(x1: MMRESULT, x2: LPSTR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutGetErrorTextA".}
+proc waveOutGetErrorTextW*(x1: MMRESULT, x2: LPWSTR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutGetErrorTextW".}
+proc waveOutGetErrorText*(x1: MMRESULT, x2: cstring, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutGetErrorTextA".}
+proc waveOutOpen*(x1: LPHWAVEOUT, x2: UINT, x3: LPCWAVEFORMATEX, x4: DWORD,
+                  x5: DWORD, x6: DWORD): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveOutOpen".}
+proc waveOutClose*(x1: HWAVEOUT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveOutClose".}
+proc waveOutPrepareHeader*(x1: HWAVEOUT, x2: LPWAVEHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutPrepareHeader".}
+proc waveOutUnprepareHeader*(x1: HWAVEOUT, x2: LPWAVEHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutUnprepareHeader".}
+proc waveOutWrite*(x1: HWAVEOUT, x2: LPWAVEHDR, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutWrite".}
+proc waveOutPause*(x1: HWAVEOUT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveOutPause".}
+proc waveOutRestart*(x1: HWAVEOUT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveOutRestart".}
+proc waveOutReset*(x1: HWAVEOUT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveOutReset".}
+proc waveOutBreakLoop*(x1: HWAVEOUT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveOutBreakLoop".}
+proc waveOutGetPosition*(x1: HWAVEOUT, x2: LPMMTIME, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutGetPosition".}
+proc waveOutGetPitch*(x1: HWAVEOUT, x2: LPDWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutGetPitch".}
+proc waveOutSetPitch*(x1: HWAVEOUT, x2: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutSetPitch".}
+proc waveOutGetPlaybackRate*(x1: HWAVEOUT, x2: LPDWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutGetPlaybackRate".}
+proc waveOutSetPlaybackRate*(x1: HWAVEOUT, x2: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutSetPlaybackRate".}
+proc waveOutGetID*(x1: HWAVEOUT, x2: LPUINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveOutGetID".}
+proc waveOutMessage*(x1: HWAVEOUT, x2: UINT, x3: DWORD, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveOutMessage".}
+proc waveInGetNumDevs*(): UINT{.stdcall, dynlib: "winmm.dll",
+                                importc: "waveInGetNumDevs".}
+proc waveInGetDevCapsA*(x1: UINT, x2: LPWAVEINCAPSA, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveInGetDevCapsA".}
+proc waveInGetDevCapsW*(x1: UINT, x2: LPWAVEINCAPSW, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveInGetDevCapsW".}
+proc waveInGetDevCaps*(x1: UINT, x2: LPWAVEINCAPS, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveInGetDevCapsA".}
+proc waveInGetErrorTextA*(x1: MMRESULT, x2: LPSTR, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveInGetErrorTextA".}
+proc waveInGetErrorTextW*(x1: MMRESULT, x2: LPWSTR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveInGetErrorTextW".}
+proc waveInGetErrorText*(x1: MMRESULT, x2: cstring, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveInGetErrorTextA".}
+proc waveInOpen*(x1: LPHWAVEIN, x2: UINT, x3: LPCWAVEFORMATEX, x4: DWORD,
+                 x5: DWORD, x6: DWORD): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveInOpen".}
+proc waveInClose*(x1: HWAVEIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveInClose".}
+proc waveInPrepareHeader*(x1: HWAVEIN, x2: LPWAVEHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveInPrepareHeader".}
+proc waveInUnprepareHeader*(x1: HWAVEIN, x2: LPWAVEHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveInUnprepareHeader".}
+proc waveInAddBuffer*(x1: HWAVEIN, x2: LPWAVEHDR, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveInAddBuffer".}
+proc waveInStart*(x1: HWAVEIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveInStart".}
+proc waveInStop*(x1: HWAVEIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveInStop".}
+proc waveInReset*(x1: HWAVEIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "waveInReset".}
+proc waveInGetPosition*(x1: HWAVEIN, x2: LPMMTIME, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveInGetPosition".}
+proc waveInGetID*(x1: HWAVEIN, x2: LPUINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "waveInGetID".}
+proc waveInMessage*(x1: HWAVEIN, x2: UINT, x3: DWORD, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "waveInMessage".}
+proc mixerGetLineControlsA*(x1: HMIXEROBJ, x2: LPMIXERLINECONTROLSA, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerGetLineControlsA".}
+proc mixerGetLineControlsW*(x1: HMIXEROBJ, x2: LPMIXERLINECONTROLSW, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerGetLineControlsW".}
+proc mixerGetLineControls*(x1: HMIXEROBJ, x2: LPMIXERLINECONTROLS, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerGetLineControlsA".}
+proc joyGetNumDevs*(): UINT{.stdcall, dynlib: "winmm.dll",
+                             importc: "joyGetNumDevs".}
+proc joyGetDevCapsA*(x1: UINT, x2: LPJOYCAPSA, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joyGetDevCapsA".}
+proc joyGetDevCapsW*(x1: UINT, x2: LPJOYCAPSW, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joyGetDevCapsW".}
+proc joyGetDevCaps*(x1: UINT, x2: LPJOYCAPS, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "joyGetDevCapsA".}
+proc mixerGetControlDetailsA*(x1: HMIXEROBJ, x2: LPMIXERCONTROLDETAILS,
+                              x3: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mixerGetControlDetailsA".}
+proc mixerGetControlDetailsW*(x1: HMIXEROBJ, x2: LPMIXERCONTROLDETAILS,
+                              x3: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mixerGetControlDetailsW".}
+proc mixerGetControlDetails*(x1: HMIXEROBJ, x2: LPMIXERCONTROLDETAILS, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerGetControlDetailsA".}
+proc timeGetSystemTime*(x1: LPMMTIME, x2: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "timeGetSystemTime".}
+proc timeGetTime*(): DWORD{.stdcall, dynlib: "winmm.dll", importc: "timeGetTime".}
+proc timeSetEvent*(x1: UINT, x2: UINT, x3: LPTIMECALLBACK, x4: DWORD, x5: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "timeSetEvent".}
+proc timeKillEvent*(x1: UINT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "timeKillEvent".}
+proc timeGetDevCaps*(x1: LPTIMECAPS, x2: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "timeGetDevCaps".}
+proc timeBeginPeriod*(x1: UINT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "timeBeginPeriod".}
+proc timeEndPeriod*(x1: UINT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "timeEndPeriod".}
+proc mixerGetDevCapsA*(x1: UINT, x2: LPMIXERCAPSA, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mixerGetDevCapsA".}
+proc mixerGetDevCapsW*(x1: UINT, x2: LPMIXERCAPSW, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mixerGetDevCapsW".}
+proc mixerGetDevCaps*(x1: UINT, x2: LPMIXERCAPS, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mixerGetDevCapsA".}
+proc mixerOpen*(x1: LPHMIXER, x2: UINT, x3: DWORD, x4: DWORD, x5: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerOpen".}
+proc mixerClose*(x1: HMIXER): MMRESULT{.stdcall, dynlib: "winmm.dll",
+                                        importc: "mixerClose".}
+proc mixerMessage*(x1: HMIXER, x2: UINT, x3: DWORD, x4: DWORD): DWORD{.stdcall,
+    dynlib: "winmm.dll", importc: "mixerMessage".}
+proc auxGetNumDevs*(): UINT{.stdcall, dynlib: "winmm.dll",
+                             importc: "auxGetNumDevs".}
+proc auxGetDevCapsA*(x1: UINT, x2: LPAUXCAPSA, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "auxGetDevCapsA".}
+proc auxGetDevCapsW*(x1: UINT, x2: LPAUXCAPSW, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "auxGetDevCapsW".}
+proc auxGetDevCaps*(x1: UINT, x2: LPAUXCAPS, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "auxGetDevCapsA".}
+proc auxSetVolume*(x1: UINT, x2: DWORD): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "auxSetVolume".}
+proc auxGetVolume*(x1: UINT, x2: LPDWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "auxGetVolume".}
+proc auxOutMessage*(x1: UINT, x2: UINT, x3: DWORD, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "auxOutMessage".}
+proc midiOutGetNumDevs*(): UINT{.stdcall, dynlib: "winmm.dll",
+                                 importc: "midiOutGetNumDevs".}
+proc midiStreamOpen*(x1: LPHMIDISTRM, x2: LPUINT, x3: DWORD, x4: DWORD,
+                     x5: DWORD, x6: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiStreamOpen".}
+proc midiStreamClose*(x1: HMIDISTRM): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiStreamClose".}
+proc midiStreamProperty*(x1: HMIDISTRM, x2: LPBYTE, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiStreamProperty".}
+proc midiStreamPosition*(x1: HMIDISTRM, x2: LPMMTIME, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiStreamPosition".}
+proc midiStreamOut*(x1: HMIDISTRM, x2: LPMIDIHDR, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiStreamOut".}
+proc midiStreamPause*(x1: HMIDISTRM): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiStreamPause".}
+proc midiStreamRestart*(x1: HMIDISTRM): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiStreamRestart".}
+proc midiStreamStop*(x1: HMIDISTRM): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiStreamStop".}
+proc midiConnect*(x1: HMIDI, x2: HMIDIOUT, x3: pointer): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiConnect".}
+proc midiDisconnect*(x1: HMIDI, x2: HMIDIOUT, x3: pointer): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiDisconnect".}
+proc midiOutGetDevCapsA*(x1: UINT, x2: LPMIDIOUTCAPSA, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutGetDevCapsA".}
+proc midiOutGetDevCapsW*(x1: UINT, x2: LPMIDIOUTCAPSW, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutGetDevCapsW".}
+proc midiOutGetDevCaps*(x1: UINT, x2: LPMIDIOUTCAPS, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutGetDevCapsA".}
+proc midiOutGetVolume*(x1: HMIDIOUT, x2: LPDWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiOutGetVolume".}
+proc midiOutSetVolume*(x1: HMIDIOUT, x2: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiOutSetVolume".}
+proc midiOutGetErrorTextA*(x1: MMRESULT, x2: LPSTR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutGetErrorTextA".}
+proc midiOutGetErrorTextW*(x1: MMRESULT, x2: LPWSTR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutGetErrorTextW".}
+proc midiOutGetErrorText*(x1: MMRESULT, x2: cstring, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutGetErrorTextA".}
+proc midiOutOpen*(x1: LPHMIDIOUT, x2: UINT, x3: DWORD, x4: DWORD, x5: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutOpen".}
+proc midiOutClose*(x1: HMIDIOUT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiOutClose".}
+proc midiOutPrepareHeader*(x1: HMIDIOUT, x2: LPMIDIHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutPrepareHeader".}
+proc midiOutUnprepareHeader*(x1: HMIDIOUT, x2: LPMIDIHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutUnprepareHeader".}
+proc midiOutShortMsg*(x1: HMIDIOUT, x2: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiOutShortMsg".}
+proc midiOutLongMsg*(x1: HMIDIOUT, x2: LPMIDIHDR, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiOutLongMsg".}
+proc midiOutReset*(x1: HMIDIOUT): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiOutReset".}
+proc midiOutCachePatches*(x1: HMIDIOUT, x2: UINT, x3: LPWORD, x4: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutCachePatches".}
+proc midiOutCacheDrumPatches*(x1: HMIDIOUT, x2: UINT, x3: LPWORD, x4: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutCacheDrumPatches".}
+proc midiOutGetID*(x1: HMIDIOUT, x2: LPUINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiOutGetID".}
+proc midiOutMessage*(x1: HMIDIOUT, x2: UINT, x3: DWORD, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiOutMessage".}
+proc midiInGetNumDevs*(): UINT{.stdcall, dynlib: "winmm.dll",
+                                importc: "midiInGetNumDevs".}
+proc midiInGetDevCapsA*(x1: UINT, x2: LPMIDIINCAPSA, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInGetDevCapsA".}
+proc midiInGetDevCapsW*(x1: UINT, x2: LPMIDIINCAPSW, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInGetDevCapsW".}
+proc midiInGetDevCaps*(x1: UINT, x2: LPMIDIINCAPS, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiInGetDevCapsA".}
+proc midiInGetErrorTextA*(x1: MMRESULT, x2: LPSTR, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiInGetErrorTextA".}
+proc midiInGetErrorTextW*(x1: MMRESULT, x2: LPWSTR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInGetErrorTextW".}
+proc midiInGetErrorText*(x1: MMRESULT, x2: cstring, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInGetErrorTextA".}
+proc midiInOpen*(x1: LPHMIDIIN, x2: UINT, x3: DWORD, x4: DWORD, x5: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInOpen".}
+proc midiInClose*(x1: HMIDIIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiInClose".}
+proc midiInPrepareHeader*(x1: HMIDIIN, x2: LPMIDIHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInPrepareHeader".}
+proc midiInUnprepareHeader*(x1: HMIDIIN, x2: LPMIDIHDR, x3: UINT): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInUnprepareHeader".}
+proc midiInAddBuffer*(x1: HMIDIIN, x2: LPMIDIHDR, x3: UINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiInAddBuffer".}
+proc midiInStart*(x1: HMIDIIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiInStart".}
+proc midiInStop*(x1: HMIDIIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiInStop".}
+proc midiInReset*(x1: HMIDIIN): MMRESULT{.stdcall, dynlib: "winmm.dll",
+    importc: "midiInReset".}
+proc midiInGetID*(x1: HMIDIIN, x2: LPUINT): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "midiInGetID".}
+proc midiInMessage*(x1: HMIDIIN, x2: UINT, x3: DWORD, x4: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "midiInMessage".}
+proc mixerGetLineInfoA*(x1: HMIXEROBJ, x2: LPMIXERLINEA, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerGetLineInfoA".}
+proc mixerGetLineInfoW*(x1: HMIXEROBJ, x2: LPMIXERLINEW, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerGetLineInfoW".}
+proc mixerGetLineInfo*(x1: HMIXEROBJ, x2: LPMIXERLINE, x3: DWORD): MMRESULT{.
+    stdcall, dynlib: "winmm.dll", importc: "mixerGetLineInfoA".}
+proc mixerGetID*(x1: HMIXEROBJ, x2: var UINT, x3: DWORD): MMRESULT{.stdcall,
+    dynlib: "winmm.dll", importc: "mixerGetID".}
+proc PlaySoundA*(x1: LPCSTR, x2: HMODULE, x3: DWORD): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "PlaySoundA".}
+proc PlaySoundW*(x1: LPCWSTR, x2: HMODULE, x3: DWORD): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "PlaySoundW".}
+proc PlaySound*(x1: cstring, x2: HMODULE, x3: DWORD): BOOL{.stdcall,
+    dynlib: "winmm.dll", importc: "PlaySoundA".}
+# implementation
+
+proc MEVT_EVENTTYPE(x: int8): int8 =
+  result = (x shr 24) And 0x000000FF
+
+proc MEVT_EVENTPARM(x: DWORD): DWORD =
+  result = x And 0x00FFFFFF
+
+type
+  TFourBytes = array[0..3, int8]
+
+proc MCI_MSF_MINUTE(msf: int32): int8 =
+  result = msf and 0xff
+
+proc MCI_TMSF_TRACK(tmsf: int32): int8 =
+  result = tmsf and 0xff
+
+proc MCI_HMS_HOUR(h: int32): int8 =
+  result = h and 0xff
+
+proc MCI_MSF_SECOND(msf: int32): int8 =
+  result = msf shr 8 and 0xff
+
+proc MCI_TMSF_MINUTE(tmsf: int32): int8 =
+  result = tmsf shr 8 and 0xff
+
+proc MCI_HMS_MINUTE(h: int32): int8 =
+  result = h shr 8 and 0xff
+
+proc MCI_MSF_FRAME(msf: int32): int8 =
+  result = msf shr 16 and 0xff
+
+proc MCI_TMSF_SECOND(tmsf: int32): int8 =
+  result = tmsf shr 16 and 0xff
+
+proc MCI_HMS_SECOND(h: int32): int8 =
+  result = h shr 16 and 0xff
+
+proc MCI_MAKE_MSF(m, s, f: int8): int32 =
+  result = m or s shl 8 or f shl 16
+
+proc MCI_MAKE_HMS(h, m, s: int8): int32 =
+  result = h or m shl 8 or s shl 16
+
+proc MCI_TMSF_FRAME(tmsf: int32): int8 =
+  result = tmsf shr 24 and 0xff
+
+proc mci_Make_TMSF(t, m, s, f: int8): int32 =
+  result = t or m shl 8 or s shl 16 or f shl 24
+
+proc DIBINDEX(n: int32): int32 =
+  result = n Or 0x000010FF shl 16