{*********************************} (*********************************)
{ 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   *)
                                    (*********************************)
unit mmsystem;
{$smartlink on}
interface
uses
 windows;

type
MMRESULT = UINT;
MMVERSION = UINT;
HWAVEOUT = THandle;
LPHWAVEOUT = ^HWAVEOUT;
HWAVEIN = THandle;
LPHWAVEIN = ^HWAVEOUT;
HWAVE = THandle;
LPHWAVE = ^THandle;
LPUINT = ^UINT;
(*//////////////////////////////////////////////////////////*)
(* Definitions*)
(*//////////////////////////////////////////////////////////*)
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 = $3B9;
MM_WOM_OPEN = $3BB;
MM_WOM_CLOSE = $3BC;
MM_WOM_DONE = $3BD;
MM_WIM_OPEN = $3BE;
MM_WIM_CLOSE = $3BF;
MM_WIM_DATA = $3C0;
MM_MIM_OPEN = $3C1;
MM_MIM_CLOSE = $3C2;
MM_MIM_DATA = $3C3;
MM_MIM_LONGDATA = $3C4;
MM_MIM_ERROR = $3C5;
MM_MIM_LONGERROR = $3C6;
MM_MOM_OPEN = $3C7;
MM_MOM_CLOSE = $3C8;
MM_MOM_DONE = $3C9;
MM_DRVM_OPEN = $3D0;
MM_DRVM_CLOSE = $3D1;
MM_DRVM_DATA = $3D2;
MM_DRVM_ERROR = $3D3;
MM_STREAM_OPEN = $3D4;
MM_STREAM_CLOSE = $3D5;
MM_STREAM_DONE = $3D6;
MM_STREAM_ERROR = $3D7;
MM_MOM_POSITIONCB = $3CA;
MM_MCISIGNAL = $3CB;
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 = $400;
WAVE_FORMAT_4S16 = $800;
MM_MIM_MOREDATA = $3CC;
MM_MIXM_LINE_CHANGE = $3D0;
MM_MIXM_CONTROL_CHANGE = $3D1;
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 = $3A0;
MM_JOY2MOVE = $3A1;
MM_JOY1ZMOVE = $3A2;
MM_JOY2ZMOVE = $3A3;
MM_JOY1BUTTONDOWN = $3B5;
MM_JOY2BUTTONDOWN = $3B6;
MM_JOY1BUTTONUP = $3B7;
MM_JOY2BUTTONUP = $3B8;
CALLBACK_TYPEMASK = $70000;
CALLBACK_NULL = 0;
CALLBACK_EVENT = $50000;
CALLBACK_WINDOW = $10000;
CALLBACK_TASK = $20000;
CALLBACK_THREAD = CALLBACK_TASK;
CALLBACK_FUNCTION = $30000;
type
HDRVR = THandle;
const
DRV_LOAD = 1;
DRV_ENABLE = 2;
DRV_OPEN = $3;
DRV_CLOSE = 4;
DRV_DISABLE = $5;
DRV_FREE = $6;
DRV_CONFIGURE = $7;
DRV_QUERYCONFIGURE = 8;
DRV_INSTALL = $9;
DRV_REMOVE = $A;
DRV_EXITSESSION = $B;
DRV_POWER = $F;
DRV_RESERVED = $800;
DRV_USER = $4000;
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+$FFF);
type
PDRVCALLBACK = procedure(hdrvr: tHandle; uMsg: UINT; dwUser, dw1, dw2: DWORD); stdcall;

function sndPlaySoundA(Name: LPCSTR; flags: UINT): BOOL; stdcall;
 external 'winmm.dll' name 'sndPlaySoundA';
function sndPlaySoundW(Name: LPCWSTR; flags: UINT): BOOL; stdcall;
 external 'winmm.dll' name 'sndPlaySoundW';
function sndPlaySound(Name: PChar; flags: UINT): BOOL; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'sndPlaySoundW'
 {$else}'sndPlaySoundA'
 {$endif};

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 = $2000;
SND_ALIAS = $10000;
SND_ALIAS_ID = $110000;
SND_FILENAME = $20000;
SND_RESOURCE = $40004;
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_MAPPER = 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 = $4;
WHDR_ENDLOOP = $8;
WHDR_INQUEUE = $10;
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 = $4;
MHDR_ISSTRM = $8;
MEVT_F_SHORT = 0;
MEVT_F_LONG = $80000000;
MEVT_F_CALLBACK = $40000000;
function MEVT_EVENTTYPE(x: byte): byte;
function MEVT_EVENTPARM(x: DWORD): DWORD;
const
MEVT_SHORTMSG = 0;
MEVT_TEMPO = $1;
MEVT_NOP = $2;
MEVT_LONGMSG = $80;
MEVT_COMMENT = $82;
MEVT_VERSION = $84;
MIDISTRM_ERROR = -2;
MIDIPROP_SET = $80000000;
MIDIPROP_GET = $40000000;
MIDIPROP_TIMEDIV = 1;
MIDIPROP_TEMPO = 2;
MIXERLINE_LINEF_ACTIVE = 1;
MIXERLINE_LINEF_DISCONNECTED = $8000;
MIXERLINE_LINEF_SOURCE = $80000000;
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 = $1000;
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 = $80000000;
MIXERCONTROL_CT_CLASS_MASK = $F0000000;
MIXERCONTROL_CT_CLASS_CUSTOM = 0;
MIXERCONTROL_CT_CLASS_METER = $10000000;
MIXERCONTROL_CT_CLASS_SWITCH = $20000000;
MIXERCONTROL_CT_CLASS_NUMBER = $30000000;
MIXERCONTROL_CT_CLASS_SLIDER = $40000000;
MIXERCONTROL_CT_CLASS_FADER = $50000000;
MIXERCONTROL_CT_CLASS_TIME = $60000000;
MIXERCONTROL_CT_CLASS_LIST = $70000000;
MIXERCONTROL_CT_SUBCLASS_MASK = $0F000000;
MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = 0;
MIXERCONTROL_CT_SC_SWITCH_BUTTON = $1000000;
MIXERCONTROL_CT_SC_METER_POLLED = 0;
MIXERCONTROL_CT_SC_TIME_MICROSECS = 0;
MIXERCONTROL_CT_SC_TIME_MILLISECS = $1000000;
MIXERCONTROL_CT_SC_LIST_SINGLE = 0;
MIXERCONTROL_CT_SC_LIST_MULTIPLE = $1000000;
MIXERCONTROL_CT_UNITS_MASK = $0FF0000;
MIXERCONTROL_CT_UNITS_CUSTOM = 0;
MIXERCONTROL_CT_UNITS_BOOLEAN = $10000;
MIXERCONTROL_CT_UNITS_SIGNED = $20000;
MIXERCONTROL_CT_UNITS_UNSIGNED = $30000;
MIXERCONTROL_CT_UNITS_DECIBELS = $40000;
MIXERCONTROL_CT_UNITS_PERCENT = $50000;
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 = $80000000;
MIXER_OBJECTF_MIXER = 0;
MIXER_OBJECTF_HMIXER = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIXER);
MIXER_OBJECTF_WAVEOUT = $10000000;
MIXER_OBJECTF_HWAVEOUT = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_WAVEOUT);
MIXER_OBJECTF_WAVEIN = $20000000;
MIXER_OBJECTF_HWAVEIN = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_WAVEIN);
MIXER_OBJECTF_MIDIOUT = $30000000;
MIXER_OBJECTF_HMIDIOUT = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIDIOUT);
MIXER_OBJECTF_MIDIIN = $40000000;
MIXER_OBJECTF_HMIDIIN = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIDIIN);
MIXER_OBJECTF_AUX = $50000000;
MIXER_GETCONTROLDETAILSF_VALUE = 0;
MIXER_GETCONTROLDETAILSF_LISTTEXT = 1;
MIXER_GETCONTROLDETAILSF_QUERYMASK = $F;
MIXER_SETCONTROLDETAILSF_VALUE = 0;
MIXER_SETCONTROLDETAILSF_CUSTOM = 1;
MIXER_SETCONTROLDETAILSF_QUERYMASK = $F;
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 = $400;
JOY_BUTTON4CHG = $800;
JOY_BUTTON5 = 16;
JOY_BUTTON6 = 32;
JOY_BUTTON7 = 64;
JOY_BUTTON8 = 128;
JOY_BUTTON9 = 256;
JOY_BUTTON10 = 512;
JOY_BUTTON11 = $400;
JOY_BUTTON12 = $800;
JOY_BUTTON13 = $1000;
JOY_BUTTON14 = $2000;
JOY_BUTTON15 = $4000;
JOY_BUTTON16 = $8000;
JOY_BUTTON17 = $10000;
JOY_BUTTON18 = $20000;
JOY_BUTTON19 = $40000;
JOY_BUTTON20 = $80000;
JOY_BUTTON21 = $100000;
JOY_BUTTON22 = $200000;
JOY_BUTTON23 = $400000;
JOY_BUTTON24 = $800000;
JOY_BUTTON25 = $1000000;
JOY_BUTTON26 = $2000000;
JOY_BUTTON27 = $4000000;
JOY_BUTTON28 = $8000000;
JOY_BUTTON29 = $10000000;
JOY_BUTTON30 = $20000000;
JOY_BUTTON31 = $40000000;
JOY_BUTTON32 = $80000000;
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 = $400;
JOY_USEDEADZONE = $800;
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 = $10000;
JOY_CAL_READXYONLY = $20000;
JOY_CAL_READ3 = $40000;
JOY_CAL_READ4 = $80000;
JOY_CAL_READXONLY = $100000;
JOY_CAL_READYONLY = $200000;
JOY_CAL_READ5 = $400000;
JOY_CAL_READ6 = $800000;
JOY_CAL_READZONLY = $1000000;
JOY_CAL_READRONLY = $2000000;
JOY_CAL_READUONLY = $4000000;
JOY_CAL_READVONLY = $8000000;
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 = $F;
MMIO_RWMODE = 3;
MMIO_SHAREMODE = $70;
MMIO_CREATE = $1000;
MMIO_PARSE = 256;
MMIO_DELETE = 512;
MMIO_EXIST = $4000;
MMIO_ALLOCBUF = $10000;
MMIO_GETTEMP = $20000;
MMIO_DIRTY = $10000000;
MMIO_READ = 0;
MMIO_WRITE = 1;
MMIO_READWRITE = 2;
MMIO_COMPAT = 0;
MMIO_EXCLUSIVE = 16;
MMIO_DENYWRITE = 32;
MMIO_DENYREAD = $30;
MMIO_DENYNONE = 64;
MMIO_FHOPEN = 16;
MMIO_EMPTYBUF = 16;
MMIO_TOUPPER = 16;
MMIO_INSTALLPROC = $10000;
MMIO_GLOBALPROC = $10000000;
MMIO_REMOVEPROC = $20000;
MMIO_UNICODEPROC = $1000000;
MMIO_FINDPROC = $40000;
MMIO_FINDCHUNK = 16;
MMIO_FINDRIFF = 32;
MMIO_FINDLIST = 64;
MMIO_CREATERIFF = 32;
MMIO_CREATELIST = 64;
MMIOM_READ = MMIO_READ;
MMIOM_WRITE = MMIO_WRITE;
MMIOM_SEEK = 2;
MMIOM_OPEN = 3;
MMIOM_CLOSE = 4;
MMIOM_WRITEFLUSH = 5;
MMIOM_RENAME = 6;
MMIOM_USER = $8000;
FOURCC_RIFF = $46464952; {'R','I','F','F'}
FOURCC_LIST = $5453494C; {'L','I','S','T'}
FOURCC_DOS  = $20532F44; {'D','O','S',' '}
FOURCC_MEM  = $204D454D; {'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 = $805;
MCI_PLAY = $806;
MCI_SEEK = $807;
MCI_STOP = $808;
MCI_PAUSE = $809;
MCI_INFO = $80A;
MCI_GETDEVCAPS = $80B;
MCI_BREAK = $811;
MCI_WHERE = $843;
MCI_FREEZE = $844;
MCI_UNFREEZE = $845;
MCI_LOAD = $850;
MCI_CUT = $851;
MCI_COPY = $852;
MCI_PASTE = $853;
MCI_UPDATE = $854;
MCI_RESUME = $855;
MCI_DELETE = $856;
MCI_SET = $80D;
MCI_STEP = $80E;
MCI_SAVE = $813;
MCI_SPIN = $80C;
MCI_STATUS = $814;
MCI_CUE = $830;
MCI_REALIZE = $840;
MCI_WINDOW = $841;
MCI_PUT = $842;
MCI_RECORD = $80F;
MCI_SYSINFO = $810;
MCI_OPEN = $803;
MCI_CLOSE = $804;
MCI_USER_MESSAGES = (DRV_MCI_FIRST+$400);
MCI_LAST = $0FFF;
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 = $1000;
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;

function MCI_MSF_MINUTE(msf: longint): byte;
function MCI_MSF_SECOND(msf: longint): byte;
function MCI_MSF_FRAME(msf: longint): byte;
function MCI_MAKE_MSF(m, s, f: byte): longint;

const
MCI_SET_DOOR_OPEN = 256;
MCI_SET_DOOR_CLOSED = 512;
MCI_SET_TIME_FORMAT = $400;
MCI_SET_AUDIO = $800;
MCI_SET_VIDEO = $1000;
MCI_SET_ON = $2000;
MCI_SET_OFF = $4000;
MCI_SET_AUDIO_ALL = 0;
MCI_SET_AUDIO_LEFT = 1;
MCI_SET_AUDIO_RIGHT = 2;

function MCI_TMSF_TRACK(tmsf: longint): byte;
function MCI_TMSF_MINUTE(tmsf: longint): byte;
function MCI_TMSF_SECOND(tmsf: longint): byte;
function MCI_TMSF_FRAME(tmsf: longint): byte;
function MCI_HMS_HOUR(h: longint): byte;
function MCI_HMS_MINUTE(h: longint): byte;
function MCI_HMS_SECOND(h: longint): byte;
function MCI_MAKE_HMS(h, m, s: byte): longint;

const
MCI_INFO_PRODUCT = 256;
MCI_INFO_FILE = 512;
MCI_INFO_MEDIA_UPC = $400;
MCI_INFO_MEDIA_IDENTITY = $800;
MCI_INFO_NAME = $1000;
MCI_INFO_COPYRIGHT = $2000;

function MCI_MAKE_TMSF(t, m, s, f: byte): longint;

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 = $400;
MCI_OPEN_ELEMENT_ID = $800;
MCI_OPEN_TYPE_ID = $1000;
MCI_OPEN_TYPE = $2000;
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 = $400;
MCI_SYSINFO_INSTALLNAME = $800;
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 = $400;
MCI_RECORD_INSERT = 256;
MCI_RECORD_OVERWRITE = 512;
MCI_SAVE_FILE = 256;
MCI_LOAD_FILE = 256;
MCI_VD_GETDEVCAPS_FAST_RATE = $4003;
MCI_VD_GETDEVCAPS_SLOW_RATE = $4004;
MCI_VD_GETDEVCAPS_NORMAL_RATE = $4005;
MCI_VD_STEP_FRAMES = $10000;
MCI_VD_STEP_REVERSE = $20000;
MCI_VD_ESCAPE_STRING = 256;
MCI_VD_FORMAT_TRACK = $4001;
MCI_VD_PLAY_REVERSE = $10000;
MCI_VD_PLAY_FAST = $20000;
MCI_VD_MODE_PARK = (MCI_VD_OFFSET+1);
MCI_VD_GETDEVCAPS_CAV = $20000;
MCI_VD_SPIN_UP = $10000;
MCI_VD_SPIN_DOWN = $20000;
MCI_VD_SEEK_REVERSE = $10000;
MCI_VD_STATUS_SPEED = $4002;
MCI_VD_STATUS_FORWARD = $4003;
MCI_VD_STATUS_MEDIA_TYPE = $4004;
MCI_VD_STATUS_SIDE = $4005;
MCI_VD_GETDEVCAPS_CAN_REVERSE = $4002;
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 = $4006;
MCI_VD_GETDEVCAPS_CLV = $10000;
MCI_VD_PLAY_SPEED = $40000;
MCI_VD_PLAY_SCAN = $80000;
MCI_VD_PLAY_SLOW = $100000;
MCI_WAVE_STATUS_CHANNELS = $4002;
MCI_WAVE_STATUS_SAMPLESPERSEC = $4003;
MCI_WAVE_PCM = MCI_WAVE_OFFSET;
MCI_WAVE_MAPPER = (MCI_WAVE_OFFSET+1);
MCI_WAVE_OPEN_BUFFER = $10000;
MCI_WAVE_STATUS_BITSPERSAMPLE = $4006;
MCI_WAVE_STATUS_LEVEL = $4007;
MCI_WAVE_SET_FORMATTAG = $10000;
MCI_WAVE_SET_CHANNELS = $20000;
MCI_WAVE_SET_SAMPLESPERSEC = $40000;
MCI_WAVE_SET_AVGBYTESPERSEC = $80000;
MCI_WAVE_SET_BLOCKALIGN = $100000;
MCI_WAVE_SET_BITSPERSAMPLE = $200000;
MCI_WAVE_INPUT = $400000;
MCI_WAVE_OUTPUT = $800000;
MCI_WAVE_STATUS_FORMATTAG = $4001;
MCI_WAVE_SET_ANYINPUT = $4000000;
MCI_WAVE_SET_ANYOUTPUT = $8000000;
MCI_WAVE_GETDEVCAPS_INPUTS = $4001;
MCI_WAVE_GETDEVCAPS_OUTPUTS = $4002;
MCI_WAVE_STATUS_AVGBYTESPERSEC = $4004;
MCI_WAVE_STATUS_BLOCKALIGN = $4005;
MCI_CDA_STATUS_TYPE_TRACK = $4001;
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 = $4001;
MCI_SEQ_FILE = $4002;
MCI_SEQ_MIDI = $4003;
MCI_SEQ_SMPTE = $4004;
MCI_SEQ_NONE = 65533;
MCI_SEQ_MAPPER = 65535;
MCI_SEQ_STATUS_TEMPO = $4002;
MCI_SEQ_STATUS_PORT = $4003;
MCI_SEQ_STATUS_SLAVE = $4007;
MCI_SEQ_STATUS_MASTER = $4008;
MCI_SEQ_STATUS_OFFSET = $4009;
MCI_SEQ_STATUS_DIVTYPE = $400A;
MCI_SEQ_STATUS_NAME = $400B;
MCI_SEQ_STATUS_COPYRIGHT = $400C;
MCI_SEQ_SET_TEMPO = $10000;
MCI_SEQ_SET_PORT = $20000;
MCI_SEQ_SET_SLAVE = $40000;
MCI_SEQ_SET_MASTER = $80000;
MCI_SEQ_SET_OFFSET = $1000000;
MCI_ANIM_PLAY_SLOW = $80000;
MCI_ANIM_PLAY_SCAN = $100000;
MCI_ANIM_GETDEVCAPS_SLOW_RATE = $4003;
MCI_ANIM_GETDEVCAPS_NORMAL_RATE = $4004;
MCI_ANIM_STEP_REVERSE = $10000;
MCI_ANIM_STEP_FRAMES = $20000;
MCI_ANIM_STATUS_SPEED = $4001;
MCI_ANIM_GETDEVCAPS_PALETTES = $4006;
MCI_ANIM_OPEN_WS = $10000;
MCI_ANIM_OPEN_PARENT = $20000;
MCI_ANIM_OPEN_NOSTATIC = $40000;
MCI_ANIM_GETDEVCAPS_FAST_RATE = $4002;
MCI_ANIM_PLAY_SPEED = $10000;
MCI_ANIM_PLAY_REVERSE = $20000;
MCI_ANIM_PLAY_FAST = $40000;
MCI_ANIM_STATUS_FORWARD = $4002;
MCI_ANIM_STATUS_HWND = $4003;
MCI_ANIM_STATUS_HPAL = $4004;
MCI_ANIM_STATUS_STRETCH = $4005;
MCI_ANIM_INFO_TEXT = $10000;
MCI_ANIM_GETDEVCAPS_CAN_REVERSE = $4001;
MCI_ANIM_WINDOW_TEXT = $80000;
MCI_ANIM_WINDOW_ENABLE_STRETCH = $100000;
MCI_ANIM_WINDOW_DISABLE_STRETCH = $200000;
MCI_ANIM_WINDOW_DEFAULT = 0;
MCI_ANIM_RECT = $10000;
MCI_ANIM_PUT_SOURCE = $20000;
MCI_ANIM_PUT_DESTINATION = $40000;
MCI_ANIM_WHERE_SOURCE = $20000;
MCI_ANIM_WHERE_DESTINATION = $40000;
MCI_ANIM_UPDATE_HDC = $20000;
MCI_ANIM_GETDEVCAPS_CAN_STRETCH = $4007;
MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = $4008;
MCI_ANIM_REALIZE_NORM = $10000;
MCI_ANIM_REALIZE_BKGD = $20000;
MCI_ANIM_WINDOW_HWND = $10000;
MCI_ANIM_WINDOW_STATE = $40000;
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 = $10000;
MCI_OVLY_OPEN_PARENT = $20000;
MCI_OVLY_STATUS_HWND = $4001;
MCI_OVLY_STATUS_STRETCH = $4002;
MCI_OVLY_INFO_TEXT = $10000;
MCI_OVLY_GETDEVCAPS_CAN_STRETCH = $4001;
MCI_OVLY_GETDEVCAPS_CAN_FREEZE = $4002;
MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = $4003;
MCI_OVLY_WINDOW_HWND = $10000;
MCI_OVLY_WINDOW_STATE = $40000;
MCI_OVLY_WINDOW_TEXT = $80000;
MCI_OVLY_WINDOW_ENABLE_STRETCH = $100000;
MCI_OVLY_WINDOW_DISABLE_STRETCH = $200000;
MCI_OVLY_WINDOW_DEFAULT = 0;
MCI_OVLY_RECT = $10000;
MCI_OVLY_PUT_SOURCE = $20000;
MCI_OVLY_PUT_DESTINATION = $40000;
MCI_OVLY_PUT_FRAME = $80000;
MCI_OVLY_PUT_VIDEO = $100000;
MCI_OVLY_WHERE_SOURCE = $20000;
MCI_OVLY_WHERE_DESTINATION = $40000;
MCI_OVLY_WHERE_FRAME = $80000;
MCI_OVLY_WHERE_VIDEO = $100000;
AUX_MAPPER = -1;
MIXER_GETLINECONTROLSF_ONEBYID = 1;
MIXER_GETLINECONTROLSF_ONEBYTYPE = 2;
MIXER_GETLINECONTROLSF_ALL = 0;
MIXER_GETLINECONTROLSF_QUERYMASK = $F;
NEWTRANSPARENT = 3;
QUERYROPSUPPORT = 40;
SELECTDIB = 41;

function DIBINDEX(n: longint): longint;

const
SC_SCREENSAVE = $F140;
AUXCAPS_CDAUDIO = 1;
AUXCAPS_AUXIN = 2;
AUXCAPS_VOLUME = 1;
AUXCAPS_LRVOLUME = 2;

(*/////////////////////////////////////////////////////////*)
(* Structures and typedefs*)
(*/////////////////////////////////////////////////////////*)
type
_mmtime = packed record
 wType: UINT;
 case integer of
 0:(ms: DWORD);
 1:(sample: DWORD);
 2:(cb: DWORD);
 3:(ticks: DWORD);
 4:(smpte: packed record
    hour, min, sec, frame, fps, dummy: byte;
    pad: array[0..1] of byte
    end);
 5:(songptrpos: DWORD);
end;
MMTIME = _mmtime;
PMMTIME = ^_mmtime;
NPMMTIME = ^_mmtime;
LPMMTIME = ^_mmtime;
PWAVEHDR = ^_wavehdr;
_wavehdr = packed record
lpData: PChar;
dwBufferLength: DWORD;
dwBytesRecorded: DWORD;
dwUser: DWORD;
dwFlags: DWORD;
dwLoops: DWORD;
lpNext: PWAVEHDR;
reserved: DWORD;
end;
WAVEHDR = _wavehdr;
NPWAVEHDR = ^_wavehdr;
LPWAVEHDR = ^_wavehdr;
_WAVEOUTCAPSA = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of CHAR;
dwFormats: DWORD;
wChannels: WORD;
wReserved1: WORD;
dwSupport: DWORD;
end;
WAVEOUTCAPSA = _WAVEOUTCAPSA;
PWAVEOUTCAPSA = ^_WAVEOUTCAPSA;
NPWAVEOUTCAPSA = ^_WAVEOUTCAPSA;
LPWAVEOUTCAPSA = ^_WAVEOUTCAPSA;
_WAVEOUTCAPSW = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of WCHAR;
dwFormats: DWORD;
wChannels: WORD;
wReserved1: WORD;
dwSupport: DWORD;
end;
WAVEOUTCAPSW = _WAVEOUTCAPSW;
PWAVEOUTCAPSW = ^_WAVEOUTCAPSW;
NPWAVEOUTCAPSW = ^_WAVEOUTCAPSW;
LPWAVEOUTCAPSW = ^_WAVEOUTCAPSW;
{$ifdef UNICODE}
WAVEOUTCAPS = WAVEOUTCAPSW;
PWAVEOUTCAPS = PWAVEOUTCAPSW;
NPWAVEOUTCAPS = NPWAVEOUTCAPSW;
LPWAVEOUTCAPS = LPWAVEOUTCAPSW;
{$else}
WAVEOUTCAPS = WAVEOUTCAPSA;
PWAVEOUTCAPS = PWAVEOUTCAPSA;
NPWAVEOUTCAPS = NPWAVEOUTCAPSA;
LPWAVEOUTCAPS = LPWAVEOUTCAPSA;
{$endif}
_WAVEINCAPSA = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of CHAR;
dwFormats: DWORD;
wChannels: WORD;
wReserved1: WORD;
end;
WAVEINCAPSA = _WAVEINCAPSA;
PWAVEINCAPSA = ^_WAVEINCAPSA;
NPWAVEINCAPSA = ^_WAVEINCAPSA;
LPWAVEINCAPSA = ^_WAVEINCAPSA;
_WAVEINCAPSW = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of WCHAR;
dwFormats: DWORD;
wChannels: WORD;
wReserved1: WORD;
end;
WAVEINCAPSW = _WAVEINCAPSW;
PWAVEINCAPSW = ^_WAVEINCAPSW;
NPWAVEINCAPSW = ^_WAVEINCAPSW;
LPWAVEINCAPSW = ^_WAVEINCAPSW;
{$ifdef UNICODE}
WAVEINCAPS = WAVEINCAPSW;
PWAVEINCAPS = PWAVEINCAPSW;
NPWAVEINCAPS = NPWAVEINCAPSW;
LPWAVEINCAPS = LPWAVEINCAPSW;
{$else}
WAVEINCAPS = WAVEINCAPSA;
PWAVEINCAPS = PWAVEINCAPSA;
NPWAVEINCAPS = NPWAVEINCAPSA;
LPWAVEINCAPS = LPWAVEINCAPSA;
{$endif}
_waveformat = packed record
wFormatTag: WORD;
nChannels: WORD;
nSamplesPerSec: DWORD;
nAvgBytesPerSec: DWORD;
nBlockAlign: WORD;
end;
WAVEFORMAT = _waveformat;
PWAVEFORMAT = ^_waveformat;
NPWAVEFORMAT = ^_waveformat;
LPWAVEFORMAT = ^_waveformat;
const
WAVE_FORMAT_PCM = 1;
type
_pcmwaveformat = packed record
wf: WAVEFORMAT;
wBitsPerSample: WORD;
end;
PCMWAVEFORMAT = _pcmwaveformat;
PPCMWAVEFORMAT = ^_pcmwaveformat;
NPPCMWAVEFORMAT = ^_pcmwaveformat;
LPPCMWAVEFORMAT = ^_pcmwaveformat;
_WAVEFORMATEX = packed record
wFormatTag: WORD;
nChannels: WORD;
nSamplesPerSec: DWORD;
nAvgBytesPerSec: DWORD;
nBlockAlign: WORD;
wBitsPerSample: WORD;
cbSize: WORD;
end;
WAVEFORMATEX = _WAVEFORMATEX;
PWAVEFORMATEX = ^_WAVEFORMATEX;
NPWAVEFORMATEX = ^_WAVEFORMATEX;
LPWAVEFORMATEX = ^_WAVEFORMATEX;
LPCWAVEFORMATEX = ^WAVEFORMATEX;
HMIDI = THandle;
HMIDIIN = THandle;
HMIDIOUT = THandle;
HMIDISTRM = THandle;
LPHMIDI = ^HMIDI;
LPHMIDIIN = ^HMIDIIN;
LPHMIDIOUT = ^HMIDIOUT;
LPHMIDISTRM = ^HMIDISTRM;
LPMIDICALLBACK = PDRVCALLBACK;
const
MIDIPATCHSIZE = 128;
type
PATCHARRAY = array [0..Pred(MIDIPATCHSIZE)] of WORD;
LPPATCHARRAY = ^WORD;
KEYARRAY = array [0..Pred(MIDIPATCHSIZE)] of WORD;
LPKEYARRAY = ^WORD;
_MIDIOUTCAPSA = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of CHAR;
wTechnology: WORD;
wVoices: WORD;
wNotes: WORD;
wChannelMask: WORD;
dwSupport: DWORD;
end;
MIDIOUTCAPSA = _MIDIOUTCAPSA;
PMIDIOUTCAPSA = ^_MIDIOUTCAPSA;
NPMIDIOUTCAPSA = ^_MIDIOUTCAPSA;
LPMIDIOUTCAPSA = ^_MIDIOUTCAPSA;
_MIDIOUTCAPSW = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of WCHAR;
wTechnology: WORD;
wVoices: WORD;
wNotes: WORD;
wChannelMask: WORD;
dwSupport: DWORD;
end;
MIDIOUTCAPSW = _MIDIOUTCAPSW;
PMIDIOUTCAPSW = ^_MIDIOUTCAPSW;
NPMIDIOUTCAPSW = ^_MIDIOUTCAPSW;
LPMIDIOUTCAPSW = ^_MIDIOUTCAPSW;
_MIDIINCAPSA = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of CHAR;
dwSupport: DWORD;
end;
MIDIINCAPSA = _MIDIINCAPSA;
PMIDIINCAPSA = ^_MIDIINCAPSA;
NPMIDIINCAPSA = ^_MIDIINCAPSA;
LPMIDIINCAPSA = ^_MIDIINCAPSA;
_MIDIINCAPSW = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of WCHAR;
dwSupport: DWORD;
end;
MIDIINCAPSW = _MIDIINCAPSW;
PMIDIINCAPSW = ^_MIDIINCAPSW;
NPMIDIINCAPSW = ^_MIDIINCAPSW;
LPMIDIINCAPSW = ^_MIDIINCAPSW;
{$ifdef UNICODE}
MIDIINCAPS = MIDIINCAPSW;
PMIDIINCAPS = PMIDIINCAPSW;
NPMIDIINCAPS = NPMIDIINCAPSW;
LPMIDIINCAPS = LPMIDIINCAPSW;
MIDIOUTCAPS = MIDIOUTCAPSW;
PMIDIOUTCAPS = PMIDIOUTCAPSW;
NPMIDIOUTCAPS = NPMIDIOUTCAPSW;
LPMIDIOUTCAPS = LPMIDIOUTCAPSW;
{$else}
MIDIOUTCAPS = MIDIOUTCAPSA;
PMIDIOUTCAPS = PMIDIOUTCAPSA;
NPMIDIOUTCAPS = NPMIDIOUTCAPSA;
LPMIDIOUTCAPS = LPMIDIOUTCAPSA;
MIDIINCAPS = MIDIINCAPSA;
PMIDIINCAPS = PMIDIINCAPSA;
NPMIDIINCAPS = NPMIDIINCAPSA;
LPMIDIINCAPS = LPMIDIINCAPSA;
{$endif}
PMIDIHDR = ^_midihdr;
_midihdr = packed record
lpData: PChar;
dwBufferLength: DWORD;
dwBytesRecorded: DWORD;
dwUser: DWORD;
dwFlags: DWORD;
lpNext: PMIDIHDR;
reserved: DWORD;
dwOffset: DWORD;
dwReserved: array [0..Pred(8)] of DWORD;
end;
MIDIHDR = _midihdr;
NPMIDIHDR = ^_midihdr;
LPMIDIHDR = ^_midihdr;
_midievent = packed record
dwDeltaTime: DWORD;
dwStreamID: DWORD;
dwEvent: DWORD;
dwParms: array [0..Pred(1)] of DWORD;
end;
MIDIEVENT = _midievent;

_midistrmbuffver = packed record
dwVersion: DWORD;
dwMid: DWORD;
dwOEMVersion: DWORD;
end;
MIDISTRMBUFFVER = _midistrmbuffver;
_midiproptimediv = packed record
cbStruct: DWORD;
dwTimeDiv: DWORD;
end;
MIDIPROPTIMEDIV = _midiproptimediv;
LPMIDIPROPTIMEDIV = ^_midiproptimediv;
_midiproptempo = packed record
cbStruct: DWORD;
dwTempo: DWORD;
end;
MIDIPROPTEMPO = _midiproptempo;
LPMIDIPROPTEMPO = ^_midiproptempo;
_AUXCAPSA = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of CHAR;
wTechnology: WORD;
wReserved1: WORD;
dwSupport: DWORD;
end;
AUXCAPSA = _AUXCAPSA;
PAUXCAPSA = ^_AUXCAPSA;
NPAUXCAPSA = ^_AUXCAPSA;
LPAUXCAPSA = ^_AUXCAPSA;
_AUXCAPSW = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of WCHAR;
wTechnology: WORD;
wReserved1: WORD;
dwSupport: DWORD;
end;
AUXCAPSW = _AUXCAPSW;
PAUXCAPSW = ^_AUXCAPSW;
NPAUXCAPSW = ^_AUXCAPSW;
LPAUXCAPSW = ^_AUXCAPSW;
{$ifdef UNICODE}
AUXCAPS = AUXCAPSW;
PAUXCAPS = PAUXCAPSW;
NPAUXCAPS = NPAUXCAPSW;
LPAUXCAPS = LPAUXCAPSW;
{$else}
AUXCAPS = AUXCAPSA;
PAUXCAPS = PAUXCAPSA;
NPAUXCAPS = NPAUXCAPSA;
LPAUXCAPS = LPAUXCAPSA;
{$endif}
HMIXEROBJ = THandle;
LPHMIXEROBJ = ^HMIXEROBJ;
HMIXER = THandle;
LPHMIXER = ^HMIXER;

function mixerGetNumDevs: UINT; stdcall;
 external 'winmm.dll' name 'mixerGetNumDevs';

type
_MIXERCAPSA = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of CHAR;
fdwSupport: DWORD;
cDestinations: DWORD;
end;
MIXERCAPSA = _MIXERCAPSA;
PMIXERCAPSA = ^_MIXERCAPSA;
LPMIXERCAPSA = ^_MIXERCAPSA;
_MIXERCAPSW = packed record
wMid: WORD;
wPid: WORD;
vDriverVersion: MMVERSION;
szPname: array [0..Pred(MAXPNAMELEN)] of WCHAR;
fdwSupport: DWORD;
cDestinations: DWORD;
end;
MIXERCAPSW = _MIXERCAPSW;
PMIXERCAPSW = ^_MIXERCAPSW;
LPMIXERCAPSW = ^_MIXERCAPSW;
{$ifdef UNICODE}
MIXERCAPS = MIXERCAPSW;
PMIXERCAPS = PMIXERCAPSW;
LPMIXERCAPS = LPMIXERCAPSW;
{$else}
MIXERCAPS = MIXERCAPSA;
PMIXERCAPS = PMIXERCAPSA;
LPMIXERCAPS = LPMIXERCAPSA;
{$endif}
_MIXERLINEA = packed 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)] of CHAR;
szName: array [0..Pred(MIXER_LONG_NAME_CHARS)] of CHAR;
Target: packed record
 dwType,dwDeviceID: DWORD;
 wMid,wPid: WORD;
 vDriverVersion:MMVERSION;
 szPname: array[0..pred(MAXPNAMELEN)] of Char;
end;
end;
MIXERLINEA = _MIXERLINEA;
PMIXERLINEA = ^_MIXERLINEA;
LPMIXERLINEA = ^_MIXERLINEA;
_MIXERLINEW = packed 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)] of WCHAR;
szName: array [0..Pred(MIXER_LONG_NAME_CHARS)] of WCHAR;
Target: packed record
 dwType,dwDeviceID: DWORD;
 wMid,wPid: WORD;
 vDriverVersion:MMVERSION;
 szPname: array[0..pred(MAXPNAMELEN)] of WChar;
