source: Include/api_mmsys.sbp@ 54

Last change on this file since 54 was 1, checked in by (none), 18 years ago
File size: 41.7 KB
Line 
1' api_mmsys.sbp
2' Include file for Multimedia API's
3
4
5#ifndef _INC_MMSYS
6#define _INC_MMSYS
7
8
9' general constants
10Const MAXPNAMELEN = 32
11Const MAXERRORLENGTH = 256
12Const MAX_JOYSTICKOEMVXDNAME = 260
13
14Const MM_MIDI_MAPPER = 1
15Const MM_WAVE_MAPPER = 2
16Const MM_SNDBLST_MIDIOUT = 3
17Const MM_SNDBLST_MIDIIN = 4
18Const MM_SNDBLST_SYNTH = 5
19Const MM_SNDBLST_WAVEOUT = 6
20Const MM_SNDBLST_WAVEIN = 7
21Const MM_ADLIB = 9
22Const MM_MPU401_MIDIOUT = 10
23Const MM_MPU401_MIDIIN = 11
24Const MM_PC_JOYSTICK = 12
25
26' general data types
27TypeDef MMVERSION = DWord
28TypeDef VERSION = DWord
29TypeDef MMRESULT = DWord
30
31' MMTIME data structure
32
33Type Smpte
34 hour As Byte
35 min As Byte
36 sec As Byte
37 frame As Byte
38 fps As Byte
39 dummy As Byte
40 pad[ELM(2)] As Byte
41End Type
42
43Type Midi
44 songptrpos As DWord
45End Type
46
47Type MMTIME
48Public
49 wType As DWord
50 u As DWord
51/* union
52 ms As DWord
53 sample As DWord
54 cb As DWord
55 ticks As DWord
56 smpte As Smpte
57 midi As Midi
58*/
59End Type
60TypeDef PMMTIME = *MMTIME
61TypeDef LPMMTIME = *MMTIME
62
63Const MAKEFOURCC(ch0, ch1, ch2, ch3) = (((ch0 As Byte) or ((ch1 As Byte)<<8) or ((ch2 As Byte)<<16) or ((ch3 As Byte)<<24)) As DWord)
64
65' types for wType field in MMTIME struct
66Const TIME_MS = &H0001
67Const TIME_SAMPLES = &H0002
68Const TIME_BYTES = &H0004
69Const TIME_SMPTE = &H0008
70Const TIME_MIDI = &H0010
71Const TIME_TICKS = &H0020
72
73'----------------------------------------
74' Multimedia Extensions Window Messages
75
76Const MM_JOY1MOVE = &H3A0 'joystick
77Const MM_JOY2MOVE = &H3A1
78Const MM_JOY1ZMOVE = &H3A2
79Const MM_JOY2ZMOVE = &H3A3
80Const MM_JOY1BUTTONDOWN = &H3B5
81Const MM_JOY2BUTTONDOWN = &H3B6
82Const MM_JOY1BUTTONUP = &H3B7
83Const MM_JOY2BUTTONUP = &H3B8
84
85Const MM_MCINOTIFY = &H3B9 'MCI
86Const MCI_NOTIFY_SUCCESSFUL = &H0001
87Const MCI_NOTIFY_SUPERSEDED = &H0002
88Const MCI_NOTIFY_ABORTED = &H0004
89Const MCI_NOTIFY_FAILURE = &H0008
90
91Const MM_WOM_OPEN = &H3BB 'waveform output
92Const MM_WOM_CLOSE = &H3BC
93Const MM_WOM_DONE = &H3BD
94
95Const MM_WIM_OPEN = &H3BE 'waveform input
96Const MM_WIM_CLOSE = &H3BF
97Const MM_WIM_DATA = &H3C0
98
99Const MM_MIM_OPEN = &H3C1 'MIDI input
100Const MM_MIM_CLOSE = &H3C2
101Const MM_MIM_DATA = &H3C3
102Const MM_MIM_LONGDATA = &H3C4
103Const MM_MIM_ERROR = &H3C5
104Const MM_MIM_LONGERROR = &H3C6
105
106Const MM_MOM_OPEN = &H3C7 'MIDI output
107Const MM_MOM_CLOSE = &H3C8
108Const MM_MOM_DONE = &H3C9
109
110Const MM_DRVM_OPEN = &H3D0 'installable drivers
111Const MM_DRVM_CLOSE = &H3D1
112Const MM_DRVM_DATA = &H3D2
113Const MM_DRVM_ERROR = &H3D3
114
115Const MM_STREAM_OPEN = &H3D4
116Const MM_STREAM_CLOSE = &H3D5
117Const MM_STREAM_DONE = &H3D6
118Const MM_STREAM_ERROR = &H3D7
119
120Const MM_MOM_POSITIONCB = &H3CA
121
122Const MM_MCISIGNAL = &H3CB
123
124Const MM_MIM_MOREDATA = &H3CC 'MIM_DONE w/ pending events
125
126Const MM_MIXM_LINE_CHANGE = &H3D0 'mixer line change notify
127Const MM_MIXM_CONTROL_CHANGE =&H3D1 'mixer control change notify
128
129
130'----------------------------------------------
131' String resource number bases (internal use)
132
133Const MMSYSERR_BASE = 0
134Const WAVERR_BASE = 32
135Const MIDIERR_BASE = 64
136Const TIMERR_BASE = 96
137Const JOYERR_BASE = 160
138Const MCIERR_BASE = 256
139Const MIXERR_BASE = 1024
140
141Const MCI_STRING_OFFSET = 512
142Const MCI_VD_OFFSET = 1024
143Const MCI_CD_OFFSET = 1088
144Const MCI_WAVE_OFFSET = 1152
145Const MCI_SEQ_OFFSET = 1216
146
147
148'----------------------------------------------
149' General error return values
150
151Const MMSYSERR_NOERROR = 0 'no error
152Const MMSYSERR_ERROR = (MMSYSERR_BASE + 1) 'unspecified error
153Const MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2) 'device ID out of range
154Const MMSYSERR_NOTENABLED = (MMSYSERR_BASE + 3) 'driver failed enable
155Const MMSYSERR_ALLOCATED = (MMSYSERR_BASE + 4) 'device already allocated
156Const MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5) 'device handle is invalid
157Const MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6) 'no device driver present
158Const MMSYSERR_NOMEM = (MMSYSERR_BASE + 7) 'memory allocation error
159Const MMSYSERR_NOTSUPPORTED= (MMSYSERR_BASE + 8) 'function isn't supported
160Const MMSYSERR_BADERRNUM = (MMSYSERR_BASE + 9) 'error value out of range
161Const MMSYSERR_INVALFLAG = (MMSYSERR_BASE + 10) 'invalid flag passed
162Const MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11) 'invalid parameter passed
163Const MMSYSERR_HANDLEBUSY = (MMSYSERR_BASE + 12) 'handle being used
164Const MMSYSERR_INVALIDALIAS= (MMSYSERR_BASE + 13) 'specified alias not found
165Const MMSYSERR_BADDB = (MMSYSERR_BASE + 14) 'bad registry database
166Const MMSYSERR_KEYNOTFOUND = (MMSYSERR_BASE + 15) 'registry key not found
167Const MMSYSERR_READERROR = (MMSYSERR_BASE + 16) 'registry read error
168Const MMSYSERR_WRITEERROR = (MMSYSERR_BASE + 17) 'registry write error
169Const MMSYSERR_DELETEERROR = (MMSYSERR_BASE + 18) 'registry delete error
170Const MMSYSERR_VALNOTFOUND = (MMSYSERR_BASE + 19) 'registry value not found
171Const MMSYSERR_NODRIVERCB = (MMSYSERR_BASE + 20) 'driver does not call DriverCallback
172Const MMSYSERR_LASTERROR = (MMSYSERR_BASE + 20) 'last error in range
173
174
175'--------------------------------------------------------
176' Installable driver support
177
178Type _System_DeclareHandle_HDRVR:unused As DWord:End Type
179TypeDef HDRVR = *_System_DeclareHandle_HDRVR
180
181Type DRVCONFIGINFOEX
182 dwDCISize As DWord
183 lpszDCISectionName As LPCWSTR
184 lpszDCIAliasName As LPCWSTR
185 dnDevNode As DWORD
186End Type
187TypeDef PDRVCONFIGINFOEX = *DRVCONFIGINFOEX
188TypeDef LPDRVCONFIGINFOEX = *DRVCONFIGINFOEX
189
190' Driver messages
191Const DRV_LOAD = &H0001
192Const DRV_ENABLE = &H0002
193Const DRV_OPEN = &H0003
194Const DRV_CLOSE = &H0004
195Const DRV_DISABLE = &H0005
196Const DRV_FREE = &H0006
197Const DRV_CONFIGURE = &H0007
198Const DRV_QUERYCONFIGURE = &H0008
199Const DRV_INSTALL = &H0009
200Const DRV_REMOVE = &H000A
201Const DRV_EXITSESSION = &H000B
202Const DRV_POWER = &H000F
203Const DRV_RESERVED = &H0800
204Const DRV_USER = &H4000
205
206Type DRVCONFIGINFO
207 dwDCISize As DWord
208 lpszDCISectionName As LPCWSTR
209 lpszDCIAliasName As LPCWSTR
210End Type
211TypeDef PDRVCONFIGINFO = *DRVCONFIGINFO
212TypeDef LPDRVCONFIGINFO = *DRVCONFIGINFO
213
214' Supported return values for DRV_CONFIGURE message
215Const DRVCNF_CANCEL = &H0000
216Const DRVCNF_OK = &H0001
217Const DRVCNF_RESTART = &H0002
218
219TypeDef DRIVERPROC = *Function(dwDriverId As DWord, hdrvr As HDRVR, msg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
220
221Declare Function CloseDriver Lib "winmm" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT
222Declare Function OpenDriver Lib "winmm" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR
223Declare Function SendDriverMessage Lib "winmm" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT
224Declare Function GetDriverModuleHandle Lib "winmm" (hDriver As HDRVR) As HMODULE
225Declare Function DefDriverProc Lib "winmm" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
226
227Declare Function DrvClose Lib "winmm" Alias "CloseDriver" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT
228Declare Function DrvOpen Lib "winmm" Alias "OpenDriver" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR
229Declare Function DrvSendMessage Lib "winmm" Alias "SendDriverMessage" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT
230Declare Function DrvGetModuleHandle Lib "winmm" Alias "GetDriverModuleHandle" (hDriver As HDRVR) As HMODULE
231Declare Function DrvDefDriverProc Lib "winmm" Alias "DefDriverProc" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
232
233' return values from DriverProc() function
234Const DRV_CANCEL = DRVCNF_CANCEL
235Const DRV_OK = DRVCNF_OK
236Const DRV_RESTART = DRVCNF_RESTART
237
238Const DRV_MCI_FIRST = DRV_RESERVED
239Const DRV_MCI_LAST = (DRV_RESERVED + &HFFF)
240
241
242'--------------------------------------------------------
243' Driver callback support
244Const CALLBACK_TYPEMASK = &H00070000 'callback type mask
245Const CALLBACK_NULL = &H00000000 'no callback
246Const CALLBACK_WINDOW = &H00010000 'dwCallback is a HWND
247Const CALLBACK_TASK = &H00020000 'dwCallback is a HTASK
248Const CALLBACK_FUNCTION = &H00030000 'dwCallback is a FARPROC
249Const CALLBACK_THREAD = (CALLBACK_TASK)'thread ID replaces 16 bit task
250Const CALLBACK_EVENT = &H00050000 'dwCallback is an EVENT Handle
251
252TypeDef DRVCALLBACK = *Sub(hdrvr As HDRVR, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord)
253TypeDef PDRVCALLBACK = *DRVCALLBACK
254TypeDef LPDRVCALLBACK = *DRVCALLBACK
255
256
257'--------------------------------------------------------
258' General MMSYSTEM support
259
260Declare Function mmsystemGetVersion Lib "winmm" () As DWord
261
262
263
264'--------------------------------------------------------
265' Sound support
266
267Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (pszSound As PCSTR, fuSound As DWord) As BOOL
268
269Const SND_SYNC = &H0000
270Const SND_ASYNC = &H0001
271Const SND_NODEFAULT = &H0002
272Const SND_MEMORY = &H0004
273Const SND_LOOP = &H0008
274Const SND_NOSTOP = &H0010
275Const SND_NOWAIT = &H00002000
276Const SND_ALIAS = &H00010000
277Const SND_ALIAS_ID = &H00110000
278Const SND_FILENAME = &H00020000
279Const SND_RESOURCE = &H00040004
280Const SND_PURGE = &H0040
281Const SND_APPLICATION = &H0080
282Const SND_ALIAS_START = 0
283
284Const sndAlias(ch0, ch1) = (SND_ALIAS_START + ((&HFF AND ch0) OR (&HFF AND ch1)<<8))
285
286Const SND_ALIAS_SYSTEMASTERISK = sndAlias(&H53, &H2A)
287Const SND_ALIAS_SYSTEMQUESTION = sndAlias(&H53, &H3F)
288Const SND_ALIAS_SYSTEMHAND = sndAlias(&H53, &H48)
289Const SND_ALIAS_SYSTEMEXIT = sndAlias(&H53, &H45)
290Const SND_ALIAS_SYSTEMSTART = sndAlias(&H53, &H53)
291Const SND_ALIAS_SYSTEMWELCOME = sndAlias(&H53, &H57)
292Const SND_ALIAS_SYSTEMEXCLAMATION = sndAlias(&H53, &H21)
293Const SND_ALIAS_SYSTEMDEFAULT = sndAlias(&H53, &H44)
294
295Declare Function PlaySound Lib "winmm" Alias "PlaySoundA" (pszSound As PCSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
296
297
298'--------------------------------------------------------
299' Waveform audio support
300
301' waveform audio error return values
302Const WAVERR_BADFORMAT = (WAVERR_BASE + 0)
303Const WAVERR_STILLPLAYING = (WAVERR_BASE + 1)
304Const WAVERR_UNPREPARED = (WAVERR_BASE + 2)
305Const WAVERR_SYNC = (WAVERR_BASE + 3)
306Const WAVERR_LASTERROR = (WAVERR_BASE + 3)
307
308' waveform audio data types
309Type _System_DeclareHandle_HWAVE:unused As DWord:End Type
310TypeDef HWAVE = *_System_DeclareHandle_HWAVE
311Type _System_DeclareHandle_HWAVEIN:unused As DWord:End Type
312TypeDef HWAVEIN = *_System_DeclareHandle_HWAVEIN
313Type _System_DeclareHandle_HWAVEOUT:unused As DWord:End Type
314TypeDef HWAVEOUT = *_System_DeclareHandle_HWAVEOUT
315
316TypeDef WAVECALLBACK = DRVCALLBACK
317TypeDef LPWAVECALLBACK = *WAVECALLBACK
318
319' wave callback messages
320Const WOM_OPEN = MM_WOM_OPEN
321Const WOM_CLOSE = MM_WOM_CLOSE
322Const WOM_DONE = MM_WOM_DONE
323Const WIM_OPEN = MM_WIM_OPEN
324Const WIM_CLOSE = MM_WIM_CLOSE
325Const WIM_DATA = MM_WIM_DATA
326
327' device ID for wave device mapper
328Const WAVE_MAPPER = (-1)
329
330' flags for dwFlags parameter in waveOutOpen() and waveInOpen()
331Const WAVE_FORMAT_QUERY = &H0001
332Const WAVE_ALLOWSYNC = &H0002
333Const WAVE_MAPPED = &H0004
334Const WAVE_FORMAT_DIRECT = &H0008
335Const WAVE_FORMAT_DIRECT_QUERY = (WAVE_FORMAT_QUERY OR WAVE_FORMAT_DIRECT)
336
337' wave data block header
338Type WAVEHDR
339 lpData As LPSTR
340 dwBufferLength As DWord
341 dwBytesRecorded As DWord
342 dwUser As DWord
343 dwFlags As DWord
344 dwLoops As DWord
345 lpNext As *WAVEHDR
346 reserved As DWord
347End Type
348TypeDef PWAVEHDR = *WAVEHDR
349TypeDef LPWAVEHDR = *WAVEHDR
350
351' flags for dwFlags field of WAVEHDR
352Const WHDR_DONE = &H00000001
353Const WHDR_PREPARED = &H00000002
354Const WHDR_BEGINLOOP = &H00000004
355Const WHDR_ENDLOOP = &H00000008
356Const WHDR_INQUEUE = &H00000010
357
358' waveform output device capabilities structure
359Type WAVEOUTCAPSA
360 wMid As Word
361 wPid As Word
362 vDriverVersion As MMVERSION
363 szPname[ELM(MAXPNAMELEN)] As Char
364 dwFormats As DWord
365 wChannels As Word
366 wReserved1 As Word
367 dwSupport As DWord
368End Type
369TypeDef PWAVEOUTCAPSA = *WAVEOUTCAPSA
370TypeDef LPWAVEOUTCAPSA = *WAVEOUTCAPSA
371
372TypeDef WAVEOUTCAPS = WAVEOUTCAPSA
373TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSA
374TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSA
375
376' flags for dwSupport field of WAVEOUTCAPS
377Const WAVECAPS_PITCH = &H0001
378Const WAVECAPS_PLAYBACKRATE = &H0002
379Const WAVECAPS_VOLUME = &H0004
380Const WAVECAPS_LRVOLUME = &H0008
381Const WAVECAPS_SYNC = &H0010
382Const WAVECAPS_SAMPLEACCURATE = &H0020
383Const WAVECAPS_DIRECTSOUND = &H0040
384
385' waveform input device capabilities structure
386Type WAVEINCAPSA
387 wMid As Word
388 wPid As Word
389 vDriverVersion As MMVERSION
390 szPname[ELM(MAXPNAMELEN)] As Char
391 dwFormats As DWord
392 wChannels As Word
393 wReserved1 As Word
394End Type
395TypeDef PWAVEINCAPSA = *WAVEINCAPSA
396TypeDef LPWAVEINCAPSA = *WAVEINCAPSA
397
398TypeDef WAVEINCAPS = WAVEINCAPSA
399TypeDef PWAVEINCAPS = PWAVEINCAPSA
400TypeDef LPWAVEINCAPS = LPWAVEINCAPSA
401
402' defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
403Const WAVE_INVALIDFORMAT = &H00000000 ' invalid format
404Const WAVE_FORMAT_1M08 = &H00000001 ' 11.025 kHz, Mono, 8-bit
405Const WAVE_FORMAT_1S08 = &H00000002 ' 11.025 kHz, Stereo, 8-bit
406Const WAVE_FORMAT_1M16 = &H00000004 ' 11.025 kHz, Mono, 16-bit
407Const WAVE_FORMAT_1S16 = &H00000008 ' 11.025 kHz, Stereo, 16-bit
408Const WAVE_FORMAT_2M08 = &H00000010 ' 22.05 kHz, Mono, 8-bit
409Const WAVE_FORMAT_2S08 = &H00000020 ' 22.05 kHz, Stereo, 8-bit
410Const WAVE_FORMAT_2M16 = &H00000040 ' 22.05 kHz, Mono, 16-bit
411Const WAVE_FORMAT_2S16 = &H00000080 ' 22.05 kHz, Stereo, 16-bit
412Const WAVE_FORMAT_4M08 = &H00000100 ' 44.1 kHz, Mono, 8-bit
413Const WAVE_FORMAT_4S08 = &H00000200 ' 44.1 kHz, Stereo, 8-bit
414Const WAVE_FORMAT_4M16 = &H00000400 ' 44.1 kHz, Mono, 16-bit
415Const WAVE_FORMAT_4S16 = &H00000800 ' 44.1 kHz, Stereo, 16-bit
416
417' OLD general waveform format structure (information common to all formats)
418Type WAVEFORMAT
419 wFormatTag As Word
420 nChannels As Word
421 nSamplesPerSec As DWord
422 nAvgBytesPerSec As DWord
423 nBlockAlign As Word
424End Type
425TypeDef PWAVEFORMAT = *WAVEFORMAT
426TypeDef LPWAVEFORMAT = *WAVEFORMAT
427
428' flags for wFormatTag field of WAVEFORMAT
429Const WAVE_FORMAT_PCM = 1
430
431' specific waveform format structure for PCM data
432Type PCMWAVEFORMAT
433 wf As WAVEFORMAT
434 wBitsPerSample As Word
435End Type
436TypeDef PPCMWAVEFORMAT = *PCMWAVEFORMAT
437TypeDef LPPCMWAVEFORMAT = *PCMWAVEFORMAT
438
439Type WAVEFORMATEX
440 wFormatTag As Word
441 nChannels As Word
442 nSamplesPerSec As DWord
443 nAvgBytesPerSec As DWord
444 nBlockAlign As Word
445 wBitsPerSample As Word
446 cbSize As Word
447End Type
448TypeDef PWAVEFORMATEX = *WAVEFORMATEX
449TypeDef LPWAVEFORMATEX = *WAVEFORMATEX
450TypeDef LPCWAVEFORMATEX = *WAVEFORMATEX
451
452' waveform audio function prototypes
453Declare Function waveOutGetNumDevs Lib "winmm" () As DWord
454Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsA" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
455Declare Function waveOutGetVolume Lib "winmm" (hwo As HWAVEOUT, ByRef pdwVolume As DWord) As MMRESULT
456Declare Function waveOutSetVolume Lib "winmm" (hwo As HWAVEOUT, dwVolume As DWord) As MMRESULT
457Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
458Declare Function waveOutOpen Lib "winmm" (ByRef phwo As HWAVEOUT, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
459Declare Function waveOutClose Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
460Declare Function waveOutPrepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
461Declare Function waveOutUnprepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
462Declare Function waveOutWrite Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
463Declare Function waveOutPause Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
464Declare Function waveOutRestart Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
465Declare Function waveOutReset Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
466Declare Function waveOutBreakLoop Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
467Declare Function waveOutGetPosition Lib "winmm" (hwo As HWAVEOUT, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT
468Declare Function waveOutGetPitch Lib "winmm" (hwo As HWAVEOUT, ByRef pdwPitch As DWord) As MMRESULT
469Declare Function waveOutSetPitch Lib "winmm" (hwo As HWAVEOUT, dwPitch As DWord) As MMRESULT
470Declare Function waveOutGetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, ByRef pdwRate As DWord) As MMRESULT
471Declare Function waveOutSetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, dwRate As DWord) As MMRESULT
472Declare Function waveOutGetID Lib "winmm" (hwo As HWAVEOUT, ByRef puDeviceID As DWord) As MMRESULT
473Declare Function waveOutMessage Lib "winmm" (hwo As HWAVEOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
474
475Declare Function waveInGetNumDevs Lib "winmm" () As DWord
476Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsA" (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT
477Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
478Declare Function waveInOpen Lib "winmm" (ByRef phwi As HWAVEIN, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
479Declare Function waveInClose Lib "winmm" (hwi As HWAVEIN) As MMRESULT
480Declare Function waveInPrepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
481Declare Function waveInUnprepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
482Declare Function waveInAddBuffer Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
483Declare Function waveInStart Lib "winmm" (hwi As HWAVEIN) As MMRESULT
484Declare Function waveInStop Lib "winmm" (hwi As HWAVEIN) As MMRESULT
485Declare Function waveInReset Lib "winmm" (hwi As HWAVEIN) As MMRESULT
486Declare Function waveInGetPosition Lib "winmm" (hwi As HWAVEIN, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT
487Declare Function waveInGetID Lib "winmm" (hwi As HWAVEIN, ByRef puDeviceID As DWord) As MMRESULT
488Declare Function waveInMessage Lib "winmm" (hwi As HWAVEIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
489
490
491
492'--------------------------------------------------------
493' MIDI audio support
494
495' MIDI error return values
496Const MIDIERR_UNPREPARED = (MIDIERR_BASE + 0)
497Const MIDIERR_STILLPLAYING = (MIDIERR_BASE + 1)
498Const MIDIERR_NOMAP = (MIDIERR_BASE + 2)
499Const MIDIERR_NOTREADY = (MIDIERR_BASE + 3)
500Const MIDIERR_NODEVICE = (MIDIERR_BASE + 4)
501Const MIDIERR_INVALIDSETUP = (MIDIERR_BASE + 5)
502Const MIDIERR_BADOPENMODE = (MIDIERR_BASE + 6)
503Const MIDIERR_DONT_CONTINUE = (MIDIERR_BASE + 7)
504Const MIDIERR_LASTERROR = (MIDIERR_BASE + 7)
505
506' MIDI audio data types
507Type _System_DeclareHandle_HMIDI:unused As DWord:End Type
508TypeDef HMIDI = *_System_DeclareHandle_HMIDI
509Type _System_DeclareHandle_HMIDIIN:unused As DWord:End Type
510TypeDef HMIDIIN = *_System_DeclareHandle_HMIDIIN
511Type _System_DeclareHandle_HMIDIOUT:unused As DWord:End Type
512TypeDef HMIDIOUT = *_System_DeclareHandle_HMIDIOUT
513Type _System_DeclareHandle_HMIDISTRM:unused As DWord:End Type
514TypeDef HMIDISTRM = *_System_DeclareHandle_HMIDISTRM
515
516TypeDef MIDICALLBACK = DRVCALLBACK
517TypeDef LPMIDICALLBACK = *MIDICALLBACK
518
519Const MIDIPATCHSIZE = 128
520
521TypeDef LPPATCHARRAY = *Word
522TypeDef LPKEYARRAY = *Word
523
524' MIDI callback messages
525Const MIM_OPEN = MM_MIM_OPEN
526Const MIM_CLOSE = MM_MIM_CLOSE
527Const MIM_DATA = MM_MIM_DATA
528Const MIM_LONGDATA = MM_MIM_LONGDATA
529Const MIM_ERROR = MM_MIM_ERROR
530Const MIM_LONGERROR = MM_MIM_LONGERROR
531Const MOM_OPEN = MM_MOM_OPEN
532Const MOM_CLOSE = MM_MOM_CLOSE
533Const MOM_DONE = MM_MOM_DONE
534Const MIM_MOREDATA = MM_MIM_MOREDATA
535Const MOM_POSITIONCB = MM_MOM_POSITIONCB
536
537' device ID for MIDI mapper
538Const MIDIMAPPER = (-1)
539Const MIDI_MAPPER = (-1)
540
541Const MIDI_IO_STATUS = &H00000020
542
543' flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches()
544Const MIDI_CACHE_ALL = 1
545Const MIDI_CACHE_BESTFIT = 2
546Const MIDI_CACHE_QUERY = 3
547Const MIDI_UNCACHE = 4
548
549' MIDI output device capabilities structure
550Type MIDIOUTCAPSA
551 wMid As Word
552 wPid As Word
553 vDriverVersion As MMVERSION
554 szPname[ELM(MAXPNAMELEN)] As Char
555 wTechnology As Word
556 wVoices As Word
557 wNotes As Word
558 wChannelMask As Word
559 dwSupport As DWord
560End Type
561TypeDef PMIDIOUTCAPSA = *MIDIOUTCAPSA
562TypeDef LPMIDIOUTCAPSA = *MIDIOUTCAPSA
563
564TypeDef MIDIOUTCAPS = MIDIOUTCAPSA
565TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSA
566TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSA
567
568' flags for wTechnology field of MIDIOUTCAPS structure
569Const MOD_MIDIPORT = 1
570Const MOD_SYNTH = 2
571Const MOD_SQSYNTH = 3
572Const MOD_FMSYNTH = 4
573Const MOD_MAPPER = 5
574
575' flags for dwSupport field of MIDIOUTCAPS structure
576Const MIDICAPS_VOLUME = &H0001
577Const MIDICAPS_LRVOLUME = &H0002
578Const MIDICAPS_CACHE = &H0004
579Const MIDICAPS_STREAM = &H0008
580
581' MIDI input device capabilities structure
582Type MIDIINCAPSA
583 wMid As Word
584 wPid As Word
585 vDriverVersion As MMVERSION
586 szPname[ELM(MAXPNAMELEN)] As Char
587 dwSupport As DWord
588End Type
589TypeDef PMIDIINCAPSA = *MIDIINCAPSA
590TypeDef LPMIDIINCAPSA = *MIDIINCAPSA
591
592TypeDef MIDIINCAPS = MIDIINCAPSA
593TypeDef PMIDIINCAPS = PMIDIINCAPSA
594TypeDef LPMIDIINCAPS = LPMIDIINCAPSA
595
596' MIDI data block header
597Type MIDIHDR
598 lpData As LPSTR
599 dwBufferLength As DWord
600 dwBytesRecorded As DWord
601 dwUser As DWord
602 dwFlags As DWord
603 lpNext As *MIDIHDR
604 reserved As DWord
605 dwOffset As DWord
606 dwReserved[ELM(8)] As DWord
607End Type
608TypeDef PMIDIHDR = *MIDIHDR
609TypeDef LPMIDIHDR = *MIDIHDR
610
611Type MIDIEVENT
612 dwDeltaTime As DWord
613 dwStreamID As DWord
614 dwEvent As DWord
615 dwParms[ELM(1)] As DWord
616End Type
617
618Type MIDISTRMBUFFVER
619 dwVersion As DWord
620 dwMid As DWord
621 dwOEMVersion As DWord
622End Type
623
624' flags for dwFlags field of MIDIHDR structure
625Const MHDR_DONE = &H00000001
626Const MHDR_PREPARED = &H00000002
627Const MHDR_INQUEUE = &H00000004
628Const MHDR_ISSTRM = &H00000008
629
630Const MEVT_F_SHORT = &H00000000
631Const MEVT_F_LONG = &H80000000
632Const MEVT_F_CALLBACK = &H40000000
633Const MEVT_EVENTTYPE(x) = ((x>>24) AND &HFF)
634Const MEVT_EVENTPARM(x) = (x AND &H00FFFFFF)
635Const MEVT_SHORTMSG = (&H00)
636Const MEVT_TEMPO = (&H01)
637Const MEVT_NOP = (&H02)
638Const MEVT_LONGMSG = (&H80)
639Const MEVT_COMMENT = (&H82)
640Const MEVT_VERSION = (&H84)
641
642Const MIDISTRM_ERROR = (-2)
643
644' Structures and defines for midiStreamProperty
645Const MIDIPROP_SET = &H80000000
646Const MIDIPROP_GET = &H40000000
647Const MIDIPROP_TIMEDIV = &H00000001
648Const MIDIPROP_TEMPO = &H00000002
649
650Type MIDIPROPTIMEDIV
651 cbStruct As DWord
652 dwTimeDiv As DWord
653End Type
654TypeDef LPMIDIPROPTIMEDIV = *MIDIPROPTIMEDIV
655
656Type MIDIPROPTEMPO
657 cbStruct As DWord
658 dwTempo As DWord
659End Type
660TypeDef LPMIDIPROPTEMPO = *MIDIPROPTEMPO
661
662
663' MIDI function prototypes
664Declare Function midiOutGetNumDevs Lib "winmm" () As DWord
665Declare Function midiStreamOpen Lib "winmm" (ByRef phms As HMIDISTRM, ByRef puDeviceID As DWord, cMidi As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
666Declare Function midiStreamClose Lib "winmm" (hms As HMIDISTRM) As MMRESULT
667Declare Function midiStreamProperty Lib "winmm" (hms As HMIDISTRM, lppropdata As *Byte, dwProperty As DWord) As MMRESULT
668Declare Function midiStreamPosition Lib "winmm" (hms As HMIDISTRM, ByRef lpmmt As MMTIME, cbmmt As DWord) As MMRESULT
669Declare Function midiStreamOut Lib "winmm" (hms As HMIDISTRM, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
670Declare Function midiStreamPause Lib "winmm" (hms As HMIDISTRM) As MMRESULT
671Declare Function midiStreamRestart Lib "winmm" (hms As HMIDISTRM) As MMRESULT
672Declare Function midiStreamStop Lib "winmm" (hms As HMIDISTRM) As MMRESULT
673
674Declare Function midiConnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
675Declare Function midiDisconnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
676Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsA" (uDeviceID As DWord, ByRef pmoc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
677Declare Function midiOutGetVolume Lib "winmm" (hmo As HMIDIOUT, ByRef pdwVolume As DWord) As MMRESULT
678Declare Function midiOutSetVolume Lib "winmm" (hmo As HMIDIOUT, dwVolume As DWord) As MMRESULT
679Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
680Declare Function midiOutOpen Lib "winmm" (ByRef phmo As HMIDIOUT, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
681Declare Function midiOutClose Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
682Declare Function midiOutPrepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
683Declare Function midiOutUnprepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
684Declare Function midiOutShortMsg Lib "winmm" (hmo As HMIDIOUT, dwMsg As DWord) As MMRESULT
685Declare Function midiOutLongMsg Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
686Declare Function midiOutReset Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
687Declare Function midiOutCachePatches Lib "winmm" (hmo As HMIDIOUT, uBank As DWord, ByRef pwpa As Word, fuCache As DWord) As MMRESULT
688Declare Function midiOutCacheDrumPatches Lib "winmm" (hmo As HMIDIOUT, uPatch As DWord, ByRef pwkya As Word, fuCache As DWord) As MMRESULT
689Declare Function midiOutGetID Lib "winmm" (hmo As HMIDIOUT, ByRef puDeviceID As DWord) As MMRESULT
690Declare Function midiOutMessage Lib "winmm" (hmo As HMIDIOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
691
692Declare Function midiInGetNumDevs Lib "winmm" () As DWord
693Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsA" (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT
694Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
695Declare Function midiInOpen Lib "winmm" (ByRef phmi As HMIDIIN, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
696Declare Function midiInClose Lib "winmm" (hmi As HMIDIIN) As MMRESULT
697Declare Function midiInPrepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
698Declare Function midiInUnprepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
699Declare Function midiInAddBuffer Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
700Declare Function midiInStart Lib "winmm" (hmi As HMIDIIN) As MMRESULT
701Declare Function midiInStop Lib "winmm" (hmi As HMIDIIN) As MMRESULT
702Declare Function midiInReset Lib "winmm" (hmi As HMIDIIN) As MMRESULT
703Declare Function midiInGetID Lib "winmm" (hmi As HMIDIIN, ByRef puDeviceID As DWord) As MMRESULT
704Declare Function midiInMessage Lib "winmm" (hmi As HMIDIIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
705
706
707
708'--------------------------------------------------------
709' Time Format(used in MCI_SET_PARAMS, MCI_STATUS_PARAMS)
710
711Const MCI_FORMAT_MILLISECONDS = 0
712Const MCI_FORMAT_HMS = 1
713Const MCI_FORMAT_MSF = 2
714Const MCI_FORMAT_FRAMES = 3
715Const MCI_FORMAT_SMPTE_24 = 4
716Const MCI_FORMAT_SMPTE_25 = 5
717Const MCI_FORMAT_SMPTE_30 = 6
718Const MCI_FORMAT_SMPTE_30DROP = 7
719Const MCI_FORMAT_BYTES = 8
720Const MCI_FORMAT_SAMPLES = 9
721Const MCI_FORMAT_TMSF = 10
722
723
724'--------------
725' Types of MCI
726'--------------
727
728Type MCI_OPEN_PARMS
729 dwCallback As DWord
730 wDeviceID As DWord
731 lpstrDeviceType As BytePtr
732 lpstrElementName As BytePtr
733 lpstrAlias As BytePtr
734End Type
735
736Type MCI_PLAY_PARMS
737 dwCallback As DWord
738 dwFrom As DWord
739 dwTo As DWord
740End Type
741
742Type MCI_SEEK_PARMS
743 dwCallback As DWord
744 dwTo As DWord
745End Type
746
747Type MCI_SET_PARMS
748 dwCallback As DWord
749 dwTimeFormat As DWord
750 dwAudio As DWord
751End Type
752
753Const MCI_STATUS_LENGTH = &H00000001
754Const MCI_STATUS_POSITION = &H00000002
755Const MCI_STATUS_NUMBER_OF_TRACKS = &H00000003
756Const MCI_STATUS_MODE = &H00000004
757Const MCI_STATUS_MEDIA_PRESENT = &H00000005
758Const MCI_STATUS_TIME_FORMAT = &H00000006
759Const MCI_STATUS_READY = &H00000007
760Const MCI_STATUS_CURRENT_TRACK = &H00000008
761Type MCI_STATUS_PARMS
762 dwCallback As DWord
763 dwReturn As DWord
764 dwItem As DWord
765 dwTrack As DWord
766End Type
767
768
769'------------
770' MCI Macros
771
772Function MCI_MAKE_TMSF(tracks As Byte, minutes As Byte, seconds As Byte, frames As Byte) As DWord
773 MCI_MAKE_TMSF=MAKELONG(MAKEWORD(tracks,minutes),MAKEWORD(seconds,frames))
774End Function
775
776Function MCI_MSF_MINUTE(dwMFS As DWord) As Byte
777 MCI_MSF_MINUTE=LOBYTE(LOWORD(dwMFS))
778End Function
779
780Function MCI_MSF_SECOND(dwMFS As DWord) As Byte
781 MCI_MSF_SECOND=HIBYTE(LOWORD(dwMFS))
782End Function
783
784
785'---------------
786' MCI Functions
787
788' common flags for dwFlags parameter of MCI command messages
789Const MCI_NOTIFY = &H00000001
790Const MCI_WAIT = &H00000002
791Const MCI_FROM = &H00000004
792Const MCI_TO = &H00000008
793Const MCI_TRACK = &H00000010
794
795' flags for dwFlags parameter of MCI_OPEN command message
796Const MCI_OPEN_SHAREABLE = &H00000100
797Const MCI_OPEN_ELEMENT = &H00000200
798Const MCI_OPEN_ALIAS = &H00000400
799Const MCI_OPEN_ELEMENT_ID = &H00000800
800Const MCI_OPEN_TYPE_ID = &H00001000
801Const MCI_OPEN_TYPE = &H00002000
802Const MCI_ANIM_OPEN_WS = &H00010000
803Const MCI_ANIM_OPEN_PARENT = &H00020000
804Const MCI_ANIM_OPEN_NOSTATIC = &H00040000
805Const MCI_DGV_OPEN_WS = &H00010000
806Const MCI_DGV_OPEN_PARENT = &H00020000
807Const MCI_DGV_OPEN_NOSTATIC = &H00040000
808Const MCI_DGV_OPEN_16BIT = &H00080000
809Const MCI_DGV_OPEN_32BIT = &H00100000
810Const MCI_OVLY_OPEN_WS = &H00010000
811Const MCI_OVLY_OPEN_PARENT = &H00020000
812
813' flags for dwFlags parameter of MCI_PLAY command message
814Const MCI_ANIM_PLAY_SPEED = &H00010000
815Const MCI_ANIM_PLAY_REVERSE = &H00020000
816Const MCI_ANIM_PLAY_FAST = &H00040000
817Const MCI_ANIM_PLAY_SLOW = &H00080000
818Const MCI_ANIM_PLAY_SCAN = &H00100000
819Const MCI_DGV_PLAY_REPEAT = &H00010000
820Const MCI_DGV_PLAY_REVERSE = &H00020000
821Const MCI_MCIAVI_PLAY_WINDOW = &H01000000
822Const MCI_MCIAVI_PLAY_FULLSCREEN = &H02000000
823Const MCI_VCR_PLAY_REVERSE = &H00010000
824Const MCI_VCR_PLAY_AT = &H00020000
825Const MCI_VCR_PLAY_SCAN = &H00040000
826Const MCI_VD_PLAY_REVERSE = &H00010000
827Const MCI_VD_PLAY_FAST = &H00020000
828Const MCI_VD_PLAY_SPEED = &H00040000
829Const MCI_VD_PLAY_SCAN = &H00080000
830Const MCI_VD_PLAY_SLOW = &H00100000
831
832' flags for dwFlags parameter of MCI_SEEK command message
833Const MCI_SEEK_TO_START = &H00000100
834Const MCI_SEEK_TO_END = &H00000200
835Const MCI_VCR_SEEK_REVERSE = &H00010000
836Const MCI_VCR_SEEK_MARK = &H00020000
837Const MCI_VCR_SEEK_AT = &H00040000
838Const MCI_VD_SEEK_REVERSE = &H00010000
839
840' flags for dwFlags parameter of MCI_SET command message
841Const MCI_SET_DOOR_OPEN = &H00000100
842Const MCI_SET_DOOR_CLOSED = &H00000200
843Const MCI_SET_TIME_FORMAT = &H00000400
844Const MCI_SET_AUDIO = &H00000800
845Const MCI_SET_VIDEO = &H00001000
846Const MCI_SET_ON = &H00002000
847Const MCI_SET_OFF = &H00004000
848Const MCI_DGV_SET_SEEK_EXACTLY = &H00010000
849Const MCI_DGV_SET_SPEED = &H00020000
850Const MCI_DGV_SET_STILL = &H00040000
851Const MCI_DGV_SET_FILEFORMAT = &H00080000
852Const MCI_SEQ_FORMAT_SONGPTR = &H4001
853Const MCI_SEQ_FILE = &H4002
854Const MCI_SEQ_MIDI = &H4003
855Const MCI_SEQ_SMPTE = &H4004
856Const MCI_SEQ_NONE = 65533
857Const MCI_SEQ_MAPPER = 65535
858Const MCI_SEQ_SET_TEMPO = &H00010000
859Const MCI_SEQ_SET_PORT = &H00020000
860Const MCI_SEQ_SET_SLAVE = &H00040000
861Const MCI_SEQ_SET_MASTER = &H00080000
862Const MCI_SEQ_SET_OFFSET = &H01000000
863Const MCI_VCR_SET_TIME_MODE = &H00010000
864Const MCI_VCR_SET_POWER = &H00020000
865Const MCI_VCR_SET_RECORD_FORMAT = &H00040000
866Const MCI_VCR_SET_COUNTER_FORMAT = &H00080000
867Const MCI_VCR_SET_INDEX = &H00100000
868Const MCI_VCR_SET_ASSEMBLE_RECORD = &H00200000
869Const MCI_VCR_SET_TRACKING = &H00400000
870Const MCI_VCR_SET_SPEED = &H00800000
871Const MCI_VCR_SET_TAPE_LENGTH = &H01000000
872Const MCI_VCR_SET_COUNTER_VALUE = &H02000000
873Const MCI_VCR_SET_CLOCK = &H04000000
874Const MCI_VCR_SET_PAUSE_TIMEOUT = &H08000000
875Const MCI_VCR_SET_PREROLL_DURATION = &H10000000
876Const MCI_VCR_SET_POSTROLL_DURATION = &H20000000
877Const MCI_VD_FORMAT_TRACK = &H4001
878Const MCI_WAVE_SET_FORMATTAG = &H00010000
879Const MCI_WAVE_SET_CHANNELS = &H00020000
880Const MCI_WAVE_SET_SAMPLESPERSEC = &H00040000
881Const MCI_WAVE_SET_AVGBYTESPERSEC = &H00080000
882Const MCI_WAVE_SET_BLOCKALIGN = &H00100000
883Const MCI_WAVE_SET_BITSPERSAMPLE = &H00200000
884Const MCI_WAVE_INPUT = &H00400000
885Const MCI_WAVE_OUTPUT = &H00800000
886Const MCI_WAVE_SET_ANYINPUT = &H04000000
887Const MCI_WAVE_SET_ANYOUTPUT = &H08000000
888
889' flags for dwFlags parameter of MCI_STATUS command message
890Const MCI_STATUS_ITEM = &H00000100
891Const MCI_STATUS_START = &H00000200
892Const MCI_CDA_STATUS_TYPE_TRACK = &H00004001
893Const MCI_CDA_TRACK_AUDIO = MCI_CD_OFFSET+0
894Const MCI_CDA_TRACK_OTHER = MCI_CD_OFFSET+1
895Const MCI_DGV_STATUS_NOMINAL = &H00020000
896Const MCI_DGV_STATUS_REFERENCE = &H00040000
897Const MCI_DGV_STATUS_LEFT = &H00080000
898Const MCI_DGV_STATUS_RIGHT = &H00100000
899Const MCI_DGV_STATUS_DISKSPACE = &H00200000
900Const MCI_DGV_STATUS_INPUT = &H00400000
901Const MCI_DGV_STATUS_OUTPUT = &H00800000
902Const MCI_DGV_STATUS_RECORD = &H01000000
903
904' constants for predefined MCI device types
905Const MCI_DEVTYPE_VCR = 513
906Const MCI_DEVTYPE_VIDEODISC = 514
907Const MCI_DEVTYPE_OVERLAY = 515
908Const MCI_DEVTYPE_CD_AUDIO = 516
909Const MCI_DEVTYPE_DAT = 517
910Const MCI_DEVTYPE_SCANNER = 518
911Const MCI_DEVTYPE_ANIMATION = 519
912Const MCI_DEVTYPE_DIGITAL_VIDEO = 520
913Const MCI_DEVTYPE_OTHER = 521
914Const MCI_DEVTYPE_WAVEFORM_AUDIO = 522
915Const MCI_DEVTYPE_SEQUENCER = 523
916
917' return values for 'status mode' command
918Const MCI_MODE_NOT_READY = MCI_STRING_OFFSET + 12
919Const MCI_MODE_STOP = MCI_STRING_OFFSET + 13
920Const MCI_MODE_PLAY = MCI_STRING_OFFSET + 14
921Const MCI_MODE_RECORD = MCI_STRING_OFFSET + 15
922Const MCI_MODE_SEEK = MCI_STRING_OFFSET + 16
923Const MCI_MODE_PAUSE = MCI_STRING_OFFSET + 17
924Const MCI_MODE_OPEN = MCI_STRING_OFFSET + 18
925
926Const MCI_OPEN = &H0803
927Const MCI_CLOSE = &H0804
928Const MCI_ESCAPE = &H0805
929Const MCI_PLAY = &H0806
930Const MCI_SEEK = &H0807
931Const MCI_STOP = &H0808
932Const MCI_PAUSE = &H0809
933Const MCI_INFO = &H080A
934Const MCI_GETDEVCAPS = &H080B
935Const MCI_SPIN = &H080C
936Const MCI_SET = &H080D
937Const MCI_STEP = &H080E
938Const MCI_RECORD = &H080F
939Const MCI_SYSINFO = &H0810
940Const MCI_BREAK = &H0811
941Const MCI_SAVE = &H0813
942Const MCI_STATUS = &H0814
943Const MCI_CUE = &H0830
944Const MCI_REALIZE = &H0840
945Const MCI_WINDOW = &H0841
946Const MCI_PUT = &H0842
947Const MCI_WHERE = &H0843
948Const MCI_FREEZE = &H0844
949Const MCI_UNFREEZE = &H0845
950Const MCI_LOAD = &H0850
951Const MCI_CUT = &H0851
952Const MCI_COPY = &H0852
953Const MCI_PASTE = &H0853
954Const MCI_UPDATE = &H0854
955Const MCI_RESUME = &H0855
956Const MCI_DELETE = &H0856
957Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandA" (dwMciID As DWord, uMsg As DWord, fdwCommand As DWord, ByRef lpParam As Any) As DWord
958
959Const MCIERR_INVALID_DEVICE_ID = MCIERR_BASE + 1
960Const MCIERR_UNRECOGNIZED_KEYWORD = MCIERR_BASE + 3
961Const MCIERR_UNRECOGNIZED_COMMAND = MCIERR_BASE + 5
962Const MCIERR_HARDWARE = MCIERR_BASE + 6
963Const MCIERR_INVALID_DEVICE_NAME = MCIERR_BASE + 7
964Const MCIERR_OUT_OF_MEMORY = MCIERR_BASE + 8
965Const MCIERR_DEVICE_OPEN = MCIERR_BASE + 9
966Const MCIERR_CANNOT_LOAD_DRIVER = MCIERR_BASE + 10
967Const MCIERR_MISSING_COMMAND_STRING = MCIERR_BASE + 11
968Const MCIERR_PARAM_OVERFLOW = MCIERR_BASE + 12
969Const MCIERR_MISSING_STRING_ARGUMENT = MCIERR_BASE + 13
970Const MCIERR_BAD_INTEGER = MCIERR_BASE + 14
971Const MCIERR_PARSER_INTERNAL = MCIERR_BASE + 15
972Const MCIERR_DRIVER_INTERNAL = MCIERR_BASE + 16
973Const MCIERR_MISSING_PARAMETER = MCIERR_BASE + 17
974Const MCIERR_UNSUPPORTED_FUNCTION = MCIERR_BASE + 18
975Const MCIERR_FILE_NOT_FOUND = MCIERR_BASE + 19
976Const MCIERR_DEVICE_NOT_READY = MCIERR_BASE + 20
977Const MCIERR_INTERNAL = MCIERR_BASE + 21
978Const MCIERR_DRIVER = MCIERR_BASE + 22
979Const MCIERR_CANNOT_USE_ALL = MCIERR_BASE + 23
980Const MCIERR_MULTIPLE = MCIERR_BASE + 24
981Const MCIERR_EXTENSION_NOT_FOUND = MCIERR_BASE + 25
982Const MCIERR_OUTOFRANGE = MCIERR_BASE + 26
983Const MCIERR_FLAGS_NOT_COMPATIBLE = MCIERR_BASE + 28
984Const MCIERR_FILE_NOT_SAVED = MCIERR_BASE + 30
985Const MCIERR_DEVICE_TYPE_REQUIRED = MCIERR_BASE + 31
986Const MCIERR_DEVICE_LOCKED = MCIERR_BASE + 32
987Const MCIERR_DUPLICATE_ALIAS = MCIERR_BASE + 33
988Const MCIERR_BAD_CONSTANT = MCIERR_BASE + 34
989Const MCIERR_MUST_USE_SHAREABLE = MCIERR_BASE + 35
990Const MCIERR_MISSING_DEVICE_NAME = MCIERR_BASE + 36
991Const MCIERR_BAD_TIME_FORMAT = MCIERR_BASE + 37
992Const MCIERR_NO_CLOSING_QUOTE = MCIERR_BASE + 38
993Const MCIERR_DUPLICATE_FLAGS = MCIERR_BASE + 39
994Const MCIERR_INVALID_FILE = MCIERR_BASE + 40
995Const MCIERR_NULL_PARAMETER_BLOCK = MCIERR_BASE + 41
996Const MCIERR_UNNAMED_RESOURCE = MCIERR_BASE + 42
997Const MCIERR_NEW_REQUIRES_ALIAS = MCIERR_BASE + 43
998Const MCIERR_NOTIFY_ON_AUTO_OPEN = MCIERR_BASE + 44
999Const MCIERR_NO_ELEMENT_ALLOWED = MCIERR_BASE + 45
1000Const MCIERR_NONAPPLICABLE_FUNCTION = MCIERR_BASE + 46
1001Const MCIERR_ILLEGAL_FOR_AUTO_OPEN = MCIERR_BASE + 47
1002Const MCIERR_FILENAME_REQUIRED = MCIERR_BASE + 48
1003Const MCIERR_EXTRA_CHARACTERS = MCIERR_BASE + 49
1004Const MCIERR_DEVICE_NOT_INSTALLED = MCIERR_BASE + 50
1005Const MCIERR_GET_CD = MCIERR_BASE + 51
1006Const MCIERR_SET_CD = MCIERR_BASE + 52
1007Const MCIERR_SET_DRIVE = MCIERR_BASE + 53
1008Const MCIERR_DEVICE_LENGTH = MCIERR_BASE + 54
1009Const MCIERR_DEVICE_ORD_LENGTH = MCIERR_BASE + 55
1010Const MCIERR_NO_INTEGER = MCIERR_BASE + 56
1011Const MCIERR_WAVE_OUTPUTSINUSE = MCIERR_BASE + 64
1012Const MCIERR_WAVE_SETOUTPUTINUSE = MCIERR_BASE + 65
1013Const MCIERR_WAVE_INPUTSINUSE = MCIERR_BASE + 66
1014Const MCIERR_WAVE_SETINPUTINUSE = MCIERR_BASE + 67
1015Const MCIERR_WAVE_OUTPUTUNSPECIFIED = MCIERR_BASE + 68
1016Const MCIERR_WAVE_INPUTUNSPECIFIED = MCIERR_BASE + 69
1017Const MCIERR_WAVE_OUTPUTSUNSUITABLE = MCIERR_BASE + 70
1018Const MCIERR_WAVE_SETOUTPUTUNSUITABLE = MCIERR_BASE + 71
1019Const MCIERR_WAVE_INPUTSUNSUITABLE = MCIERR_BASE + 72
1020Const MCIERR_WAVE_SETINPUTUNSUITABLE = MCIERR_BASE + 73
1021Const MCIERR_SEQ_DIV_INCOMPATIBLE = MCIERR_BASE + 80
1022Const MCIERR_SEQ_PORT_INUSE = MCIERR_BASE + 81
1023Const MCIERR_SEQ_PORT_NONEXISTENT = MCIERR_BASE + 82
1024Const MCIERR_SEQ_PORT_MAPNODEVICE = MCIERR_BASE + 83
1025Const MCIERR_SEQ_PORT_MISCERROR = MCIERR_BASE + 84
1026Const MCIERR_SEQ_TIMER = MCIERR_BASE + 85
1027Const MCIERR_SEQ_PORTUNSPECIFIED = MCIERR_BASE + 86
1028Const MCIERR_SEQ_NOMIDIPRESENT = MCIERR_BASE + 87
1029Const MCIERR_NO_WINDOW = MCIERR_BASE + 90
1030Const MCIERR_CREATEWINDOW = MCIERR_BASE + 91
1031Const MCIERR_FILE_READ = MCIERR_BASE + 92
1032Const MCIERR_FILE_WRITE = MCIERR_BASE + 93
1033Const MCIERR_NO_IDENTITY = MCIERR_BASE + 94
1034Const MCIERR_CUSTOM_DRIVER_BASE = MCIERR_BASE + 256
1035Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As DWord, pszText As PSTR, cchText As Long) As BOOL
1036
1037
1038#endif '_INC_MMSYS
Note: See TracBrowser for help on using the repository browser.