Index: Include/api_mmsys.sbp
===================================================================
--- Include/api_mmsys.sbp	(revision 1)
+++ Include/api_mmsys.sbp	(revision 75)
@@ -705,4 +705,683 @@
 
 
+'--------------------------------------------------------
+' Auxiliary audio support
+
+' device ID for aux device mapper
+Const AUX_MAPPER = (-1)
+
+' Auxiliary audio device capabilities structure
+Type AUXCAPSA
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As Char
+	wTechnology As Word
+	wReserved1 As Word
+	dwSupport As DWord
+End Type
+TypeDef PAUXCAPSA = *AUXCAPSA
+TypeDef NPAUXCAPSA = *AUXCAPSA
+TypeDef LPAUXCAPSA = *AUXCAPSA
+
+TypeDef AUXCAPS = AUXCAPSA
+TypeDef PAUXCAPS = PAUXCAPSA
+TypeDef NPAUXCAPS = NPAUXCAPSA
+TypeDef LPAUXCAPS = LPAUXCAPSA
+
+Const AUXCAPS_CDAUDIO = 1
+Const AUXCAPS_AUXIN = 2
+
+Const AUXCAPS_VOLUME = &H0001
+Const AUXCAPS_LRVOLUME = &H0002
+
+' auxiliary audio function prototypes
+Declare Function auxGetNumDevs Lib "winmm" () As DWord
+Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsA" (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
+Declare Function auxSetVolume Lib "winmm" (uDeviceID As DWord, dwVolume As DWord) As MMRESULT
+Declare Function auxGetVolume Lib "winmm" (uDeviceID As DWord, pdwVolume As *DWord) As MMRESULT
+Declare Function auxOutMessage Lib "winmm" (uDeviceID As DWord, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
+
+
+'--------------------------------------------------------
+' Mixer Support
+
+TypeDef HMIXEROBJ = VoidPtr
+TypeDef LPHMIXEROBJ = HMIXEROBJ
+TypeDef HMIXER = VoidPtr
+TypeDef LPHMIXER = *HMIXER
+
+Const MIXER_SHORT_NAME_CHARS = 16
+Const MIXER_LONG_NAME_CHARS = 64
+
+Const MIXERR_INVALLINE = (MIXERR_BASE + 0)
+Const MIXERR_INVALCONTROL = (MIXERR_BASE + 1)
+Const MIXERR_INVALVALUE = (MIXERR_BASE + 2)
+Const MIXERR_LASTERROR = (MIXERR_BASE + 2)
+
+Const MIXER_OBJECTF_HANDLE = &H80000000
+Const MIXER_OBJECTF_MIXER = &H00000000
+Const MIXER_OBJECTF_HMIXER = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIXER)
+Const MIXER_OBJECTF_WAVEOUT = &H10000000
+Const MIXER_OBJECTF_HWAVEOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEOUT)
+Const MIXER_OBJECTF_WAVEIN = &H20000000
+Const MIXER_OBJECTF_HWAVEIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEIN)
+Const MIXER_OBJECTF_MIDIOUT = &H30000000
+Const MIXER_OBJECTF_HMIDIOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIOUT)
+Const MIXER_OBJECTF_MIDIIN = &H40000000
+Const MIXER_OBJECTF_HMIDIIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIIN)
+Const MIXER_OBJECTF_AUX = &H50000000
+
+Declare Function mixerGetNumDevs Lib "winmm" () As DWord
+
+Type MIXERCAPSA
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As Char
+	fdwSupport As DWord
+	cDestinations As DWord
+End Type
+TypeDef PMIXERCAPSA = *MIXERCAPSA
+TypeDef LPMIXERCAPSA = *MIXERCAPSA
+
+TypeDef MIXERCAPS = MIXERCAPSA
+TypeDef PMIXERCAPS = PMIXERCAPSA
+TypeDef LPMIXERCAPS = LPMIXERCAPSA
+
+Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsA" (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
+Declare Function mixerOpen Lib "winmm" (phmx As *HMIXER, uMxId As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
+Declare Function mixerClose Lib "winmm" (hmx As HMIXER) As MMRESULT
+Declare Function mixerMessage Lib "winmm" (hmx As HMIXER, uMsg As DWord, dwParam1 As DWord, dwParam2 As DWord) As DWord
+
+Type TARGET
+	dwType As DWord
+	dwDeviceID As DWord
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As Char
+End Type
+
+Type MIXERLINEA
+	cbStruct As DWord
+	dwDestination As DWord
+	dwSource As DWord
+	dwLineID As DWord
+	fdwLine As DWord
+	dwUser As DWord
+	dwComponentType As DWord
+	cChannels As DWord
+	cConnections As DWord
+	cControls As DWord
+	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
+	Target As TARGET
+End Type
+TypeDef PMIXERLINEA = *MIXERLINEA
+TypeDef LPMIXERLINEA = *MIXERLINEA
+
+TypeDef MIXERLINE = MIXERLINEA
+TypeDef PMIXERLINE = PMIXERLINEA
+TypeDef LPMIXERLINE = LPMIXERLINEA
+
+' MIXERLINE.fdwLine
+Const MIXERLINE_LINEF_ACTIVE = &H00000001
+Const MIXERLINE_LINEF_DISCONNECTED = &H00008000
+Const MIXERLINE_LINEF_SOURCE = &H80000000
+
+' MIXERLINE.dwComponentType
+Const MIXERLINE_COMPONENTTYPE_DST_FIRST = &H00000000
+Const MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
+Const MIXERLINE_COMPONENTTYPE_DST_DIGITAL = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
+Const MIXERLINE_COMPONENTTYPE_DST_LINE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
+Const MIXERLINE_COMPONENTTYPE_DST_MONITOR = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
+Const MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
+Const MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
+Const MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
+Const MIXERLINE_COMPONENTTYPE_DST_WAVEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
+Const MIXERLINE_COMPONENTTYPE_DST_VOICEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
+Const MIXERLINE_COMPONENTTYPE_DST_LAST = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
+
+Const MIXERLINE_COMPONENTTYPE_SRC_FIRST = &H00001000
+Const MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
+Const MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
+Const MIXERLINE_COMPONENTTYPE_SRC_LINE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
+Const MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
+Const MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
+Const MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
+Const MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
+Const MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
+Const MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
+Const MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
+Const MIXERLINE_COMPONENTTYPE_SRC_ANALOG = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
+Const MIXERLINE_COMPONENTTYPE_SRC_LAST = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
+
+' MIXERLINE.Target.dwType
+Const MIXERLINE_TARGETTYPE_UNDEFINED = 0
+Const MIXERLINE_TARGETTYPE_WAVEOUT = 1
+Const MIXERLINE_TARGETTYPE_WAVEIN = 2
+Const MIXERLINE_TARGETTYPE_MIDIOUT = 3
+Const MIXERLINE_TARGETTYPE_MIDIIN = 4
+Const MIXERLINE_TARGETTYPE_AUX = 5
+
+Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoA" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
+
+Const MIXER_GETLINEINFOF_DESTINATION = &H00000000
+Const MIXER_GETLINEINFOF_SOURCE = &H00000001
+Const MIXER_GETLINEINFOF_LINEID = &H00000002
+Const MIXER_GETLINEINFOF_COMPONENTTYPE = &H00000003
+Const MIXER_GETLINEINFOF_TARGETTYPE = &H00000004
+Const MIXER_GETLINEINFOF_QUERYMASK = &H0000000F
+
+Declare Function mixerGetID Lib "winmm" (hmxobj As HMIXEROBJ, puMxId As *DWord, fdwId As DWord) As MMRESULT
+
+Type MIXERCONTROLA
+	cbStruct As DWord
+	dwControlID As DWord
+	dwControlType As DWord
+	fdwControl As DWord
+	cMultipleItems As DWord
+	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
+	Bounds[ELM(6)] As DWord
+	Metrics[ELM(6)] As DWord
+End Type
+TypeDef PMIXERCONTROLA = *MIXERCONTROLA
+TypeDef LPMIXERCONTROLA = *MIXERCONTROLA
+
+TypeDef MIXERCONTROL = MIXERCONTROLA
+TypeDef PMIXERCONTROL = PMIXERCONTROLA
+TypeDef LPMIXERCONTROL = LPMIXERCONTROLA
+
+' MIXERCONTROL.fdwControl
+Const MIXERCONTROL_CONTROLF_UNIFORM = &H00000001
+Const MIXERCONTROL_CONTROLF_MULTIPLE = &H00000002
+Const MIXERCONTROL_CONTROLF_DISABLED = &H80000000
+
+' MIXERCONTROL_CONTROLTYPE_xxx
+Const MIXERCONTROL_CT_CLASS_MASK = &HF0000000
+Const MIXERCONTROL_CT_CLASS_CUSTOM = &H00000000
+Const MIXERCONTROL_CT_CLASS_METER = &H10000000
+Const MIXERCONTROL_CT_CLASS_SWITCH = &H20000000
+Const MIXERCONTROL_CT_CLASS_NUMBER = &H30000000
+Const MIXERCONTROL_CT_CLASS_SLIDER = &H40000000
+Const MIXERCONTROL_CT_CLASS_FADER = &H50000000
+Const MIXERCONTROL_CT_CLASS_TIME = &H60000000
+Const MIXERCONTROL_CT_CLASS_LIST = &H70000000
+Const MIXERCONTROL_CT_SUBCLASS_MASK = &H0F000000
+Const MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = &H00000000
+Const MIXERCONTROL_CT_SC_SWITCH_BUTTON = &H01000000
+Const MIXERCONTROL_CT_SC_METER_POLLED = &H00000000
+Const MIXERCONTROL_CT_SC_TIME_MICROSECS = &H00000000
+Const MIXERCONTROL_CT_SC_TIME_MILLISECS = &H01000000
+Const MIXERCONTROL_CT_SC_LIST_SINGLE = &H00000000
+Const MIXERCONTROL_CT_SC_LIST_MULTIPLE = &H01000000
+Const MIXERCONTROL_CT_UNITS_MASK = &H00FF0000
+Const MIXERCONTROL_CT_UNITS_CUSTOM = &H00000000
+Const MIXERCONTROL_CT_UNITS_BOOLEAN = &H00010000
+Const MIXERCONTROL_CT_UNITS_SIGNED = &H00020000
+Const MIXERCONTROL_CT_UNITS_UNSIGNED = &H00030000
+Const MIXERCONTROL_CT_UNITS_DECIBELS = &H00040000
+Const MIXERCONTROL_CT_UNITS_PERCENT = &H00050000
+
+' MIXERCONTROL.dwControlType
+Const MIXERCONTROL_CONTROLTYPE_CUSTOM = (MIXERCONTROL_CT_CLASS_CUSTOM OR MIXERCONTROL_CT_UNITS_CUSTOM)
+Const MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_BOOLEAN)
+Const MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_SIGNED)
+Const MIXERCONTROL_CONTROLTYPE_PEAKMETER = (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
+Const MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_UNSIGNED)
+Const MIXERCONTROL_CONTROLTYPE_BOOLEAN = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BOOLEAN OR MIXERCONTROL_CT_UNITS_BOOLEAN)
+Const MIXERCONTROL_CONTROLTYPE_ONOFF = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
+Const MIXERCONTROL_CONTROLTYPE_MUTE = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
+Const MIXERCONTROL_CONTROLTYPE_MONO = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
+Const MIXERCONTROL_CONTROLTYPE_LOUDNESS = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
+Const MIXERCONTROL_CONTROLTYPE_STEREOENH = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
+Const MIXERCONTROL_CONTROLTYPE_BUTTON = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BUTTON OR MIXERCONTROL_CT_UNITS_BOOLEAN)
+Const MIXERCONTROL_CONTROLTYPE_DECIBELS = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_DECIBELS)
+Const MIXERCONTROL_CONTROLTYPE_SIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_SIGNED)
+Const MIXERCONTROL_CONTROLTYPE_UNSIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
+Const MIXERCONTROL_CONTROLTYPE_PERCENT = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_PERCENT)
+Const MIXERCONTROL_CONTROLTYPE_SLIDER = (MIXERCONTROL_CT_CLASS_SLIDER OR MIXERCONTROL_CT_UNITS_SIGNED)
+Const MIXERCONTROL_CONTROLTYPE_PAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
+Const MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
+Const MIXERCONTROL_CONTROLTYPE_FADER = (MIXERCONTROL_CT_CLASS_FADER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
+Const MIXERCONTROL_CONTROLTYPE_VOLUME = (MIXERCONTROL_CONTROLTYPE_FADER + 1)
+Const MIXERCONTROL_CONTROLTYPE_BASS = (MIXERCONTROL_CONTROLTYPE_FADER + 2)
+Const MIXERCONTROL_CONTROLTYPE_TREBLE = (MIXERCONTROL_CONTROLTYPE_FADER + 3)
+Const MIXERCONTROL_CONTROLTYPE_EQUALIZER = (MIXERCONTROL_CONTROLTYPE_FADER + 4)
+Const MIXERCONTROL_CONTROLTYPE_SINGLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_SINGLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
+Const MIXERCONTROL_CONTROLTYPE_MUX = (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
+Const MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_MULTIPLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
+Const MIXERCONTROL_CONTROLTYPE_MIXER = (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
+Const MIXERCONTROL_CONTROLTYPE_MICROTIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MICROSECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
+Const MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MILLISECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
+
+Type MIXERLINECONTROLSA
+	cbStruct As DWord
+	dwLineID As DWord
+	dwControl_ID_Type As DWord
+	cControls As DWord
+	cbmxctrl As DWord
+	pamxctrl As *MIXERCONTROL
+End Type
+\TypeDef PMIXERLINECONTROLSA = *MIXERLINECONTROLSA
+TypeDef LPMIXERLINECONTROLSA = *MIXERLINECONTROLSA
+
+TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
+TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSA
+TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA
+
+Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
+
+Const MIXER_GETLINECONTROLSF_ALL = &H00000000
+Const MIXER_GETLINECONTROLSF_ONEBYID = &H00000001
+Const MIXER_GETLINECONTROLSF_ONEBYTYPE = &H00000002
+Const MIXER_GETLINECONTROLSF_QUERYMASK = &H0000000F
+
+Type MIXERCONTROLDETAILS
+	cbStruct As DWord
+	dwControlID As DWord
+	cChannels As DWord
+	cMultipleItems As DWord
+	cbDetails As DWord
+	paDetails As VoidPtr
+End Type
+TypeDef PMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
+TypeDef LPMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
+
+Type MIXERCONTROLDETAILS_LISTTEXTA
+	dwParam1 As DWord
+	dwParam2 As DWord
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
+End Type
+TypeDef PMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
+TypeDef LPMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
+
+TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA
+TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA
+TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA
+
+Type MIXERCONTROLDETAILS_BOOLEAN
+	fValue As Long
+End Type
+TypeDef PMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
+TypeDef LPMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
+
+Type MIXERCONTROLDETAILS_SIGNED
+	lValue As Long
+End Type
+TypeDef PMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
+TypeDef LPMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
+
+Type MIXERCONTROLDETAILS_UNSIGNED
+	dwValue As DWord
+End Type
+TypeDef PMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
+TypeDef LPMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
+
+Declare Function mixerGetControlDetailsA Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+Declare Function mixerGetControlDetailsW Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsA" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+
+Const MIXER_GETCONTROLDETAILSF_VALUE = &H00000000
+Const MIXER_GETCONTROLDETAILSF_LISTTEXT = &H00000001
+Const MIXER_GETCONTROLDETAILSF_QUERYMASK = &H0000000F
+
+Declare Function mixerSetControlDetails Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+
+Const MIXER_SETCONTROLDETAILSF_VALUE = &H00000000
+Const MIXER_SETCONTROLDETAILSF_CUSTOM = &H00000001
+Const MIXER_SETCONTROLDETAILSF_QUERYMASK = &H0000000F
+
+
+'--------------------------------------------------------
+' Timer support
+
+' timer error
+Const TIMERR_NOERROR = (0)
+Const TIMERR_NOCANDO = (TIMERR_BASE+1)
+Const TIMERR_STRUCT = (TIMERR_BASE+33)
+
+TypeDef LPTIMECALLBACK = *Sub(uTimerID As DWord, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord)
+
+Const TIME_ONESHOT = &H0000
+Const TIME_PERIODIC = &H0001
+
+Const TIME_CALLBACK_FUNCTION = &H0000
+Const TIME_CALLBACK_EVENT_SET = &H0010
+Const TIME_CALLBACK_EVENT_PULSE = &H0020
+
+' timer device capabilities data structure
+Type TIMECAPS
+	wPeriodMin As DWord
+	wPeriodMax As DWord
+End Type
+TypeDef PTIMECAPS = *TIMECAPS
+TypeDef NPTIMECAPS = *TIMECAPS
+TypeDef LPTIMECAPS = *TIMECAPS
+
+' timer function prototypes
+Declare Function timeGetSystemTime Lib "winmm" (pmmt As *MMTIME, cbmmt As DWord) As MMRESULT
+Declare Function timeGetTime Lib "winmm" () As DWord
+Declare Function timeSetEvent Lib "winmm" (uDelay As DWord, uResolution As DWord, fptc As LPTIMECALLBACK, dwUser As DWord, fuEvent As DWord) As MMRESULT
+Declare Function timeKillEvent Lib "winmm" (uTimerID As DWord) As MMRESULT
+Declare Function timeGetDevCaps Lib "winmm" (ptc As *TIMECAPS, cbtc As DWord) As MMRESULT
+Declare Function timeBeginPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
+Declare Function timeEndPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
+
+
+'--------------------------------------------------------
+' Joystick support
+
+' joystick error
+Const JOYERR_NOERROR = (0)
+Const JOYERR_PARMS = (JOYERR_BASE+5)
+Const JOYERR_NOCANDO = (JOYERR_BASE+6)
+Const JOYERR_UNPLUGGED = (JOYERR_BASE+7)
+
+' constants used with JOYINFO and JOYINFOEX structures and MM_JOY* messages
+Const JOY_BUTTON1 = &H0001
+Const JOY_BUTTON2 = &H0002
+Const JOY_BUTTON3 = &H0004
+Const JOY_BUTTON4 = &H0008
+Const JOY_BUTTON1CHG = &H0100
+Const JOY_BUTTON2CHG = &H0200
+Const JOY_BUTTON3CHG = &H0400
+Const JOY_BUTTON4CHG = &H0800
+
+' constants used with JOYINFOEX
+Const JOY_BUTTON5 = &H00000010
+Const JOY_BUTTON6 = &H00000020
+Const JOY_BUTTON7 = &H00000040
+Const JOY_BUTTON8 = &H00000080
+Const JOY_BUTTON9 = &H00000100
+Const JOY_BUTTON10 = &H00000200
+Const JOY_BUTTON11 = &H00000400
+Const JOY_BUTTON12 = &H00000800
+Const JOY_BUTTON13 = &H00001000
+Const JOY_BUTTON14 = &H00002000
+Const JOY_BUTTON15 = &H00004000
+Const JOY_BUTTON16 = &H00008000
+Const JOY_BUTTON17 = &H00010000
+Const JOY_BUTTON18 = &H00020000
+Const JOY_BUTTON19 = &H00040000
+Const JOY_BUTTON20 = &H00080000
+Const JOY_BUTTON21 = &H00100000
+Const JOY_BUTTON22 = &H00200000
+Const JOY_BUTTON23 = &H00400000
+Const JOY_BUTTON24 = &H00800000
+Const JOY_BUTTON25 = &H01000000
+Const JOY_BUTTON26 = &H02000000
+Const JOY_BUTTON27 = &H04000000
+Const JOY_BUTTON28 = &H08000000
+Const JOY_BUTTON29 = &H10000000
+Const JOY_BUTTON30 = &H20000000
+Const JOY_BUTTON31 = &H40000000
+Const JOY_BUTTON32 = &H80000000
+
+' constants used with JOYINFOEX structure
+Const JOY_POVCENTERED = (-1)
+Const JOY_POVFORWARD = 0
+Const JOY_POVRIGHT = 9000
+Const JOY_POVBACKWARD = 18000
+Const JOY_POVLEFT = 27000
+
+Const JOY_RETURNX = &H00000001
+Const JOY_RETURNY = &H00000002
+Const JOY_RETURNZ = &H00000004
+Const JOY_RETURNR = &H00000008
+Const JOY_RETURNU = &H00000010
+Const JOY_RETURNV = &H00000020
+Const JOY_RETURNPOV = &H00000040
+Const JOY_RETURNBUTTONS = &H00000080
+Const JOY_RETURNRAWDATA = &H00000100
+Const JOY_RETURNPOVCTS = &H00000200
+Const JOY_RETURNCENTERED = &H00000400
+Const JOY_USEDEADZONE = &H00000800
+Const 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)
+Const JOY_CAL_READALWAYS = &H00010000
+Const JOY_CAL_READXYONLY = &H00020000
+Const JOY_CAL_READ3 = &H00040000
+Const JOY_CAL_READ4 = &H00080000
+Const JOY_CAL_READXONLY = &H00100000
+Const JOY_CAL_READYONLY = &H00200000
+Const JOY_CAL_READ5 = &H00400000
+Const JOY_CAL_READ6 = &H00800000
+Const JOY_CAL_READZONLY = &H01000000
+Const JOY_CAL_READRONLY = &H02000000
+Const JOY_CAL_READUONLY = &H04000000
+Const JOY_CAL_READVONLY = &H08000000
+
+' joystick ID constants
+Const JOYSTICKID1 = 0
+Const JOYSTICKID2 = 1
+
+' joystick driver capabilites
+Const JOYCAPS_HASZ = &H0001
+Const JOYCAPS_HASR = &H0002
+Const JOYCAPS_HASU = &H0004
+Const JOYCAPS_HASV = &H0008
+Const JOYCAPS_HASPOV = &H0010
+Const JOYCAPS_POV4DIR = &H0020
+Const JOYCAPS_POVCTS = &H0040
+
+Type JOYCAPSA
+	wMid As Word
+	wPid As Word
+	szPname[ELM(MAXPNAMELEN)] As Char
+	wXmin As DWord
+	wXmax As DWord
+	wYmin As DWord
+	wYmax As DWord
+	wZmin As DWord
+	wZmax As DWord
+	wNumButtons As DWord
+	wPeriodMin As DWord
+	wPeriodMax As DWord
+	wRmin As DWord
+	wRmax As DWord
+	wUmin As DWord
+	wUmax As DWord
+	wVmin As DWord
+	wVmax As DWord
+	wCaps As DWord
+	wMaxAxes As DWord
+	wNumAxes As DWord
+	wMaxButtons As DWord
+	szRegKey[ELM(MAXPNAMELEN)] As Char
+	szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As Char
+End Type
+TypeDef PJOYCAPSA = *JOYCAPSA
+TypeDef NPJOYCAPSA = *JOYCAPSA
+TypeDef LPJOYCAPSA = *JOYCAPSA
+
+TypeDef JOYCAPS = JOYCAPSA
+TypeDef PJOYCAPS = PJOYCAPSA
+TypeDef NPJOYCAPS = NPJOYCAPSA
+TypeDef LPJOYCAPS = LPJOYCAPSA
+
+Type JOYINFO
+	wXpos As DWord
+	wYpos As DWord
+	wZpos As DWord
+	wButtons As DWord
+End Type
+\TypeDef PJOYINFO = *JOYINFO
+TypeDef NPJOYINFO = *JOYINFO
+TypeDef LPJOYINFO = *JOYINFO
+
+Type JOYINFOEX
+	dwSize As DWord
+	dwFlags As DWord
+	dwXpos As DWord
+	dwYpos As DWord
+	dwZpos As DWord
+	dwRpos As DWord
+	dwUpos As DWord
+	dwVpos As DWord
+	dwButtons As DWord
+	dwButtonNumber As DWord
+	dwPOV As DWord
+	dwReserved1 As DWord
+	dwReserved2 As DWord
+End Type
+TypeDef PJOYINFOEX = *JOYINFOEX
+TypeDef NPJOYINFOEX = *JOYINFOEX
+TypeDef LPJOYINFOEX = *JOYINFOEX
+
+' joystick function prototypes
+Declare Function joyGetNumDevs Lib "winmm" () As DWord
+Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
+Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, pji As *JOYINFO) As MMRESULT
+Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, pji As *JOYINFOEX) As MMRESULT
+Declare Function joyGetThreshold Lib "winmm" (uJoyID As DWord, puThreshold As *DWord) As MMRESULT
+Declare Function joyReleaseCapture Lib "winmm" (uJoyID As DWord) As MMRESULT
+Declare Function joySetCapture Lib "winmm" (hwnd As HWND, uJoyID As DWord, uPeriod As DWord, fChanged As BOOL) As MMRESULT
+Declare Function joySetThreshold Lib "winmm" (uJoyID As DWord, uThreshold As DWord) As MMRESULT
+
+
+'--------------------------------------------------------
+' Multimedia File I/O support
+
+' MMIO error return values
+Const MMIOERR_BASE = 256
+Const MMIOERR_FILENOTFOUND = (MMIOERR_BASE + 1)
+Const MMIOERR_OUTOFMEMORY = (MMIOERR_BASE + 2)
+Const MMIOERR_CANNOTOPEN = (MMIOERR_BASE + 3)
+Const MMIOERR_CANNOTCLOSE = (MMIOERR_BASE + 4)
+Const MMIOERR_CANNOTREAD = (MMIOERR_BASE + 5)
+Const MMIOERR_CANNOTWRITE = (MMIOERR_BASE + 6)
+Const MMIOERR_CANNOTSEEK = (MMIOERR_BASE + 7)
+Const MMIOERR_CANNOTEXPAND = (MMIOERR_BASE + 8)
+Const MMIOERR_CHUNKNOTFOUND = (MMIOERR_BASE + 9)
+Const MMIOERR_UNBUFFERED = (MMIOERR_BASE + 10)
+Const MMIOERR_PATHNOTFOUND = (MMIOERR_BASE + 11)
+Const MMIOERR_ACCESSDENIED = (MMIOERR_BASE + 12)
+Const MMIOERR_SHARINGVIOLATION = (MMIOERR_BASE + 13)
+Const MMIOERR_NETWORKERROR = (MMIOERR_BASE + 14)
+Const MMIOERR_TOOMANYOPENFILES = (MMIOERR_BASE + 15)
+Const MMIOERR_INVALIDFILE = (MMIOERR_BASE + 16)
+
+' MMIO constants
+Const CFSEPCHAR = "+"
+
+' MMIO data types
+TypeDef FOURCC = DWord
+TypeDef HPSTR = *Char
+TypeDef HMMIO = VoidPtr
+
+TypeDef LPMMIOPROC = *Function(lpmmioinfo As LPSTR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
+
+Type MMIOINFO
+	dwFlags As DWord
+	fccIOProc As FOURCC
+	pIOProc As LPMMIOPROC
+	wErrorRet As DWord
+	htask As HTASK
+	cchBuffer As Long
+	pchBuffer As HPSTR
+	pchNext As HPSTR
+	pchEndRead As HPSTR
+	pchEndWrite As HPSTR
+	lBufOffset As Long
+	lDiskOffset As Long
+	adwInfo[ELM(3)] As DWord
+	dwReserved1 As DWord
+	dwReserved2 As DWord
+	hmmio As HMMIO
+End Type
+TypeDef PMMIOINFO = *MMIOINFO
+TypeDef NPMMIOINFO = *MMIOINFO
+TypeDef LPMMIOINFO = *MMIOINFO
+
+Type MMCKINFO
+	ckid As FOURCC
+	cksize As DWord
+	fccType As FOURCC
+	dwDataOffset As DWord
+	dwFlags As DWord
+End Type
+TypeDef PMMCKINFO = *MMCKINFO
+TypeDef NPMMCKINFO = *MMCKINFO
+TypeDef LPMMCKINFO = *MMCKINFO
+
+Const MMIO_RWMODE = &H00000003
+Const MMIO_SHAREMODE = &H00000070
+Const MMIO_CREATE = &H00001000
+Const MMIO_PARSE = &H00000100
+Const MMIO_DELETE = &H00000200
+Const MMIO_EXIST = &H00004000
+Const MMIO_ALLOCBUF = &H00010000
+Const MMIO_GETTEMP = &H00020000
+Const MMIO_DIRTY = &H10000000
+Const MMIO_READ = &H00000000
+Const MMIO_WRITE = &H00000001
+Const MMIO_READWRITE = &H00000002
+Const MMIO_COMPAT = &H00000000
+Const MMIO_EXCLUSIVE = &H00000010
+Const MMIO_DENYWRITE = &H00000020
+Const MMIO_DENYREAD = &H00000030
+Const MMIO_DENYNONE = &H00000040
+Const MMIO_FHOPEN = &H0010
+Const MMIO_EMPTYBUF = &H0010
+Const MMIO_TOUPPER = &H0010
+Const MMIO_INSTALLPROC = &H00010000
+Const MMIO_GLOBALPROC = &H10000000
+Const MMIO_REMOVEPROC = &H00020000
+Const MMIO_UNICODEPROC = &H01000000
+Const MMIO_FINDPROC = &H00040000
+Const MMIO_FINDCHUNK = &H0010
+Const MMIO_FINDRIFF = &H0020
+Const MMIO_FINDLIST = &H0040
+Const MMIO_CREATERIFF = &H0020
+Const MMIO_CREATELIST = &H0040
+
+Const MMIOM_READ = MMIO_READ
+Const MMIOM_WRITE = MMIO_WRITE
+Const MMIOM_SEEK = 2
+Const MMIOM_OPEN = 3
+Const MMIOM_CLOSE = 4
+Const MMIOM_WRITEFLUSH = 5
+Const MMIOM_RENAME = 6
+Const MMIOM_USER = &H8000
+
+Const FOURCC_RIFF = MAKEFOURCC(&H52, &H49, &H46, &H46)
+Const FOURCC_LIST = MAKEFOURCC(&H4C, &H49, &H53, &H54)
+Const FOURCC_DOS = MAKEFOURCC(&H44, &H4F, &H53, &H20)
+Const FOURCC_MEM = MAKEFOURCC(&H4D, &H45, &H4D, &H20)
+
+Const SEEK_SET = 0
+Const SEEK_CUR = 1
+Const SEEK_END = 2
+
+Const MMIO_DEFAULTBUFFER = 8192
+
+Function mmioFOURCC(ch0 As String, ch1 As String, ch2 As String, ch3 As String) As FOURCC
+	mmioFOURCC = MAKEFOURCC(Asc(ch0), Asc(ch1), Asc(ch2), Asc(ch3))
+End Function
+
+' MMIO function prototypes
+Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCA" (sz As LPSTR, uFlags As DWord) As FOURCC
+Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcA" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
+Declare Function mmioOpen Lib "winmm" Alias "mmioOpenA" (pszFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
+Declare Function mmioRename Lib "winmm" Alias "mmioRenameA" (pszFileName As LPSTR, pszNewFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
+Declare Function mmioClose Lib "winmm" (hmmio As HMMIO, fuClose As DWord) As MMRESULT
+Declare Function mmioRead Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
+Declare Function mmioWrite Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
+Declare Function mmioSeek Lib "winmm" (hmmio As HMMIO, lOffset As Long, iOrigin As Long) As Long
+Declare Function mmioGetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
+Declare Function mmioSetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
+Declare Function mmioSetBuffer Lib "winmm" (hmmio As HMMIO, pchBuffer As LPSTR, cchBuffer As Long, fuBuffer As DWord) As MMRESULT
+Declare Function mmioFlush Lib "winmm" (hmmio As HMMIO, fuFlush As DWord) As MMRESULT
+Declare Function mmioAdvance Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuAdvance As DWord) As MMRESULT
+Declare Function mmioSendMessage Lib "winmm" (hmmio As HMMIO, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
+Declare Function mmioDescend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, pmmckiParent As *MMCKINFO, fuDescend As DWord) As MMRESULT
+Declare Function mmioAscend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuAscend As DWord) As MMRESULT
+Declare Function mmioCreateChunk Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuCreate As DWord) As MMRESULT
+
+
+'--------------------------------------------------------
+' MCI support
 
 '--------------------------------------------------------