end;
end;
MIXERLINEW = _MIXERLINEW;
PMIXERLINEW = ^_MIXERLINEW;
LPMIXERLINEW = ^_MIXERLINEW;
{$ifdef UNICODE}
MIXERLINE = MIXERLINEW;
PMIXERLINE = PMIXERLINEW;
LPMIXERLINE = LPMIXERLINEW;
{$else}
MIXERLINE = MIXERLINEA;
PMIXERLINE = PMIXERLINEA;
LPMIXERLINE = LPMIXERLINEA;
{$endif}
_MIXERCONTROLA = packed record
cbStruct: DWORD;
dwControlID: DWORD;
dwControlType: DWORD;
fdwControl: DWORD;
cMultipleItems: DWORD;
szShortName: array [0..Pred(MIXER_SHORT_NAME_CHARS)] of CHAR;
szName: array [0..Pred(MIXER_LONG_NAME_CHARS)] of CHAR;
Bounds: packed record
case integer of
 0: (lMinimum, lMaximum: longint);
 1: (dwMinimum, dwMaximum: DWORD);
 2: (dwReserved: array[0..5] of DWORD);
end;
Metrics: packed record
case Integer of
 0: (cSteps: DWORD);
 1: (cbCustomData: DWORD);
 2: (dwReserved: array[0..5] of DWORD);
