Changeset 75 for Include


Ignore:
Timestamp:
Jan 26, 2007, 4:44:33 AM (18 years ago)
Author:
NoWest
Message:

Aux Mixer Timer Joy MMioを追加。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/api_mmsys.sbp

    r1 r75  
    705705
    706706
     707'--------------------------------------------------------
     708' Auxiliary audio support
     709
     710' device ID for aux device mapper
     711Const AUX_MAPPER = (-1)
     712
     713' Auxiliary audio device capabilities structure
     714Type AUXCAPSA
     715    wMid As Word
     716    wPid As Word
     717    vDriverVersion As MMVERSION
     718    szPname[ELM(MAXPNAMELEN)] As Char
     719    wTechnology As Word
     720    wReserved1 As Word
     721    dwSupport As DWord
     722End Type
     723TypeDef PAUXCAPSA = *AUXCAPSA
     724TypeDef NPAUXCAPSA = *AUXCAPSA
     725TypeDef LPAUXCAPSA = *AUXCAPSA
     726
     727TypeDef AUXCAPS = AUXCAPSA
     728TypeDef PAUXCAPS = PAUXCAPSA
     729TypeDef NPAUXCAPS = NPAUXCAPSA
     730TypeDef LPAUXCAPS = LPAUXCAPSA
     731
     732Const AUXCAPS_CDAUDIO = 1
     733Const AUXCAPS_AUXIN = 2
     734
     735Const AUXCAPS_VOLUME = &H0001
     736Const AUXCAPS_LRVOLUME = &H0002
     737
     738' auxiliary audio function prototypes
     739Declare Function auxGetNumDevs Lib "winmm" () As DWord
     740Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsA" (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
     741Declare Function auxSetVolume Lib "winmm" (uDeviceID As DWord, dwVolume As DWord) As MMRESULT
     742Declare Function auxGetVolume Lib "winmm" (uDeviceID As DWord, pdwVolume As *DWord) As MMRESULT
     743Declare Function auxOutMessage Lib "winmm" (uDeviceID As DWord, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
     744
     745
     746'--------------------------------------------------------
     747' Mixer Support
     748
     749TypeDef HMIXEROBJ = VoidPtr
     750TypeDef LPHMIXEROBJ = HMIXEROBJ
     751TypeDef HMIXER = VoidPtr
     752TypeDef LPHMIXER = *HMIXER
     753
     754Const MIXER_SHORT_NAME_CHARS = 16
     755Const MIXER_LONG_NAME_CHARS = 64
     756
     757Const MIXERR_INVALLINE = (MIXERR_BASE + 0)
     758Const MIXERR_INVALCONTROL = (MIXERR_BASE + 1)
     759Const MIXERR_INVALVALUE = (MIXERR_BASE + 2)
     760Const MIXERR_LASTERROR = (MIXERR_BASE + 2)
     761
     762Const MIXER_OBJECTF_HANDLE = &H80000000
     763Const MIXER_OBJECTF_MIXER = &H00000000
     764Const MIXER_OBJECTF_HMIXER = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIXER)
     765Const MIXER_OBJECTF_WAVEOUT = &H10000000
     766Const MIXER_OBJECTF_HWAVEOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEOUT)
     767Const MIXER_OBJECTF_WAVEIN = &H20000000
     768Const MIXER_OBJECTF_HWAVEIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEIN)
     769Const MIXER_OBJECTF_MIDIOUT = &H30000000
     770Const MIXER_OBJECTF_HMIDIOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIOUT)
     771Const MIXER_OBJECTF_MIDIIN = &H40000000
     772Const MIXER_OBJECTF_HMIDIIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIIN)
     773Const MIXER_OBJECTF_AUX = &H50000000
     774
     775Declare Function mixerGetNumDevs Lib "winmm" () As DWord
     776
     777Type MIXERCAPSA
     778    wMid As Word
     779    wPid As Word
     780    vDriverVersion As MMVERSION
     781    szPname[ELM(MAXPNAMELEN)] As Char
     782    fdwSupport As DWord
     783    cDestinations As DWord
     784End Type
     785TypeDef PMIXERCAPSA = *MIXERCAPSA
     786TypeDef LPMIXERCAPSA = *MIXERCAPSA
     787
     788TypeDef MIXERCAPS = MIXERCAPSA
     789TypeDef PMIXERCAPS = PMIXERCAPSA
     790TypeDef LPMIXERCAPS = LPMIXERCAPSA
     791
     792Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsA" (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
     793Declare Function mixerOpen Lib "winmm" (phmx As *HMIXER, uMxId As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
     794Declare Function mixerClose Lib "winmm" (hmx As HMIXER) As MMRESULT
     795Declare Function mixerMessage Lib "winmm" (hmx As HMIXER, uMsg As DWord, dwParam1 As DWord, dwParam2 As DWord) As DWord
     796
     797Type TARGET
     798    dwType As DWord
     799    dwDeviceID As DWord
     800    wMid As Word
     801    wPid As Word
     802    vDriverVersion As MMVERSION
     803    szPname[ELM(MAXPNAMELEN)] As Char
     804End Type
     805
     806Type MIXERLINEA
     807    cbStruct As DWord
     808    dwDestination As DWord
     809    dwSource As DWord
     810    dwLineID As DWord
     811    fdwLine As DWord
     812    dwUser As DWord
     813    dwComponentType As DWord
     814    cChannels As DWord
     815    cConnections As DWord
     816    cControls As DWord
     817    szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
     818    szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
     819    Target As TARGET
     820End Type
     821TypeDef PMIXERLINEA = *MIXERLINEA
     822TypeDef LPMIXERLINEA = *MIXERLINEA
     823
     824TypeDef MIXERLINE = MIXERLINEA
     825TypeDef PMIXERLINE = PMIXERLINEA
     826TypeDef LPMIXERLINE = LPMIXERLINEA
     827
     828' MIXERLINE.fdwLine
     829Const MIXERLINE_LINEF_ACTIVE = &H00000001
     830Const MIXERLINE_LINEF_DISCONNECTED = &H00008000
     831Const MIXERLINE_LINEF_SOURCE = &H80000000
     832
     833' MIXERLINE.dwComponentType
     834Const MIXERLINE_COMPONENTTYPE_DST_FIRST = &H00000000
     835Const MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
     836Const MIXERLINE_COMPONENTTYPE_DST_DIGITAL = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
     837Const MIXERLINE_COMPONENTTYPE_DST_LINE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
     838Const MIXERLINE_COMPONENTTYPE_DST_MONITOR = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
     839Const MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
     840Const MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
     841Const MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
     842Const MIXERLINE_COMPONENTTYPE_DST_WAVEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
     843Const MIXERLINE_COMPONENTTYPE_DST_VOICEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
     844Const MIXERLINE_COMPONENTTYPE_DST_LAST = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
     845
     846Const MIXERLINE_COMPONENTTYPE_SRC_FIRST = &H00001000
     847Const MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
     848Const MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
     849Const MIXERLINE_COMPONENTTYPE_SRC_LINE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
     850Const MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
     851Const MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
     852Const MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
     853Const MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
     854Const MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
     855Const MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
     856Const MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
     857Const MIXERLINE_COMPONENTTYPE_SRC_ANALOG = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
     858Const MIXERLINE_COMPONENTTYPE_SRC_LAST = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
     859
     860' MIXERLINE.Target.dwType
     861Const MIXERLINE_TARGETTYPE_UNDEFINED = 0
     862Const MIXERLINE_TARGETTYPE_WAVEOUT = 1
     863Const MIXERLINE_TARGETTYPE_WAVEIN = 2
     864Const MIXERLINE_TARGETTYPE_MIDIOUT = 3
     865Const MIXERLINE_TARGETTYPE_MIDIIN = 4
     866Const MIXERLINE_TARGETTYPE_AUX = 5
     867
     868Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoA" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
     869
     870Const MIXER_GETLINEINFOF_DESTINATION = &H00000000
     871Const MIXER_GETLINEINFOF_SOURCE = &H00000001
     872Const MIXER_GETLINEINFOF_LINEID = &H00000002
     873Const MIXER_GETLINEINFOF_COMPONENTTYPE = &H00000003
     874Const MIXER_GETLINEINFOF_TARGETTYPE = &H00000004
     875Const MIXER_GETLINEINFOF_QUERYMASK = &H0000000F
     876
     877Declare Function mixerGetID Lib "winmm" (hmxobj As HMIXEROBJ, puMxId As *DWord, fdwId As DWord) As MMRESULT
     878
     879Type MIXERCONTROLA
     880    cbStruct As DWord
     881    dwControlID As DWord
     882    dwControlType As DWord
     883    fdwControl As DWord
     884    cMultipleItems As DWord
     885    szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
     886    szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
     887    Bounds[ELM(6)] As DWord
     888    Metrics[ELM(6)] As DWord
     889End Type
     890TypeDef PMIXERCONTROLA = *MIXERCONTROLA
     891TypeDef LPMIXERCONTROLA = *MIXERCONTROLA
     892
     893TypeDef MIXERCONTROL = MIXERCONTROLA
     894TypeDef PMIXERCONTROL = PMIXERCONTROLA
     895TypeDef LPMIXERCONTROL = LPMIXERCONTROLA
     896
     897' MIXERCONTROL.fdwControl
     898Const MIXERCONTROL_CONTROLF_UNIFORM = &H00000001
     899Const MIXERCONTROL_CONTROLF_MULTIPLE = &H00000002
     900Const MIXERCONTROL_CONTROLF_DISABLED = &H80000000
     901
     902' MIXERCONTROL_CONTROLTYPE_xxx
     903Const MIXERCONTROL_CT_CLASS_MASK = &HF0000000
     904Const MIXERCONTROL_CT_CLASS_CUSTOM = &H00000000
     905Const MIXERCONTROL_CT_CLASS_METER = &H10000000
     906Const MIXERCONTROL_CT_CLASS_SWITCH = &H20000000
     907Const MIXERCONTROL_CT_CLASS_NUMBER = &H30000000
     908Const MIXERCONTROL_CT_CLASS_SLIDER = &H40000000
     909Const MIXERCONTROL_CT_CLASS_FADER = &H50000000
     910Const MIXERCONTROL_CT_CLASS_TIME = &H60000000
     911Const MIXERCONTROL_CT_CLASS_LIST = &H70000000
     912Const MIXERCONTROL_CT_SUBCLASS_MASK = &H0F000000
     913Const MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = &H00000000
     914Const MIXERCONTROL_CT_SC_SWITCH_BUTTON = &H01000000
     915Const MIXERCONTROL_CT_SC_METER_POLLED = &H00000000
     916Const MIXERCONTROL_CT_SC_TIME_MICROSECS = &H00000000
     917Const MIXERCONTROL_CT_SC_TIME_MILLISECS = &H01000000
     918Const MIXERCONTROL_CT_SC_LIST_SINGLE = &H00000000
     919Const MIXERCONTROL_CT_SC_LIST_MULTIPLE = &H01000000
     920Const MIXERCONTROL_CT_UNITS_MASK = &H00FF0000
     921Const MIXERCONTROL_CT_UNITS_CUSTOM = &H00000000
     922Const MIXERCONTROL_CT_UNITS_BOOLEAN = &H00010000
     923Const MIXERCONTROL_CT_UNITS_SIGNED = &H00020000
     924Const MIXERCONTROL_CT_UNITS_UNSIGNED = &H00030000
     925Const MIXERCONTROL_CT_UNITS_DECIBELS = &H00040000
     926Const MIXERCONTROL_CT_UNITS_PERCENT = &H00050000
     927
     928' MIXERCONTROL.dwControlType
     929Const MIXERCONTROL_CONTROLTYPE_CUSTOM = (MIXERCONTROL_CT_CLASS_CUSTOM OR MIXERCONTROL_CT_UNITS_CUSTOM)
     930Const MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_BOOLEAN)
     931Const MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_SIGNED)
     932Const MIXERCONTROL_CONTROLTYPE_PEAKMETER = (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
     933Const MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_UNSIGNED)
     934Const MIXERCONTROL_CONTROLTYPE_BOOLEAN = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BOOLEAN OR MIXERCONTROL_CT_UNITS_BOOLEAN)
     935Const MIXERCONTROL_CONTROLTYPE_ONOFF = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
     936Const MIXERCONTROL_CONTROLTYPE_MUTE = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
     937Const MIXERCONTROL_CONTROLTYPE_MONO = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
     938Const MIXERCONTROL_CONTROLTYPE_LOUDNESS = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
     939Const MIXERCONTROL_CONTROLTYPE_STEREOENH = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
     940Const MIXERCONTROL_CONTROLTYPE_BUTTON = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BUTTON OR MIXERCONTROL_CT_UNITS_BOOLEAN)
     941Const MIXERCONTROL_CONTROLTYPE_DECIBELS = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_DECIBELS)
     942Const MIXERCONTROL_CONTROLTYPE_SIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_SIGNED)
     943Const MIXERCONTROL_CONTROLTYPE_UNSIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
     944Const MIXERCONTROL_CONTROLTYPE_PERCENT = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_PERCENT)
     945Const MIXERCONTROL_CONTROLTYPE_SLIDER = (MIXERCONTROL_CT_CLASS_SLIDER OR MIXERCONTROL_CT_UNITS_SIGNED)
     946Const MIXERCONTROL_CONTROLTYPE_PAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
     947Const MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
     948Const MIXERCONTROL_CONTROLTYPE_FADER = (MIXERCONTROL_CT_CLASS_FADER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
     949Const MIXERCONTROL_CONTROLTYPE_VOLUME = (MIXERCONTROL_CONTROLTYPE_FADER + 1)
     950Const MIXERCONTROL_CONTROLTYPE_BASS = (MIXERCONTROL_CONTROLTYPE_FADER + 2)
     951Const MIXERCONTROL_CONTROLTYPE_TREBLE = (MIXERCONTROL_CONTROLTYPE_FADER + 3)
     952Const MIXERCONTROL_CONTROLTYPE_EQUALIZER = (MIXERCONTROL_CONTROLTYPE_FADER + 4)
     953Const MIXERCONTROL_CONTROLTYPE_SINGLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_SINGLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
     954Const MIXERCONTROL_CONTROLTYPE_MUX = (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
     955Const MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_MULTIPLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
     956Const MIXERCONTROL_CONTROLTYPE_MIXER = (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
     957Const MIXERCONTROL_CONTROLTYPE_MICROTIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MICROSECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
     958Const MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MILLISECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
     959
     960Type MIXERLINECONTROLSA
     961    cbStruct As DWord
     962    dwLineID As DWord
     963    dwControl_ID_Type As DWord
     964    cControls As DWord
     965    cbmxctrl As DWord
     966    pamxctrl As *MIXERCONTROL
     967End Type
     968\TypeDef PMIXERLINECONTROLSA = *MIXERLINECONTROLSA
     969TypeDef LPMIXERLINECONTROLSA = *MIXERLINECONTROLSA
     970
     971TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
     972TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSA
     973TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA
     974
     975Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
     976
     977Const MIXER_GETLINECONTROLSF_ALL = &H00000000
     978Const MIXER_GETLINECONTROLSF_ONEBYID = &H00000001
     979Const MIXER_GETLINECONTROLSF_ONEBYTYPE = &H00000002
     980Const MIXER_GETLINECONTROLSF_QUERYMASK = &H0000000F
     981
     982Type MIXERCONTROLDETAILS
     983    cbStruct As DWord
     984    dwControlID As DWord
     985    cChannels As DWord
     986    cMultipleItems As DWord
     987    cbDetails As DWord
     988    paDetails As VoidPtr
     989End Type
     990TypeDef PMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
     991TypeDef LPMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
     992
     993Type MIXERCONTROLDETAILS_LISTTEXTA
     994    dwParam1 As DWord
     995    dwParam2 As DWord
     996    szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
     997End Type
     998TypeDef PMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
     999TypeDef LPMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
     1000
     1001TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA
     1002TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA
     1003TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA
     1004
     1005Type MIXERCONTROLDETAILS_BOOLEAN
     1006    fValue As Long
     1007End Type
     1008TypeDef PMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
     1009TypeDef LPMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
     1010
     1011Type MIXERCONTROLDETAILS_SIGNED
     1012    lValue As Long
     1013End Type
     1014TypeDef PMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
     1015TypeDef LPMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
     1016
     1017Type MIXERCONTROLDETAILS_UNSIGNED
     1018    dwValue As DWord
     1019End Type
     1020TypeDef PMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
     1021TypeDef LPMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
     1022
     1023Declare Function mixerGetControlDetailsA Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
     1024Declare Function mixerGetControlDetailsW Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
     1025Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsA" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
     1026
     1027Const MIXER_GETCONTROLDETAILSF_VALUE = &H00000000
     1028Const MIXER_GETCONTROLDETAILSF_LISTTEXT = &H00000001
     1029Const MIXER_GETCONTROLDETAILSF_QUERYMASK = &H0000000F
     1030
     1031Declare Function mixerSetControlDetails Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
     1032
     1033Const MIXER_SETCONTROLDETAILSF_VALUE = &H00000000
     1034Const MIXER_SETCONTROLDETAILSF_CUSTOM = &H00000001
     1035Const MIXER_SETCONTROLDETAILSF_QUERYMASK = &H0000000F
     1036
     1037
     1038'--------------------------------------------------------
     1039' Timer support
     1040
     1041' timer error
     1042Const TIMERR_NOERROR = (0)
     1043Const TIMERR_NOCANDO = (TIMERR_BASE+1)
     1044Const TIMERR_STRUCT = (TIMERR_BASE+33)
     1045
     1046TypeDef LPTIMECALLBACK = *Sub(uTimerID As DWord, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord)
     1047
     1048Const TIME_ONESHOT = &H0000
     1049Const TIME_PERIODIC = &H0001
     1050
     1051Const TIME_CALLBACK_FUNCTION = &H0000
     1052Const TIME_CALLBACK_EVENT_SET = &H0010
     1053Const TIME_CALLBACK_EVENT_PULSE = &H0020
     1054
     1055' timer device capabilities data structure
     1056Type TIMECAPS
     1057    wPeriodMin As DWord
     1058    wPeriodMax As DWord
     1059End Type
     1060TypeDef PTIMECAPS = *TIMECAPS
     1061TypeDef NPTIMECAPS = *TIMECAPS
     1062TypeDef LPTIMECAPS = *TIMECAPS
     1063
     1064' timer function prototypes
     1065Declare Function timeGetSystemTime Lib "winmm" (pmmt As *MMTIME, cbmmt As DWord) As MMRESULT
     1066Declare Function timeGetTime Lib "winmm" () As DWord
     1067Declare Function timeSetEvent Lib "winmm" (uDelay As DWord, uResolution As DWord, fptc As LPTIMECALLBACK, dwUser As DWord, fuEvent As DWord) As MMRESULT
     1068Declare Function timeKillEvent Lib "winmm" (uTimerID As DWord) As MMRESULT
     1069Declare Function timeGetDevCaps Lib "winmm" (ptc As *TIMECAPS, cbtc As DWord) As MMRESULT
     1070Declare Function timeBeginPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
     1071Declare Function timeEndPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
     1072
     1073
     1074'--------------------------------------------------------
     1075' Joystick support
     1076
     1077' joystick error
     1078Const JOYERR_NOERROR = (0)
     1079Const JOYERR_PARMS = (JOYERR_BASE+5)
     1080Const JOYERR_NOCANDO = (JOYERR_BASE+6)
     1081Const JOYERR_UNPLUGGED = (JOYERR_BASE+7)
     1082
     1083' constants used with JOYINFO and JOYINFOEX structures and MM_JOY* messages
     1084Const JOY_BUTTON1 = &H0001
     1085Const JOY_BUTTON2 = &H0002
     1086Const JOY_BUTTON3 = &H0004
     1087Const JOY_BUTTON4 = &H0008
     1088Const JOY_BUTTON1CHG = &H0100
     1089Const JOY_BUTTON2CHG = &H0200
     1090Const JOY_BUTTON3CHG = &H0400
     1091Const JOY_BUTTON4CHG = &H0800
     1092
     1093' constants used with JOYINFOEX
     1094Const JOY_BUTTON5 = &H00000010
     1095Const JOY_BUTTON6 = &H00000020
     1096Const JOY_BUTTON7 = &H00000040
     1097Const JOY_BUTTON8 = &H00000080
     1098Const JOY_BUTTON9 = &H00000100
     1099Const JOY_BUTTON10 = &H00000200
     1100Const JOY_BUTTON11 = &H00000400
     1101Const JOY_BUTTON12 = &H00000800
     1102Const JOY_BUTTON13 = &H00001000
     1103Const JOY_BUTTON14 = &H00002000
     1104Const JOY_BUTTON15 = &H00004000
     1105Const JOY_BUTTON16 = &H00008000
     1106Const JOY_BUTTON17 = &H00010000
     1107Const JOY_BUTTON18 = &H00020000
     1108Const JOY_BUTTON19 = &H00040000
     1109Const JOY_BUTTON20 = &H00080000
     1110Const JOY_BUTTON21 = &H00100000
     1111Const JOY_BUTTON22 = &H00200000
     1112Const JOY_BUTTON23 = &H00400000
     1113Const JOY_BUTTON24 = &H00800000
     1114Const JOY_BUTTON25 = &H01000000
     1115Const JOY_BUTTON26 = &H02000000
     1116Const JOY_BUTTON27 = &H04000000
     1117Const JOY_BUTTON28 = &H08000000
     1118Const JOY_BUTTON29 = &H10000000
     1119Const JOY_BUTTON30 = &H20000000
     1120Const JOY_BUTTON31 = &H40000000
     1121Const JOY_BUTTON32 = &H80000000
     1122
     1123' constants used with JOYINFOEX structure
     1124Const JOY_POVCENTERED = (-1)
     1125Const JOY_POVFORWARD = 0
     1126Const JOY_POVRIGHT = 9000
     1127Const JOY_POVBACKWARD = 18000
     1128Const JOY_POVLEFT = 27000
     1129
     1130Const JOY_RETURNX = &H00000001
     1131Const JOY_RETURNY = &H00000002
     1132Const JOY_RETURNZ = &H00000004
     1133Const JOY_RETURNR = &H00000008
     1134Const JOY_RETURNU = &H00000010
     1135Const JOY_RETURNV = &H00000020
     1136Const JOY_RETURNPOV = &H00000040
     1137Const JOY_RETURNBUTTONS = &H00000080
     1138Const JOY_RETURNRAWDATA = &H00000100
     1139Const JOY_RETURNPOVCTS = &H00000200
     1140Const JOY_RETURNCENTERED = &H00000400
     1141Const JOY_USEDEADZONE = &H00000800
     1142Const 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)
     1143Const JOY_CAL_READALWAYS = &H00010000
     1144Const JOY_CAL_READXYONLY = &H00020000
     1145Const JOY_CAL_READ3 = &H00040000
     1146Const JOY_CAL_READ4 = &H00080000
     1147Const JOY_CAL_READXONLY = &H00100000
     1148Const JOY_CAL_READYONLY = &H00200000
     1149Const JOY_CAL_READ5 = &H00400000
     1150Const JOY_CAL_READ6 = &H00800000
     1151Const JOY_CAL_READZONLY = &H01000000
     1152Const JOY_CAL_READRONLY = &H02000000
     1153Const JOY_CAL_READUONLY = &H04000000
     1154Const JOY_CAL_READVONLY = &H08000000
     1155
     1156' joystick ID constants
     1157Const JOYSTICKID1 = 0
     1158Const JOYSTICKID2 = 1
     1159
     1160' joystick driver capabilites
     1161Const JOYCAPS_HASZ = &H0001
     1162Const JOYCAPS_HASR = &H0002
     1163Const JOYCAPS_HASU = &H0004
     1164Const JOYCAPS_HASV = &H0008
     1165Const JOYCAPS_HASPOV = &H0010
     1166Const JOYCAPS_POV4DIR = &H0020
     1167Const JOYCAPS_POVCTS = &H0040
     1168
     1169Type JOYCAPSA
     1170    wMid As Word
     1171    wPid As Word
     1172    szPname[ELM(MAXPNAMELEN)] As Char
     1173    wXmin As DWord
     1174    wXmax As DWord
     1175    wYmin As DWord
     1176    wYmax As DWord
     1177    wZmin As DWord
     1178    wZmax As DWord
     1179    wNumButtons As DWord
     1180    wPeriodMin As DWord
     1181    wPeriodMax As DWord
     1182    wRmin As DWord
     1183    wRmax As DWord
     1184    wUmin As DWord
     1185    wUmax As DWord
     1186    wVmin As DWord
     1187    wVmax As DWord
     1188    wCaps As DWord
     1189    wMaxAxes As DWord
     1190    wNumAxes As DWord
     1191    wMaxButtons As DWord
     1192    szRegKey[ELM(MAXPNAMELEN)] As Char
     1193    szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As Char
     1194End Type
     1195TypeDef PJOYCAPSA = *JOYCAPSA
     1196TypeDef NPJOYCAPSA = *JOYCAPSA
     1197TypeDef LPJOYCAPSA = *JOYCAPSA
     1198
     1199TypeDef JOYCAPS = JOYCAPSA
     1200TypeDef PJOYCAPS = PJOYCAPSA
     1201TypeDef NPJOYCAPS = NPJOYCAPSA
     1202TypeDef LPJOYCAPS = LPJOYCAPSA
     1203
     1204Type JOYINFO
     1205    wXpos As DWord
     1206    wYpos As DWord
     1207    wZpos As DWord
     1208    wButtons As DWord
     1209End Type
     1210\TypeDef PJOYINFO = *JOYINFO
     1211TypeDef NPJOYINFO = *JOYINFO
     1212TypeDef LPJOYINFO = *JOYINFO
     1213
     1214Type JOYINFOEX
     1215    dwSize As DWord
     1216    dwFlags As DWord
     1217    dwXpos As DWord
     1218    dwYpos As DWord
     1219    dwZpos As DWord
     1220    dwRpos As DWord
     1221    dwUpos As DWord
     1222    dwVpos As DWord
     1223    dwButtons As DWord
     1224    dwButtonNumber As DWord
     1225    dwPOV As DWord
     1226    dwReserved1 As DWord
     1227    dwReserved2 As DWord
     1228End Type
     1229TypeDef PJOYINFOEX = *JOYINFOEX
     1230TypeDef NPJOYINFOEX = *JOYINFOEX
     1231TypeDef LPJOYINFOEX = *JOYINFOEX
     1232
     1233' joystick function prototypes
     1234Declare Function joyGetNumDevs Lib "winmm" () As DWord
     1235Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
     1236Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, pji As *JOYINFO) As MMRESULT
     1237Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, pji As *JOYINFOEX) As MMRESULT
     1238Declare Function joyGetThreshold Lib "winmm" (uJoyID As DWord, puThreshold As *DWord) As MMRESULT
     1239Declare Function joyReleaseCapture Lib "winmm" (uJoyID As DWord) As MMRESULT
     1240Declare Function joySetCapture Lib "winmm" (hwnd As HWND, uJoyID As DWord, uPeriod As DWord, fChanged As BOOL) As MMRESULT
     1241Declare Function joySetThreshold Lib "winmm" (uJoyID As DWord, uThreshold As DWord) As MMRESULT
     1242
     1243
     1244'--------------------------------------------------------
     1245' Multimedia File I/O support
     1246
     1247' MMIO error return values
     1248Const MMIOERR_BASE = 256
     1249Const MMIOERR_FILENOTFOUND = (MMIOERR_BASE + 1)
     1250Const MMIOERR_OUTOFMEMORY = (MMIOERR_BASE + 2)
     1251Const MMIOERR_CANNOTOPEN = (MMIOERR_BASE + 3)
     1252Const MMIOERR_CANNOTCLOSE = (MMIOERR_BASE + 4)
     1253Const MMIOERR_CANNOTREAD = (MMIOERR_BASE + 5)
     1254Const MMIOERR_CANNOTWRITE = (MMIOERR_BASE + 6)
     1255Const MMIOERR_CANNOTSEEK = (MMIOERR_BASE + 7)
     1256Const MMIOERR_CANNOTEXPAND = (MMIOERR_BASE + 8)
     1257Const MMIOERR_CHUNKNOTFOUND = (MMIOERR_BASE + 9)
     1258Const MMIOERR_UNBUFFERED = (MMIOERR_BASE + 10)
     1259Const MMIOERR_PATHNOTFOUND = (MMIOERR_BASE + 11)
     1260Const MMIOERR_ACCESSDENIED = (MMIOERR_BASE + 12)
     1261Const MMIOERR_SHARINGVIOLATION = (MMIOERR_BASE + 13)
     1262Const MMIOERR_NETWORKERROR = (MMIOERR_BASE + 14)
     1263Const MMIOERR_TOOMANYOPENFILES = (MMIOERR_BASE + 15)
     1264Const MMIOERR_INVALIDFILE = (MMIOERR_BASE + 16)
     1265
     1266' MMIO constants
     1267Const CFSEPCHAR = "+"
     1268
     1269' MMIO data types
     1270TypeDef FOURCC = DWord
     1271TypeDef HPSTR = *Char
     1272TypeDef HMMIO = VoidPtr
     1273
     1274TypeDef LPMMIOPROC = *Function(lpmmioinfo As LPSTR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
     1275
     1276Type MMIOINFO
     1277    dwFlags As DWord
     1278    fccIOProc As FOURCC
     1279    pIOProc As LPMMIOPROC
     1280    wErrorRet As DWord
     1281    htask As HTASK
     1282    cchBuffer As Long
     1283    pchBuffer As HPSTR
     1284    pchNext As HPSTR
     1285    pchEndRead As HPSTR
     1286    pchEndWrite As HPSTR
     1287    lBufOffset As Long
     1288    lDiskOffset As Long
     1289    adwInfo[ELM(3)] As DWord
     1290    dwReserved1 As DWord
     1291    dwReserved2 As DWord
     1292    hmmio As HMMIO
     1293End Type
     1294TypeDef PMMIOINFO = *MMIOINFO
     1295TypeDef NPMMIOINFO = *MMIOINFO
     1296TypeDef LPMMIOINFO = *MMIOINFO
     1297
     1298Type MMCKINFO
     1299    ckid As FOURCC
     1300    cksize As DWord
     1301    fccType As FOURCC
     1302    dwDataOffset As DWord
     1303    dwFlags As DWord
     1304End Type
     1305TypeDef PMMCKINFO = *MMCKINFO
     1306TypeDef NPMMCKINFO = *MMCKINFO
     1307TypeDef LPMMCKINFO = *MMCKINFO
     1308
     1309Const MMIO_RWMODE = &H00000003
     1310Const MMIO_SHAREMODE = &H00000070
     1311Const MMIO_CREATE = &H00001000
     1312Const MMIO_PARSE = &H00000100
     1313Const MMIO_DELETE = &H00000200
     1314Const MMIO_EXIST = &H00004000
     1315Const MMIO_ALLOCBUF = &H00010000
     1316Const MMIO_GETTEMP = &H00020000
     1317Const MMIO_DIRTY = &H10000000
     1318Const MMIO_READ = &H00000000
     1319Const MMIO_WRITE = &H00000001
     1320Const MMIO_READWRITE = &H00000002
     1321Const MMIO_COMPAT = &H00000000
     1322Const MMIO_EXCLUSIVE = &H00000010
     1323Const MMIO_DENYWRITE = &H00000020
     1324Const MMIO_DENYREAD = &H00000030
     1325Const MMIO_DENYNONE = &H00000040
     1326Const MMIO_FHOPEN = &H0010
     1327Const MMIO_EMPTYBUF = &H0010
     1328Const MMIO_TOUPPER = &H0010
     1329Const MMIO_INSTALLPROC = &H00010000
     1330Const MMIO_GLOBALPROC = &H10000000
     1331Const MMIO_REMOVEPROC = &H00020000
     1332Const MMIO_UNICODEPROC = &H01000000
     1333Const MMIO_FINDPROC = &H00040000
     1334Const MMIO_FINDCHUNK = &H0010
     1335Const MMIO_FINDRIFF = &H0020
     1336Const MMIO_FINDLIST = &H0040
     1337Const MMIO_CREATERIFF = &H0020
     1338Const MMIO_CREATELIST = &H0040
     1339
     1340Const MMIOM_READ = MMIO_READ
     1341Const MMIOM_WRITE = MMIO_WRITE
     1342Const MMIOM_SEEK = 2
     1343Const MMIOM_OPEN = 3
     1344Const MMIOM_CLOSE = 4
     1345Const MMIOM_WRITEFLUSH = 5
     1346Const MMIOM_RENAME = 6
     1347Const MMIOM_USER = &H8000
     1348
     1349Const FOURCC_RIFF = MAKEFOURCC(&H52, &H49, &H46, &H46)
     1350Const FOURCC_LIST = MAKEFOURCC(&H4C, &H49, &H53, &H54)
     1351Const FOURCC_DOS = MAKEFOURCC(&H44, &H4F, &H53, &H20)
     1352Const FOURCC_MEM = MAKEFOURCC(&H4D, &H45, &H4D, &H20)
     1353
     1354Const SEEK_SET = 0
     1355Const SEEK_CUR = 1
     1356Const SEEK_END = 2
     1357
     1358Const MMIO_DEFAULTBUFFER = 8192
     1359
     1360Function mmioFOURCC(ch0 As String, ch1 As String, ch2 As String, ch3 As String) As FOURCC
     1361    mmioFOURCC = MAKEFOURCC(Asc(ch0), Asc(ch1), Asc(ch2), Asc(ch3))
     1362End Function
     1363
     1364' MMIO function prototypes
     1365Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCA" (sz As LPSTR, uFlags As DWord) As FOURCC
     1366Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcA" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
     1367Declare Function mmioOpen Lib "winmm" Alias "mmioOpenA" (pszFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
     1368Declare Function mmioRename Lib "winmm" Alias "mmioRenameA" (pszFileName As LPSTR, pszNewFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
     1369Declare Function mmioClose Lib "winmm" (hmmio As HMMIO, fuClose As DWord) As MMRESULT
     1370Declare Function mmioRead Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
     1371Declare Function mmioWrite Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
     1372Declare Function mmioSeek Lib "winmm" (hmmio As HMMIO, lOffset As Long, iOrigin As Long) As Long
     1373Declare Function mmioGetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
     1374Declare Function mmioSetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
     1375Declare Function mmioSetBuffer Lib "winmm" (hmmio As HMMIO, pchBuffer As LPSTR, cchBuffer As Long, fuBuffer As DWord) As MMRESULT
     1376Declare Function mmioFlush Lib "winmm" (hmmio As HMMIO, fuFlush As DWord) As MMRESULT
     1377Declare Function mmioAdvance Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuAdvance As DWord) As MMRESULT
     1378Declare Function mmioSendMessage Lib "winmm" (hmmio As HMMIO, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
     1379Declare Function mmioDescend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, pmmckiParent As *MMCKINFO, fuDescend As DWord) As MMRESULT
     1380Declare Function mmioAscend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuAscend As DWord) As MMRESULT
     1381Declare Function mmioCreateChunk Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuCreate As DWord) As MMRESULT
     1382
     1383
     1384'--------------------------------------------------------
     1385' MCI support
    7071386
    7081387'--------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.