end;
end;
MIXERCONTROLA = _MIXERCONTROLA;
PMIXERCONTROLA = ^_MIXERCONTROLA;
LPMIXERCONTROLA = ^_MIXERCONTROLA;
_MIXERCONTROLW = packed record
cbStruct: DWORD;
dwControlID: DWORD;
dwControlType: DWORD;
fdwControl: DWORD;
cMultipleItems: DWORD;
szShortName: array [0..Pred(MIXER_SHORT_NAME_CHARS)] of WCHAR;
szName: array [0..Pred(MIXER_LONG_NAME_CHARS)] of WCHAR;
Bounds: packed record
case integer of
 0: (lMinimum, lMaximum: longint);
 1: (dwMinimum, dwMaximum: DWORD);
 2: (dwReserved: array[0..5] of DWORD);
end;
Metrics: packed record
case Integer of
 0: (cSteps: DWORD);
 1: (cbCustomData: DWORD);
 2: (dwReserved: array[0..5] of DWORD);
end;
end;
MIXERCONTROLW = _MIXERCONTROLW;
PMIXERCONTROLW = ^_MIXERCONTROLW;
LPMIXERCONTROLW = ^_MIXERCONTROLW;
{$ifdef UNICODE}
MIXERCONTROL = MIXERCONTROLW;
PMIXERCONTROL = PMIXERCONTROLW;
LPMIXERCONTROL = LPMIXERCONTROLW;
{$else}
MIXERCONTROL = MIXERCONTROLA;
PMIXERCONTROL = PMIXERCONTROLA;
LPMIXERCONTROL = LPMIXERCONTROLA;
{$endif}
_MIXERLINECONTROLSA = packed record
cbStruct: DWORD;
dwLineID: DWORD;
case Integer of
 0: (dwControlID: DWORD);
 1: (dwControlType, cControls, cbmxctrl: DWORD; pamxctrl: PMIXERCONTROLA);
end;
MIXERLINECONTROLSA = _MIXERLINECONTROLSA;
PMIXERLINECONTROLSA = ^_MIXERLINECONTROLSA;
LPMIXERLINECONTROLSA = ^_MIXERLINECONTROLSA;
_MIXERLINECONTROLSW = packed record
cbStruct: DWORD;
dwLineID: DWORD;
case Integer of
 0: (dwControlID: DWORD);
 1: (dwControlType, cControls, cbmxctrl: DWORD; pamxctrl: PMIXERCONTROLW);
end;
MIXERLINECONTROLSW = _MIXERLINECONTROLSW;
PMIXERLINECONTROLSW = ^_MIXERLINECONTROLSW;
LPMIXERLINECONTROLSW = ^_MIXERLINECONTROLSW;
{$ifdef UNICODE}
MIXERLINECONTROLS = MIXERLINECONTROLSW;
PMIXERLINECONTROLS = PMIXERLINECONTROLSW;
LPMIXERLINECONTROLS = LPMIXERLINECONTROLSW;
{$else}
MIXERLINECONTROLS = MIXERLINECONTROLSA;
PMIXERLINECONTROLS = PMIXERLINECONTROLSA;
LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA;
{$endif}
tMIXERCONTROLDETAILS = packed record
cbStruct: DWORD;
dwControlID: DWORD;
cChannels: DWORD;
case Integer of
 0: (hwndOwner: tHandle);
 1: (cMultipleItems, cbDetails: DWORD;
     paDetails: Pointer);
end;
MIXERCONTROLDETAILS = tMIXERCONTROLDETAILS;
PMIXERCONTROLDETAILS = ^tMIXERCONTROLDETAILS;
LPMIXERCONTROLDETAILS = ^tMIXERCONTROLDETAILS;
_MIXERCONTROLDETAILS_LISTTEXTA = packed record
dwParam1: DWORD;
dwParam2: DWORD;
szName: array [0..Pred(MIXER_LONG_NAME_CHARS)] of CHAR;
end;
MIXERCONTROLDETAILS_LISTTEXTA = _MIXERCONTROLDETAILS_LISTTEXTA;
PMIXERCONTROLDETAILS_LISTTEXTA = ^_MIXERCONTROLDETAILS_LISTTEXTA;
LPMIXERCONTROLDETAILS_LISTTEXTA = ^_MIXERCONTROLDETAILS_LISTTEXTA;
_MIXERCONTROLDETAILS_LISTTEXTW = packed record
dwParam1: DWORD;
dwParam2: DWORD;
szName: array [0..Pred(MIXER_LONG_NAME_CHARS)] of WCHAR;
end;
MIXERCONTROLDETAILS_LISTTEXTW = _MIXERCONTROLDETAILS_LISTTEXTW;
PMIXERCONTROLDETAILS_LISTTEXTW = ^_MIXERCONTROLDETAILS_LISTTEXTW;
LPMIXERCONTROLDETAILS_LISTTEXTW = ^_MIXERCONTROLDETAILS_LISTTEXTW;
{$ifdef UNICODE}
MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTW;
PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTW;
LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTW;
{$else}
MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA;
PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA;
LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA;
{$endif}
_MIXERCONTROLDETAILS_BOOLEAN = packed record
fValue: longint;
end;
MIXERCONTROLDETAILS_BOOLEAN = _MIXERCONTROLDETAILS_BOOLEAN;
PMIXERCONTROLDETAILS_BOOLEAN = ^_MIXERCONTROLDETAILS_BOOLEAN;
LPMIXERCONTROLDETAILS_BOOLEAN = ^_MIXERCONTROLDETAILS_BOOLEAN;
_MIXERCONTROLDETAILS_SIGNED = packed record
lValue: longint;
end;
MIXERCONTROLDETAILS_SIGNED = _MIXERCONTROLDETAILS_SIGNED;
PMIXERCONTROLDETAILS_SIGNED = ^_MIXERCONTROLDETAILS_SIGNED;
LPMIXERCONTROLDETAILS_SIGNED = ^_MIXERCONTROLDETAILS_SIGNED;

_MIXERCONTROLDETAILS_UNSIGNED = packed record
dwValue: DWORD;
end;
MIXERCONTROLDETAILS_UNSIGNED = _MIXERCONTROLDETAILS_UNSIGNED;
PMIXERCONTROLDETAILS_UNSIGNED = ^_MIXERCONTROLDETAILS_UNSIGNED;
LPMIXERCONTROLDETAILS_UNSIGNED = ^_MIXERCONTROLDETAILS_UNSIGNED;
LPTIMECALLBACK = procedure(uTimerID, uMsg: UINT; dwUser, dw1, dw2: DWORD); stdcall;
_timecaps = packed record
wPeriodMin: UINT;
wPeriodMax: UINT;
end;
TIMECAPS = _timecaps;
PTIMECAPS = ^_timecaps;
NPTIMECAPS = ^_timecaps;
LPTIMECAPS = ^_timecaps;
_JOYCAPSA = packed record
wMid: WORD;
wPid: WORD;
szPname: array [0..Pred(MAXPNAMELEN)] of 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)] of CHAR;
szOEMVxD: array [0..Pred(MAX_JOYSTICKOEMVXDNAME)] of CHAR;
end;
JOYCAPSA = _JOYCAPSA;
PJOYCAPSA = ^_JOYCAPSA;
NPJOYCAPSA = ^_JOYCAPSA;
LPJOYCAPSA = ^_JOYCAPSA;
_JOYCAPSW = packed record
wMid: WORD;
wPid: WORD;
szPname: array [0..Pred(MAXPNAMELEN)] of 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)] of WCHAR;
szOEMVxD: array [0..Pred(MAX_JOYSTICKOEMVXDNAME)] of WCHAR;
end;
JOYCAPSW = _JOYCAPSW;
PJOYCAPSW = ^_JOYCAPSW;
NPJOYCAPSW = ^_JOYCAPSW;
LPJOYCAPSW = ^_JOYCAPSW;
{$ifdef UNICODE}
JOYCAPS = JOYCAPSW;
PJOYCAPS = PJOYCAPSW;
NPJOYCAPS = NPJOYCAPSW;
LPJOYCAPS = LPJOYCAPSW;
{$else}
JOYCAPS = JOYCAPSA;
PJOYCAPS = PJOYCAPSA;
NPJOYCAPS = NPJOYCAPSA;
LPJOYCAPS = LPJOYCAPSA;
{$endif}
_joyinfo = packed record
wXpos: UINT;
wYpos: UINT;
wZpos: UINT;
wButtons: UINT;
end;
JOYINFO = _joyinfo;
PJOYINFO = ^_joyinfo;
NPJOYINFO = ^_joyinfo;
LPJOYINFO = ^_joyinfo;
_joyinfoex = packed 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;
end;
JOYINFOEX = _joyinfoex;
PJOYINFOEX = ^_joyinfoex;
NPJOYINFOEX = ^_joyinfoex;
LPJOYINFOEX = ^_joyinfoex;
FOURCC = DWORD;
HPSTR = ^char;
HMMIO = THandle;
LPMMIOPROC = function(x1: LPSTR; x2: UINT; x3, x4: LPARAM): LRESULT; stdcall;
_MMIOINFO = packed record
dwFlags: DWORD;
fccIOProc: FOURCC;
pIOProc: LPMMIOPROC;
wErrorRet: UINT;
htask: HTASK;
cchBuffer: longint;
pchBuffer: HPSTR;
pchNext: HPSTR;
pchEndRead: HPSTR;
pchEndWrite: HPSTR;
lBufOffset: longint;
lDiskOffset: longint;
adwInfo: array [0..Pred(3)] of DWORD;
dwReserved1: DWORD;
dwReserved2: DWORD;
hmmio: HMMIO;
end;
MMIOINFO = _MMIOINFO;
PMMIOINFO = ^_MMIOINFO;
NPMMIOINFO = ^_MMIOINFO;
LPMMIOINFO = ^_MMIOINFO;
LPCMMIOINFO = ^MMIOINFO;
_MMCKINFO = packed record
ckid: FOURCC;
cksize: DWORD;
fccType: FOURCC;
dwDataOffset: DWORD;
dwFlags: DWORD;
end;
MMCKINFO = _MMCKINFO;
PMMCKINFO = ^_MMCKINFO;
NPMMCKINFO = ^_MMCKINFO;
LPMMCKINFO = ^_MMCKINFO;
LPCMMCKINFO = ^MMCKINFO;
MCIERROR = DWORD;
MCIDEVICEID = UINT;
YIELDPROC = function(mciId: MCIDEVICEID;  dwYieldData: DWORD): UINT; stdcall;
_MCI_GENERIC_PARMS = packed record
dwCallback: DWORD;
end;
MCI_GENERIC_PARMS = _MCI_GENERIC_PARMS;
PMCI_GENERIC_PARMS = ^_MCI_GENERIC_PARMS;
LPMCI_GENERIC_PARMS = ^_MCI_GENERIC_PARMS;
_MCI_OPEN_PARMSA = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCSTR;
lpstrElementName: LPCSTR;
lpstrAlias: LPCSTR;
end;
MCI_OPEN_PARMSA = _MCI_OPEN_PARMSA;
PMCI_OPEN_PARMSA = ^_MCI_OPEN_PARMSA;
LPMCI_OPEN_PARMSA = ^_MCI_OPEN_PARMSA;
_MCI_OPEN_PARMSW = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCWSTR;
lpstrElementName: LPCWSTR;
lpstrAlias: LPCWSTR;
end;
MCI_OPEN_PARMSW = _MCI_OPEN_PARMSW;
PMCI_OPEN_PARMSW = ^_MCI_OPEN_PARMSW;
LPMCI_OPEN_PARMSW = ^_MCI_OPEN_PARMSW;
{$ifdef UNICODE}
MCI_OPEN_PARMS = MCI_OPEN_PARMSW;
PMCI_OPEN_PARMS = PMCI_OPEN_PARMSW;
LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSW;
{$else}
MCI_OPEN_PARMS = MCI_OPEN_PARMSA;
PMCI_OPEN_PARMS = PMCI_OPEN_PARMSA;
LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSA;
{$endif}
_MCI_PLAY_PARMS = packed record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
end;
MCI_PLAY_PARMS = _MCI_PLAY_PARMS;
PMCI_PLAY_PARMS = ^_MCI_PLAY_PARMS;
LPMCI_PLAY_PARMS = ^_MCI_PLAY_PARMS;
_MCI_SEEK_PARMS = packed record
dwCallback: DWORD;
dwTo: DWORD;
end;
MCI_SEEK_PARMS = _MCI_SEEK_PARMS;
PMCI_SEEK_PARMS = ^_MCI_SEEK_PARMS;
LPMCI_SEEK_PARMS = ^_MCI_SEEK_PARMS;
_MCI_STATUS_PARMS = packed record
dwCallback: DWORD;
dwReturn: DWORD;
dwItem: DWORD;
dwTrack: DWORD;
end;
MCI_STATUS_PARMS = _MCI_STATUS_PARMS;
PMCI_STATUS_PARMS = ^_MCI_STATUS_PARMS;
LPMCI_STATUS_PARMS = ^_MCI_STATUS_PARMS;
_MCI_INFO_PARMSA = packed record
dwCallback: DWORD;
lpstrReturn: PChar;
dwRetSize: DWORD;
end;
MCI_INFO_PARMSA = _MCI_INFO_PARMSA;
LPMCI_INFO_PARMSA = ^_MCI_INFO_PARMSA;
_MCI_INFO_PARMSW = packed record
dwCallback: DWORD;
lpstrReturn: LPWSTR;
dwRetSize: DWORD;
end;
MCI_INFO_PARMSW = _MCI_INFO_PARMSW;
LPMCI_INFO_PARMSW = ^_MCI_INFO_PARMSW;
{$ifdef UNICODE}
MCI_INFO_PARMS = MCI_INFO_PARMSW;
LPMCI_INFO_PARMS = LPMCI_INFO_PARMSW;
{$else}
MCI_INFO_PARMS = MCI_INFO_PARMSA;
LPMCI_INFO_PARMS = LPMCI_INFO_PARMSA;
{$endif}
_MCI_GETDEVCAPS_PARMS = packed record
dwCallback: DWORD;
dwReturn: DWORD;
dwItem: DWORD;
end;
MCI_GETDEVCAPS_PARMS = _MCI_GETDEVCAPS_PARMS;
PMCI_GETDEVCAPS_PARMS = ^_MCI_GETDEVCAPS_PARMS;
LPMCI_GETDEVCAPS_PARMS = ^_MCI_GETDEVCAPS_PARMS;
_MCI_SYSINFO_PARMSA = packed record
dwCallback: DWORD;
lpstrReturn: PChar;
dwRetSize: DWORD;
dwNumber: DWORD;
wDeviceType: UINT;
end;
MCI_SYSINFO_PARMSA = _MCI_SYSINFO_PARMSA;
PMCI_SYSINFO_PARMSA = ^_MCI_SYSINFO_PARMSA;
LPMCI_SYSINFO_PARMSA = ^_MCI_SYSINFO_PARMSA;
_MCI_SYSINFO_PARMSW = packed record
dwCallback: DWORD;
lpstrReturn: LPWSTR;
dwRetSize: DWORD;
dwNumber: DWORD;
wDeviceType: UINT;
end;
MCI_SYSINFO_PARMSW = _MCI_SYSINFO_PARMSW;
PMCI_SYSINFO_PARMSW = ^_MCI_SYSINFO_PARMSW;
LPMCI_SYSINFO_PARMSW = ^_MCI_SYSINFO_PARMSW;
{$ifdef UNICODE}
MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSW;
PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSW;
LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSW;
{$else}
MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSA;
PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSA;
LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSA;
{$endif}
_MCI_SET_PARMS = packed record
dwCallback: DWORD;
dwTimeFormat: DWORD;
dwAudio: DWORD;
end;
MCI_SET_PARMS = _MCI_SET_PARMS;
PMCI_SET_PARMS = ^_MCI_SET_PARMS;
LPMCI_SET_PARMS = ^_MCI_SET_PARMS;
_MCI_BREAK_PARMS = packed record
dwCallback: DWORD;
nVirtKey: longint;
hwndBreak: HWND;
end;
MCI_BREAK_PARMS = _MCI_BREAK_PARMS;
PMCI_BREAK_PARMS = ^_MCI_BREAK_PARMS;
LPMCI_BREAK_PARMS = ^_MCI_BREAK_PARMS;
_MCI_SAVE_PARMSA = packed record
dwCallback: DWORD;
lpfilename: LPCSTR;
end;
MCI_SAVE_PARMSA = _MCI_SAVE_PARMSA;
PMCI_SAVE_PARMSA = ^_MCI_SAVE_PARMSA;
LPMCI_SAVE_PARMSA = ^_MCI_SAVE_PARMSA;
_MCI_SAVE_PARMSW = packed record
dwCallback: DWORD;
lpfilename: LPCWSTR;
end;
MCI_SAVE_PARMSW = _MCI_SAVE_PARMSW;
PMCI_SAVE_PARMSW = ^_MCI_SAVE_PARMSW;
LPMCI_SAVE_PARMSW = ^_MCI_SAVE_PARMSW;
{$ifdef UNICODE}
MCI_SAVE_PARMS = MCI_SAVE_PARMSW;
PMCI_SAVE_PARMS = PMCI_SAVE_PARMSW;
LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSW;
{$else}
MCI_SAVE_PARMS = MCI_SAVE_PARMSA;
PMCI_SAVE_PARMS = PMCI_SAVE_PARMSA;
LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSA;
{$endif}
_MCI_LOAD_PARMSA = packed record
dwCallback: DWORD;
lpfilename: LPCSTR;
end;
MCI_LOAD_PARMSA = _MCI_LOAD_PARMSA;
PMCI_LOAD_PARMSA = ^_MCI_LOAD_PARMSA;
LPMCI_LOAD_PARMSA = ^_MCI_LOAD_PARMSA;
_MCI_LOAD_PARMSW = packed record
dwCallback: DWORD;
lpfilename: LPCWSTR;
end;
MCI_LOAD_PARMSW = _MCI_LOAD_PARMSW;
PMCI_LOAD_PARMSW = ^_MCI_LOAD_PARMSW;
LPMCI_LOAD_PARMSW = ^_MCI_LOAD_PARMSW;
{$ifdef UNICODE}
MCI_LOAD_PARMS = MCI_LOAD_PARMSW;
PMCI_LOAD_PARMS = PMCI_LOAD_PARMSW;
LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSW;
{$else}
MCI_LOAD_PARMS = MCI_LOAD_PARMSA;
PMCI_LOAD_PARMS = PMCI_LOAD_PARMSA;
LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSA;
{$endif}
_MCI_RECORD_PARMS = packed record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
end;
MCI_RECORD_PARMS = _MCI_RECORD_PARMS;
LPMCI_RECORD_PARMS = ^_MCI_RECORD_PARMS;
_MCI_VD_PLAY_PARMS = packed record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
dwSpeed: DWORD;
end;
MCI_VD_PLAY_PARMS = _MCI_VD_PLAY_PARMS;
PMCI_VD_PLAY_PARMS = ^_MCI_VD_PLAY_PARMS;
LPMCI_VD_PLAY_PARMS = ^_MCI_VD_PLAY_PARMS;
_MCI_VD_STEP_PARMS = packed record
dwCallback: DWORD;
dwFrames: DWORD;
end;
MCI_VD_STEP_PARMS = _MCI_VD_STEP_PARMS;
PMCI_VD_STEP_PARMS = ^_MCI_VD_STEP_PARMS;
LPMCI_VD_STEP_PARMS = ^_MCI_VD_STEP_PARMS;
_MCI_VD_ESCAPE_PARMSA = packed record
dwCallback: DWORD;
lpstrCommand: LPCSTR;
end;
MCI_VD_ESCAPE_PARMSA = _MCI_VD_ESCAPE_PARMSA;
PMCI_VD_ESCAPE_PARMSA = ^_MCI_VD_ESCAPE_PARMSA;
LPMCI_VD_ESCAPE_PARMSA = ^_MCI_VD_ESCAPE_PARMSA;
_MCI_VD_ESCAPE_PARMSW = packed record
dwCallback: DWORD;
lpstrCommand: LPCWSTR;
end;
MCI_VD_ESCAPE_PARMSW = _MCI_VD_ESCAPE_PARMSW;
PMCI_VD_ESCAPE_PARMSW = ^_MCI_VD_ESCAPE_PARMSW;
LPMCI_VD_ESCAPE_PARMSW = ^_MCI_VD_ESCAPE_PARMSW;
{$ifdef UNICODE}
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}
MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSA;
PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSA;
LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSA;
{$endif}
_MCI_WAVE_OPEN_PARMSA = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCSTR;
lpstrElementName: LPCSTR;
lpstrAlias: LPCSTR;
dwBufferSeconds: DWORD;
end;
MCI_WAVE_OPEN_PARMSA = _MCI_WAVE_OPEN_PARMSA;
PMCI_WAVE_OPEN_PARMSA = ^_MCI_WAVE_OPEN_PARMSA;
LPMCI_WAVE_OPEN_PARMSA = ^_MCI_WAVE_OPEN_PARMSA;
_MCI_WAVE_OPEN_PARMSW = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCWSTR;
lpstrElementName: LPCWSTR;
lpstrAlias: LPCWSTR;
dwBufferSeconds: DWORD;
end;
MCI_WAVE_OPEN_PARMSW = _MCI_WAVE_OPEN_PARMSW;
PMCI_WAVE_OPEN_PARMSW = ^_MCI_WAVE_OPEN_PARMSW;
LPMCI_WAVE_OPEN_PARMSW = ^_MCI_WAVE_OPEN_PARMSW;
{$ifdef UNICODE}
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}
MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSA;
PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSA;
LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSA;
{$endif}
_MCI_WAVE_DELETE_PARMS = packed record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
end;
MCI_WAVE_DELETE_PARMS = _MCI_WAVE_DELETE_PARMS;
PMCI_WAVE_DELETE_PARMS = ^_MCI_WAVE_DELETE_PARMS;
LPMCI_WAVE_DELETE_PARMS = ^_MCI_WAVE_DELETE_PARMS;
_MCI_WAVE_SET_PARMS = packed record
dwCallback: DWORD;
dwTimeFormat: DWORD;
dwAudio: DWORD;
wInput: UINT;
wOutput: UINT;
wFormatTag: WORD;
wReserved2: WORD;
nChannels: WORD;
wReserved3: WORD;
nSamplesPerSec: DWORD;
nAvgBytesPerSec: DWORD;
nBlockAlign: WORD;
wReserved4: WORD;
wBitsPerSample: WORD;
wReserved5: WORD;
end;
MCI_WAVE_SET_PARMS = _MCI_WAVE_SET_PARMS;
PMCI_WAVE_SET_PARMS = ^_MCI_WAVE_SET_PARMS;
LPMCI_WAVE_SET_PARMS = ^_MCI_WAVE_SET_PARMS;
_MCI_SEQ_SET_PARMS = packed record
dwCallback: DWORD;
dwTimeFormat: DWORD;
dwAudio: DWORD;
dwTempo: DWORD;
dwPort: DWORD;
dwSlave: DWORD;
dwMaster: DWORD;
dwOffset: DWORD;
end;
MCI_SEQ_SET_PARMS = _MCI_SEQ_SET_PARMS;
PMCI_SEQ_SET_PARMS = ^_MCI_SEQ_SET_PARMS;
LPMCI_SEQ_SET_PARMS = ^_MCI_SEQ_SET_PARMS;
_MCI_ANIM_OPEN_PARMSA = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCSTR;
lpstrElementName: LPCSTR;
lpstrAlias: LPCSTR;
dwStyle: DWORD;
hWndParent: HWND;
end;
MCI_ANIM_OPEN_PARMSA = _MCI_ANIM_OPEN_PARMSA;
PMCI_ANIM_OPEN_PARMSA = ^_MCI_ANIM_OPEN_PARMSA;
LPMCI_ANIM_OPEN_PARMSA = ^_MCI_ANIM_OPEN_PARMSA;
_MCI_ANIM_OPEN_PARMSW = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCWSTR;
lpstrElementName: LPCWSTR;
lpstrAlias: LPCWSTR;
dwStyle: DWORD;
hWndParent: HWND;
end;
MCI_ANIM_OPEN_PARMSW = _MCI_ANIM_OPEN_PARMSW;
PMCI_ANIM_OPEN_PARMSW = ^_MCI_ANIM_OPEN_PARMSW;
LPMCI_ANIM_OPEN_PARMSW = ^_MCI_ANIM_OPEN_PARMSW;
{$ifdef UNICODE}
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}
MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSA;
PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSA;
LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSA;
{$endif}
_MCI_ANIM_WINDOW_PARMSW = packed record
dwCallback: DWORD;
hWnd: HWND;
nCmdShow: UINT;
lpstrText: LPCWSTR;
end;
MCI_ANIM_WINDOW_PARMSW = _MCI_ANIM_WINDOW_PARMSW;
PMCI_ANIM_WINDOW_PARMSW = ^_MCI_ANIM_WINDOW_PARMSW;
LPMCI_ANIM_WINDOW_PARMSW = ^_MCI_ANIM_WINDOW_PARMSW;
_MCI_ANIM_STEP_PARMS = packed record
dwCallback: DWORD;
dwFrames: DWORD;
end;
MCI_ANIM_STEP_PARMS = _MCI_ANIM_STEP_PARMS;
PMCI_ANIM_STEP_PARMS = ^_MCI_ANIM_STEP_PARMS;
LPMCI_ANIM_STEP_PARMS = ^_MCI_ANIM_STEP_PARMS;
_MCI_ANIM_WINDOW_PARMSA = packed record
dwCallback: DWORD;
hWnd: HWND;
nCmdShow: UINT;
lpstrText: LPCSTR;
end;
MCI_ANIM_WINDOW_PARMSA = _MCI_ANIM_WINDOW_PARMSA;
PMCI_ANIM_WINDOW_PARMSA = ^_MCI_ANIM_WINDOW_PARMSA;
LPMCI_ANIM_WINDOW_PARMSA = ^_MCI_ANIM_WINDOW_PARMSA;
_MCI_ANIM_PLAY_PARMS = packed record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
dwSpeed: DWORD;
end;
MCI_ANIM_PLAY_PARMS = _MCI_ANIM_PLAY_PARMS;
PMCI_ANIM_PLAY_PARMS = ^_MCI_ANIM_PLAY_PARMS;
LPMCI_ANIM_PLAY_PARMS = ^_MCI_ANIM_PLAY_PARMS;
{$ifdef UNICODE}
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}
MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSA;
PMCI_ANIM_WINDOW_PARMS = PMCI_ANIM_WINDOW_PARMSA;
LPMCI_ANIM_WINDOW_PARMS = LPMCI_ANIM_WINDOW_PARMSA;
{$endif}
_MCI_ANIM_RECT_PARMS = packed record
dwCallback: DWORD;
rc: TRECT;
end;
MCI_ANIM_RECT_PARMS = _MCI_ANIM_RECT_PARMS;
PMCI_ANIM_RECT_PARMS = ^MCI_ANIM_RECT_PARMS;
LPMCI_ANIM_RECT_PARMS = ^MCI_ANIM_RECT_PARMS;
_MCI_ANIM_UPDATE_PARMS = packed record
dwCallback: DWORD;
rc: TRECT;
hDC: HDC;
end;
MCI_ANIM_UPDATE_PARMS = _MCI_ANIM_UPDATE_PARMS;
PMCI_ANIM_UPDATE_PARMS = ^_MCI_ANIM_UPDATE_PARMS;
LPMCI_ANIM_UPDATE_PARMS = ^_MCI_ANIM_UPDATE_PARMS;
_MCI_OVLY_OPEN_PARMSA = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCSTR;
lpstrElementName: LPCSTR;
lpstrAlias: LPCSTR;
dwStyle: DWORD;
hWndParent: HWND;
end;
MCI_OVLY_OPEN_PARMSA = _MCI_OVLY_OPEN_PARMSA;
PMCI_OVLY_OPEN_PARMSA = ^_MCI_OVLY_OPEN_PARMSA;
LPMCI_OVLY_OPEN_PARMSA = ^_MCI_OVLY_OPEN_PARMSA;
_MCI_OVLY_OPEN_PARMSW = packed record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: LPCWSTR;
lpstrElementName: LPCWSTR;
lpstrAlias: LPCWSTR;
dwStyle: DWORD;
hWndParent: HWND;
end;
MCI_OVLY_OPEN_PARMSW = _MCI_OVLY_OPEN_PARMSW;
PMCI_OVLY_OPEN_PARMSW = ^_MCI_OVLY_OPEN_PARMSW;
LPMCI_OVLY_OPEN_PARMSW = ^_MCI_OVLY_OPEN_PARMSW;
{$ifdef UNICODE}
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}
MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSA;
PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSA;
LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSA;
{$endif}
_MCI_OVLY_WINDOW_PARMSA = packed record
dwCallback: DWORD;
hWnd: HWND;
nCmdShow: UINT;
lpstrText: LPCSTR;
end;
MCI_OVLY_WINDOW_PARMSA = _MCI_OVLY_WINDOW_PARMSA;
PMCI_OVLY_WINDOW_PARMSA = ^_MCI_OVLY_WINDOW_PARMSA;
LPMCI_OVLY_WINDOW_PARMSA = ^_MCI_OVLY_WINDOW_PARMSA;
_MCI_OVLY_WINDOW_PARMSW = packed record
dwCallback: DWORD;
hWnd: HWND;
nCmdShow: UINT;
lpstrText: LPCWSTR;
end;
MCI_OVLY_WINDOW_PARMSW = _MCI_OVLY_WINDOW_PARMSW;
PMCI_OVLY_WINDOW_PARMSW = ^_MCI_OVLY_WINDOW_PARMSW;
LPMCI_OVLY_WINDOW_PARMSW = ^_MCI_OVLY_WINDOW_PARMSW;
{$ifdef UNICODE}
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}
MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSA;
PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSA;
LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSA;
{$endif}
_MCI_OVLY_RECT_PARMS = packed record
dwCallback: DWORD;
rc: TRECT;
end;
MCI_OVLY_RECT_PARMS = _MCI_OVLY_RECT_PARMS;
PMCI_OVLY_RECT_PARMS = ^_MCI_OVLY_RECT_PARMS;
LPMCI_OVLY_RECT_PARMS = ^_MCI_OVLY_RECT_PARMS;
_MCI_OVLY_SAVE_PARMSA = packed record
dwCallback: DWORD;
lpfilename: LPCSTR;
rc: TRECT;
end;
MCI_OVLY_SAVE_PARMSA = _MCI_OVLY_SAVE_PARMSA;
PMCI_OVLY_SAVE_PARMSA = ^_MCI_OVLY_SAVE_PARMSA;
LPMCI_OVLY_SAVE_PARMSA = ^_MCI_OVLY_SAVE_PARMSA;
_MCI_OVLY_SAVE_PARMSW = packed record
dwCallback: DWORD;
lpfilename: LPCWSTR;
rc: TRECT;
end;
MCI_OVLY_SAVE_PARMSW = _MCI_OVLY_SAVE_PARMSW;
PMCI_OVLY_SAVE_PARMSW = ^_MCI_OVLY_SAVE_PARMSW;
LPMCI_OVLY_SAVE_PARMSW = ^_MCI_OVLY_SAVE_PARMSW;
{$ifdef UNICODE}
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}
MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSA;
PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSA;
LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSA;
{$endif}
_MCI_OVLY_LOAD_PARMSA = packed record
dwCallback: DWORD;
lpfilename: LPCSTR;
rc: TRECT;
end;
MCI_OVLY_LOAD_PARMSA = _MCI_OVLY_LOAD_PARMSA;
PMCI_OVLY_LOAD_PARMSA = ^_MCI_OVLY_LOAD_PARMSA;
LPMCI_OVLY_LOAD_PARMSA = ^_MCI_OVLY_LOAD_PARMSA;
_MCI_OVLY_LOAD_PARMSW = packed record
dwCallback: DWORD;
lpfilename: LPCWSTR;
rc: TRECT;
end;
MCI_OVLY_LOAD_PARMSW = _MCI_OVLY_LOAD_PARMSW;
PMCI_OVLY_LOAD_PARMSW = ^_MCI_OVLY_LOAD_PARMSW;
LPMCI_OVLY_LOAD_PARMSW = ^_MCI_OVLY_LOAD_PARMSW;
{$ifdef UNICODE}
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}
MCI_OVLY_LOAD_PARMS = MCI_OVLY_LOAD_PARMSA;
PMCI_OVLY_LOAD_PARMS = PMCI_OVLY_LOAD_PARMSA;
LPMCI_OVLY_LOAD_PARMS = LPMCI_OVLY_LOAD_PARMSA;
{$endif}
(*////////////////////////////////////////////////////////*)
(* Function prototypes*)
(*////////////////////////////////////////////////////////*)

function mmioStringToFOURCCA(x1: LPCSTR; x2: UINT): FOURCC; stdcall;
 external 'winmm.dll' name 'mmioStringToFOURCCA';

function mmioStringToFOURCCW(x1: LPCWSTR; x2: UINT): FOURCC; stdcall;
 external 'winmm.dll' name 'mmioStringToFOURCCW';

function mmioStringToFOURCC(x1: PChar; x2: UINT): FOURCC; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mmioStringToFOURCCW'
 {$else}'mmioStringToFOURCCA'
 {$endif};

function mmioInstallIOProcA(x1: FOURCC; x2: LPMMIOPROC; x3: DWORD): LPMMIOPROC; stdcall;
 external 'winmm.dll' name 'mmioInstallIOProcA';

function mmioInstallIOProcW(x1: FOURCC; x2: LPMMIOPROC; x3: DWORD): LPMMIOPROC; stdcall;
 external 'winmm.dll' name 'mmioInstallIOProcW';

function mmioInstallIOProc(x1: FOURCC; x2: LPMMIOPROC; x3: DWORD): LPMMIOPROC; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mmioInstallIOProcW'
 {$else}'mmioInstallIOProcA'
 {$endif};

function mmioOpenA(x1: LPSTR; x2: LPMMIOINFO; x3: DWORD): HMMIO; stdcall;
 external 'winmm.dll' name 'mmioOpenA';

function mmioOpenW(x1: LPWSTR; x2: LPMMIOINFO; x3: DWORD): HMMIO; stdcall;
 external 'winmm.dll' name 'mmioOpenW';

function mmioOpen(x1: PChar; x2: LPMMIOINFO; x3: DWORD): HMMIO; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mmioOpenW'
 {$else}'mmioOpenA'
 {$endif};

function mmioRenameA(x1: LPCSTR; x2: LPCSTR; x3: LPCMMIOINFO; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioRenameA';

function mmioRenameW(x1: LPCWSTR; x2: LPCWSTR; x3: LPCMMIOINFO; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioRenameW';

function mmioRename(x1: PChar; x2: PChar; x3: LPCMMIOINFO; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mmioRenameW'
 {$else}'mmioRenameA'
 {$endif};

function mmioClose(x1: HMMIO; x2: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioClose';

function mmioRead(x1: HMMIO; x2: HPSTR; x3: LONG): LONG; stdcall;
 external 'winmm.dll' name 'mmioRead';

function mmioWrite(x1: HMMIO; x2: pchar; x3: LONG): LONG; stdcall;
 external 'winmm.dll' name 'mmioWrite';

function mmioSeek(x1: HMMIO; x2: LONG; x3: WINT): LONG; stdcall;
 external 'winmm.dll' name 'mmioSeek';

function mmioGetInfo(x1: HMMIO; x2: LPMMIOINFO; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioGetInfo';

function mmioSetInfo(x1: HMMIO; x2: LPCMMIOINFO; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioSetInfo';

function mmioSetBuffer(x1: HMMIO; x2: LPSTR; x3: LONG; x4: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioSetBuffer';

function mmioFlush(x1: HMMIO; x2: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioFlush';

function mmioAdvance(x1: HMMIO; x2: LPMMIOINFO; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioAdvance';

function mmioSendMessage(x1: HMMIO; x2: UINT; x3: LPARAM; x4: LPARAM): LRESULT; stdcall;
 external 'winmm.dll' name 'mmioSendMessage';

function mmioDescend(x1: HMMIO; x2: LPMMCKINFO; x3: PMMCKINFO; x4: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioDescend';

function mmioAscend(x1: HMMIO; x2: LPMMCKINFO; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioAscend';

function mmioCreateChunk(x1: HMMIO; x2: LPMMCKINFO; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mmioCreateChunk';

function mciSendCommandA(x1: MCIDEVICEID; x2: UINT; x3: DWORD; x4: DWORD): MCIERROR; stdcall;
 external 'winmm.dll' name 'mciSendCommandA';

function mciSendCommandW(x1: MCIDEVICEID; x2: UINT; x3: DWORD; x4: DWORD): MCIERROR; stdcall;
 external 'winmm.dll' name 'mciSendCommandW';

function mciSendCommand(x1: MCIDEVICEID; x2: UINT; x3: DWORD; x4: DWORD): MCIERROR; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mciSendCommandW'
 {$else}'mciSendCommandA'
 {$endif};

function mciSendStringA(x1: LPCSTR; x2: LPSTR; x3: UINT; x4: HWND): MCIERROR; stdcall;
 external 'winmm.dll' name 'mciSendStringA';

function mciSendStringW(x1: LPCWSTR; x2: LPWSTR; x3: UINT; x4: HWND): MCIERROR; stdcall;
 external 'winmm.dll' name 'mciSendStringW';

function mciSendString(x1: PChar; x2: PChar; x3: UINT; x4: HWND): MCIERROR; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mciSendStringW'
 {$else}'mciSendStringA'
 {$endif};

function mciGetDeviceIDA(x1: LPCSTR): MCIDEVICEID; stdcall;
 external 'winmm.dll' name 'mciGetDeviceIDA';

function mciGetDeviceIDW(x1: LPCWSTR): MCIDEVICEID; stdcall;
 external 'winmm.dll' name 'mciGetDeviceIDW';

function mciGetDeviceID(x1: PChar): MCIDEVICEID; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mciGetDeviceIDW'
 {$else}'mciGetDeviceIDA'
 {$endif};

function mciGetDeviceIDFromElementIDA(x1: DWORD; x2: LPCSTR): MCIDEVICEID; stdcall;
 external 'winmm.dll' name 'mciGetDeviceIDFromElementIDA';

function mciGetDeviceIDFromElementIDW(x1: DWORD; x2: LPCWSTR): MCIDEVICEID; stdcall;
 external 'winmm.dll' name 'mciGetDeviceIDFromElementIDW';

function mciGetDeviceIDFromElementID(x1: DWORD; x2: PChar): MCIDEVICEID; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mciGetDeviceIDFromElementIDW'
 {$else}'mciGetDeviceIDFromElementIDA'
 {$endif};

function mciGetErrorStringA(x1: MCIERROR; x2: LPSTR; x3: UINT): BOOL; stdcall;
 external 'winmm.dll' name 'mciGetErrorStringA';

function mciGetErrorStringW(x1: MCIERROR; x2: LPWSTR; x3: UINT): BOOL; stdcall;
 external 'winmm.dll' name 'mciGetErrorStringW';

function mciGetErrorString(x1: MCIERROR; x2: PChar; x3: UINT): BOOL; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mciGetErrorStringW'
 {$else}'mciGetErrorStringA'
 {$endif};

function mciSetYieldProc(x1: MCIDEVICEID; x2: YIELDPROC; x3: DWORD): BOOL; stdcall;
 external 'winmm.dll' name 'mciSetYieldProc';

function mciGetCreatorTask(x1: MCIDEVICEID): HTASK; stdcall;
 external 'winmm.dll' name 'mciGetCreatorTask';

function mciGetYieldProc(x1: MCIDEVICEID; x2: LPDWORD): YIELDPROC; stdcall;
 external 'winmm.dll' name 'mciGetYieldProc';

function mciExecute(x1: LPCSTR): BOOL; stdcall;
 external 'winmm.dll' name 'mciExecute';

function joyGetPos(x1: UINT; x2: LPJOYINFO): MMRESULT; stdcall;
 external 'winmm.dll' name 'joyGetPos';

function joyGetPosEx(x1: UINT; x2: LPJOYINFOEX): MMRESULT; stdcall;
 external 'winmm.dll' name 'joyGetPosEx';

function joyGetThreshold(x1: UINT; x2: LPUINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'joyGetThreshold';

function joyReleaseCapture(x1: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'joyReleaseCapture';

function joySetCapture(x1: HWND; x2: UINT; x3: UINT; x4: BOOL): MMRESULT; stdcall;
 external 'winmm.dll' name 'joySetCapture';

function joySetThreshold(x1: UINT; x2: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'joySetThreshold';

function waveOutGetNumDevs: UINT; stdcall;
 external 'winmm.dll' name 'waveOutGetNumDevs';

function waveOutGetDevCapsA(x1: UINT; x2: LPWAVEOUTCAPSA; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetDevCapsA';

function waveOutGetDevCapsW(x1: UINT; x2: LPWAVEOUTCAPSW; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetDevCapsW';

function waveOutGetDevCaps(x1: UINT; x2: LPWAVEOUTCAPS; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'waveOutGetDevCapsW'
 {$else}'waveOutGetDevCapsA'
 {$endif};

function waveOutGetVolume(x1: HWAVEOUT; x2: LPDWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetVolume';

function waveOutSetVolume(x1: HWAVEOUT; x2: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutSetVolume';

function waveOutGetErrorTextA(x1: MMRESULT; x2: LPSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetErrorTextA';

function waveOutGetErrorTextW(x1: MMRESULT; x2: LPWSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetErrorTextW';

function waveOutGetErrorText(x1: MMRESULT; x2: PChar; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'waveOutGetErrorTextW'
 {$else}'waveOutGetErrorTextA'
 {$endif};

function waveOutOpen(x1: LPHWAVEOUT; x2: UINT; x3: LPCWAVEFORMATEX; x4: DWORD; x5: DWORD; x6: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutOpen';

function waveOutClose(x1: HWAVEOUT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutClose';

function waveOutPrepareHeader(x1: HWAVEOUT; x2: LPWAVEHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutPrepareHeader';

function waveOutUnprepareHeader(x1: HWAVEOUT; x2: LPWAVEHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutUnprepareHeader';

function waveOutWrite(x1: HWAVEOUT; x2: LPWAVEHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutWrite';

function waveOutPause(x1: HWAVEOUT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutPause';

function waveOutRestart(x1: HWAVEOUT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutRestart';

function waveOutReset(x1: HWAVEOUT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutReset';

function waveOutBreakLoop(x1: HWAVEOUT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutBreakLoop';

function waveOutGetPosition(x1: HWAVEOUT; x2: LPMMTIME; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetPosition';

function waveOutGetPitch(x1: HWAVEOUT; x2: LPDWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetPitch';

function waveOutSetPitch(x1: HWAVEOUT; x2: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutSetPitch';

function waveOutGetPlaybackRate(x1: HWAVEOUT; x2: LPDWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetPlaybackRate';

function waveOutSetPlaybackRate(x1: HWAVEOUT; x2: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutSetPlaybackRate';

function waveOutGetID(x1: HWAVEOUT; x2: LPUINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutGetID';

function waveOutMessage(x1: HWAVEOUT; x2: UINT; x3: DWORD; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveOutMessage';

function waveInGetNumDevs: UINT; stdcall;
 external 'winmm.dll' name 'waveInGetNumDevs';

function waveInGetDevCapsA(x1: UINT; x2: LPWAVEINCAPSA; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInGetDevCapsA';

function waveInGetDevCapsW(x1: UINT; x2: LPWAVEINCAPSW; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInGetDevCapsW';

function waveInGetDevCaps(x1: UINT; x2: LPWAVEINCAPS; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'waveInGetDevCapsW'
 {$else}'waveInGetDevCapsA'
 {$endif};

function waveInGetErrorTextA(x1: MMRESULT; x2: LPSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInGetErrorTextA';

function waveInGetErrorTextW(x1: MMRESULT; x2: LPWSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInGetErrorTextW';

function waveInGetErrorText(x1: MMRESULT; x2: PChar; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'waveInGetErrorTextW'
 {$else}'waveInGetErrorTextA'
 {$endif};

function waveInOpen(x1: LPHWAVEIN; x2: UINT; x3: LPCWAVEFORMATEX; x4: DWORD; x5: DWORD; x6: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInOpen';

function waveInClose(x1: HWAVEIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInClose';

function waveInPrepareHeader(x1: HWAVEIN; x2: LPWAVEHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInPrepareHeader';

function waveInUnprepareHeader(x1: HWAVEIN; x2: LPWAVEHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInUnprepareHeader';

function waveInAddBuffer(x1: HWAVEIN; x2: LPWAVEHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInAddBuffer';

function waveInStart(x1: HWAVEIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInStart';

function waveInStop(x1: HWAVEIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInStop';

function waveInReset(x1: HWAVEIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInReset';

function waveInGetPosition(x1: HWAVEIN; x2: LPMMTIME; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInGetPosition';

function waveInGetID(x1: HWAVEIN; x2: LPUINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInGetID';

function waveInMessage(x1: HWAVEIN; x2: UINT; x3: DWORD; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'waveInMessage';

function mixerGetLineControlsA(x1: HMIXEROBJ; x2: LPMIXERLINECONTROLSA; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetLineControlsA';

function mixerGetLineControlsW(x1: HMIXEROBJ; x2: LPMIXERLINECONTROLSW; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetLineControlsW';

function mixerGetLineControls(x1: HMIXEROBJ; x2: LPMIXERLINECONTROLS; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mixerGetLineControlsW'
 {$else}'mixerGetLineControlsA'
 {$endif};

function joyGetNumDevs: UINT; stdcall;
 external 'winmm.dll' name 'joyGetNumDevs';

function joyGetDevCapsA(x1: UINT; x2: LPJOYCAPSA; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'joyGetDevCapsA';

function joyGetDevCapsW(x1: UINT; x2: LPJOYCAPSW; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'joyGetDevCapsW';

function joyGetDevCaps(x1: UINT; x2: LPJOYCAPS; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'joyGetDevCapsW'
 {$else}'joyGetDevCapsA'
 {$endif};

function mixerGetControlDetailsA(x1: HMIXEROBJ; x2: LPMIXERCONTROLDETAILS; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetControlDetailsA';

function mixerGetControlDetailsW(x1: HMIXEROBJ; x2: LPMIXERCONTROLDETAILS; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetControlDetailsW';

function mixerGetControlDetails(x1: HMIXEROBJ; x2: LPMIXERCONTROLDETAILS; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mixerGetControlDetailsW'
 {$else}'mixerGetControlDetailsA'
 {$endif};

function timeGetSystemTime(x1: LPMMTIME; x2: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'timeGetSystemTime';

function timeGetTime: DWORD; stdcall;
 external 'winmm.dll' name 'timeGetTime';

function timeSetEvent(x1: UINT; x2: UINT; x3: LPTIMECALLBACK; x4: DWORD; x5: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'timeSetEvent';

function timeKillEvent(x1: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'timeKillEvent';

function timeGetDevCaps(x1: LPTIMECAPS; x2: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'timeGetDevCaps';

function timeBeginPeriod(x1: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'timeBeginPeriod';

function timeEndPeriod(x1: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'timeEndPeriod';

function mixerGetDevCapsA(x1: UINT; x2: LPMIXERCAPSA; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetDevCapsA';

function mixerGetDevCapsW(x1: UINT; x2: LPMIXERCAPSW; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetDevCapsW';

function mixerGetDevCaps(x1: UINT; x2: LPMIXERCAPS; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mixerGetDevCapsW'
 {$else}'mixerGetDevCapsA'
 {$endif};

function mixerOpen(x1: LPHMIXER; x2: UINT; x3: DWORD; x4: DWORD; x5: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerOpen';

function mixerClose(x1: HMIXER): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerClose';

function mixerMessage(x1: HMIXER; x2: UINT; x3: DWORD; x4: DWORD): DWORD; stdcall;
 external 'winmm.dll' name 'mixerMessage';

function auxGetNumDevs: UINT; stdcall;
 external 'winmm.dll' name 'auxGetNumDevs';

function auxGetDevCapsA(x1: UINT; x2: LPAUXCAPSA ; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'auxGetDevCapsA';

function auxGetDevCapsW(x1: UINT; x2: LPAUXCAPSW ; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'auxGetDevCapsW';

function auxGetDevCaps(x1: UINT; x2: LPAUXCAPS ; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'auxGetDevCapsW'
 {$else}'auxGetDevCapsA'
 {$endif};

function auxSetVolume(x1: UINT; x2: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'auxSetVolume';

function auxGetVolume(x1: UINT; x2: LPDWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'auxGetVolume';

function auxOutMessage(x1: UINT; x2: UINT; x3: DWORD; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'auxOutMessage';

function midiOutGetNumDevs: UINT; stdcall;
 external 'winmm.dll' name 'midiOutGetNumDevs';

function midiStreamOpen(x1: LPHMIDISTRM; x2: LPUINT; x3: DWORD; x4: DWORD; x5: DWORD; x6: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamOpen';

function midiStreamClose(x1: HMIDISTRM): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamClose';

function midiStreamProperty(x1: HMIDISTRM; x2: LPBYTE; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamProperty';

function midiStreamPosition(x1: HMIDISTRM; x2: LPMMTIME; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamPosition';

function midiStreamOut(x1: HMIDISTRM; x2: LPMIDIHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamOut';

function midiStreamPause(x1: HMIDISTRM): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamPause';

function midiStreamRestart(x1: HMIDISTRM): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamRestart';

function midiStreamStop(x1: HMIDISTRM): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiStreamStop';

function midiConnect(x1: HMIDI; x2: HMIDIOUT; x3: pointer): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiConnect';

function midiDisconnect(x1: HMIDI; x2: HMIDIOUT; x3: pointer): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiDisconnect';

function midiOutGetDevCapsA(x1: UINT; x2: LPMIDIOUTCAPSA; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutGetDevCapsA';

function midiOutGetDevCapsW(x1: UINT; x2: LPMIDIOUTCAPSW; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutGetDevCapsW';

function midiOutGetDevCaps(x1: UINT; x2: LPMIDIOUTCAPS; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'midiOutGetDevCapsW'
 {$else}'midiOutGetDevCapsA'
 {$endif};

function midiOutGetVolume(x1: HMIDIOUT; x2: LPDWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutGetVolume';

function midiOutSetVolume(x1: HMIDIOUT; x2: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutSetVolume';

function midiOutGetErrorTextA(x1: MMRESULT; x2: LPSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutGetErrorTextA';

function midiOutGetErrorTextW(x1: MMRESULT; x2: LPWSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutGetErrorTextW';

function midiOutGetErrorText(x1: MMRESULT; x2: PChar; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'midiOutGetErrorTextW'
 {$else}'midiOutGetErrorTextA'
 {$endif};

function midiOutOpen(x1: LPHMIDIOUT; x2: UINT; x3: DWORD; x4: DWORD; x5: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutOpen';

function midiOutClose(x1: HMIDIOUT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutClose';

function midiOutPrepareHeader(x1: HMIDIOUT; x2: LPMIDIHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutPrepareHeader';

function midiOutUnprepareHeader(x1: HMIDIOUT; x2: LPMIDIHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutUnprepareHeader';

function midiOutShortMsg(x1: HMIDIOUT; x2: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutShortMsg';

function midiOutLongMsg(x1: HMIDIOUT; x2: LPMIDIHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutLongMsg';

function midiOutReset(x1: HMIDIOUT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutReset';

function midiOutCachePatches(x1: HMIDIOUT; x2: UINT; x3: LPWORD; x4: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutCachePatches';

function midiOutCacheDrumPatches(x1: HMIDIOUT; x2: UINT; x3: LPWORD; x4: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutCacheDrumPatches';

function midiOutGetID(x1: HMIDIOUT; x2: LPUINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutGetID';

function midiOutMessage(x1: HMIDIOUT; x2: UINT; x3: DWORD; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiOutMessage';

function midiInGetNumDevs: UINT; stdcall;
 external 'winmm.dll' name 'midiInGetNumDevs';

function midiInGetDevCapsA(x1: UINT; x2: LPMIDIINCAPSA; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInGetDevCapsA';

function midiInGetDevCapsW(x1: UINT; x2: LPMIDIINCAPSW; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInGetDevCapsW';

function midiInGetDevCaps(x1: UINT; x2: LPMIDIINCAPS; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'midiInGetDevCapsW'
 {$else}'midiInGetDevCapsA'
 {$endif};

function midiInGetErrorTextA(x1: MMRESULT; x2: LPSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInGetErrorTextA';

function midiInGetErrorTextW(x1: MMRESULT; x2: LPWSTR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInGetErrorTextW';

function midiInGetErrorText(x1: MMRESULT; x2: PChar; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'midiInGetErrorTextW'
 {$else}'midiInGetErrorTextA'
 {$endif};

function midiInOpen(x1: LPHMIDIIN; x2: UINT; x3: DWORD; x4: DWORD; x5: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInOpen';

function midiInClose(x1: HMIDIIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInClose';

function midiInPrepareHeader(x1: HMIDIIN; x2: LPMIDIHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInPrepareHeader';

function midiInUnprepareHeader(x1: HMIDIIN; x2: LPMIDIHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInUnprepareHeader';

function midiInAddBuffer(x1: HMIDIIN; x2: LPMIDIHDR; x3: UINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInAddBuffer';

function midiInStart(x1: HMIDIIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInStart';

function midiInStop(x1: HMIDIIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInStop';

function midiInReset(x1: HMIDIIN): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInReset';

function midiInGetID(x1: HMIDIIN; x2: LPUINT): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInGetID';

function midiInMessage(x1: HMIDIIN; x2: UINT; x3: DWORD; x4: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'midiInMessage';

function mixerGetLineInfoA(x1: HMIXEROBJ; x2: LPMIXERLINEA; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetLineInfoA';

function mixerGetLineInfoW(x1: HMIXEROBJ; x2: LPMIXERLINEW; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetLineInfoW';

function mixerGetLineInfo(x1: HMIXEROBJ; x2: LPMIXERLINE; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'mixerGetLineInfoW'
 {$else}'mixerGetLineInfoA'
 {$endif};

function mixerGetID(x1: HMIXEROBJ; var x2: UINT; x3: DWORD): MMRESULT; stdcall;
 external 'winmm.dll' name 'mixerGetID';

function PlaySoundA(x1: LPCSTR; x2: HMODULE; x3: DWORD): BOOL; stdcall;
 external 'winmm.dll' name 'PlaySoundA';

function PlaySoundW(x1: LPCWSTR; x2: HMODULE; x3: DWORD): BOOL; stdcall;
 external 'winmm.dll' name 'PlaySoundW';

function PlaySound(x1: PChar; x2: HMODULE; x3: DWORD): BOOL; stdcall;
 external 'winmm.dll' name
 {$ifdef UNICODE}'PlaySoundW'
 {$else}'PlaySoundA'
 {$endif};

implementation

function MEVT_EVENTTYPE(x: byte): byte;
 begin
  MEVT_EVENTTYPE := (x shr 24) and $FF;
 end;

function MEVT_EVENTPARM(x: DWORD): DWORD;
 begin
  MEVT_EVENTPARM := x and $00FFFFFF;
 end;

function MCI_MSF_MINUTE(msf: longint): byte;
 [public, alias: 'Mci_msf_minute'];
 var
  b:byte absolute msf;
 begin
  MCI_MSF_MINUTE := b;
 end;

function MCI_TMSF_TRACK(tmsf: longint): byte;
 external name 'Mci_msf_minute';

function MCI_HMS_HOUR(h: longint): byte;
 external name 'Mci_msf_minute';

function MCI_MSF_SECOND(msf: longint): byte;
 [public, alias: 'Mci_msf_second'];
 var
  b: array[0..1]of byte absolute msf;
 begin
  MCI_MSF_SECOND := b[1];
 end;

function MCI_TMSF_MINUTE(tmsf: longint): byte;
 external name 'Mci_msf_second';

function MCI_HMS_MINUTE(h: longint): byte;
 external name 'Mci_msf_second';

function MCI_MSF_FRAME(msf: longint): byte;
 [public, alias: 'Mci_msf_frame'];
 var
  b: array[0..2]of byte absolute msf;
 begin
  MCI_MSF_FRAME := b[2];
 end;

function MCI_TMSF_SECOND(tmsf: longint): byte;
 external name 'Mci_msf_frame';

function MCI_HMS_SECOND(h: longint): byte;
 external name 'Mci_msf_frame';

function MCI_MAKE_MSF(m, s, f: byte): longint;
 [public, alias: 'Mci_make_msf'];
 const
  b: array[0..3]of byte=(0,0,0,0);
 var
  l: longint absolute b;
 begin
  b[0] := m;
  b[1] := s;
  b[2] := f;
  MCI_MAKE_MSF := l;
 end;

function MCI_MAKE_HMS(h, m, s: byte): longint;
 external name 'Mci_make_msf';

function MCI_TMSF_FRAME(tmsf: longint): byte;
 var
  b: array[0..3]of byte absolute tmsf;
 begin
  MCI_TMSF_FRAME := b[3];
 end;

function mci_Make_TMSF(t, m, s, f: Byte): Longint;
 var
  b: array[0..3]of byte;
  l: longint absolute b;
 begin
  b[0] := t;
  b[1] := m;
  b[2] := s;
  b[3] := f;
  mci_Make_TMSF := l;
 end;

function DIBINDEX(n: longint): longint;
 begin
  DIBINDEX := n or $10FF shl 16;
 end;

end.
