blob: 91e7ef568d7d84f66aa648501b2888dde9b5d788 [file] [log] [blame]
Alexandre Julliard58199531994-04-21 01:20:00 +00001/*
2 * MMSYSTEM - Multimedia Wine Extension ... :-)
3 */
4
5#ifndef MMSYSTEM_H
6#define MMSYSTEM_H
7
8typedef LPSTR HPSTR; /* a huge version of LPSTR */
9typedef LPCSTR HPCSTR; /* a huge version of LPCSTR */
10
Alexandre Julliard6b81b391994-07-07 16:23:58 +000011#define MAXWAVEDRIVERS 10
12#define MAXMIDIDRIVERS 10
13#define MAXAUXDRIVERS 10
14#define MAXMCIDRIVERS 32
15
Alexandre Julliard58199531994-04-21 01:20:00 +000016#define MAXPNAMELEN 32 /* max product name length (including NULL) */
17#define MAXERRORLENGTH 128 /* max error text length (including NULL) */
18
19typedef WORD VERSION; /* major (high byte), minor (low byte) */
20
21typedef struct {
22 UINT wType; /* indicates the contents of the union */
23 union {
24 DWORD ms; /* milliseconds */
25 DWORD sample; /* samples */
26 DWORD cb; /* byte count */
27 struct { /* SMPTE */
28 BYTE hour; /* hours */
29 BYTE min; /* minutes */
30 BYTE sec; /* seconds */
31 BYTE frame; /* frames */
32 BYTE fps; /* frames per second */
33 BYTE dummy; /* pad */
34 } smpte;
35 struct { /* MIDI */
36 DWORD songptrpos; /* song pointer position */
37 } midi;
38 } u;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +000039} MMTIME, *LPMMTIME;
Alexandre Julliard58199531994-04-21 01:20:00 +000040
41#define TIME_MS 0x0001 /* time in milliseconds */
42#define TIME_SAMPLES 0x0002 /* number of wave samples */
43#define TIME_BYTES 0x0004 /* current byte offset */
44#define TIME_SMPTE 0x0008 /* SMPTE time */
45#define TIME_MIDI 0x0010 /* MIDI time */
46
47#define MM_JOY1MOVE 0x3A0 /* joystick */
48#define MM_JOY2MOVE 0x3A1
49#define MM_JOY1ZMOVE 0x3A2
50#define MM_JOY2ZMOVE 0x3A3
51#define MM_JOY1BUTTONDOWN 0x3B5
52#define MM_JOY2BUTTONDOWN 0x3B6
53#define MM_JOY1BUTTONUP 0x3B7
54#define MM_JOY2BUTTONUP 0x3B8
55
56#define MM_MCINOTIFY 0x3B9 /* MCI */
57
58#define MM_WOM_OPEN 0x3BB /* waveform output */
59#define MM_WOM_CLOSE 0x3BC
60#define MM_WOM_DONE 0x3BD
61
62#define MM_WIM_OPEN 0x3BE /* waveform input */
63#define MM_WIM_CLOSE 0x3BF
64#define MM_WIM_DATA 0x3C0
65
66#define MM_MIM_OPEN 0x3C1 /* MIDI input */
67#define MM_MIM_CLOSE 0x3C2
68#define MM_MIM_DATA 0x3C3
69#define MM_MIM_LONGDATA 0x3C4
70#define MM_MIM_ERROR 0x3C5
71#define MM_MIM_LONGERROR 0x3C6
72
73#define MM_MOM_OPEN 0x3C7 /* MIDI output */
74#define MM_MOM_CLOSE 0x3C8
75#define MM_MOM_DONE 0x3C9
76
77
78#define MMSYSERR_BASE 0
79#define WAVERR_BASE 32
80#define MIDIERR_BASE 64
81#define TIMERR_BASE 96
82#define JOYERR_BASE 160
83#define MCIERR_BASE 256
84
85#define MCI_STRING_OFFSET 512
86#define MCI_VD_OFFSET 1024
87#define MCI_CD_OFFSET 1088
88#define MCI_WAVE_OFFSET 1152
89#define MCI_SEQ_OFFSET 1216
90
91#define MMSYSERR_NOERROR 0 /* no error */
92#define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
93#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
94#define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
95#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
96#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
97#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
98#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
99#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
100#define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
101#define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
102#define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
103#define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */
104
105#define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */
106#define CALLBACK_NULL 0x00000000l /* no callback */
107#define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
108#define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
109#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
110
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000111typedef void (*LPDRVCALLBACK) (HDRVR16 h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000112
113#define MM_MICROSOFT 1 /* Microsoft Corp. */
114
115#define MM_MIDI_MAPPER 1 /* MIDI Mapper */
116#define MM_WAVE_MAPPER 2 /* Wave Mapper */
117
118#define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */
119#define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */
120#define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */
121#define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */
122#define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */
123
124#define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */
125
126#define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */
127#define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */
128
129#define MM_PC_JOYSTICK 12 /* Joystick adapter */
130
131
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000132WORD mmsystemGetVersion(void);
133void OutputDebugStr(LPCSTR);
Alexandre Julliard58199531994-04-21 01:20:00 +0000134
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000135BOOL sndPlaySound(LPCSTR lpszSoundName, UINT uFlags);
Alexandre Julliard58199531994-04-21 01:20:00 +0000136
137#define SND_SYNC 0x0000 /* play synchronously (default) */
138#define SND_ASYNC 0x0001 /* play asynchronously */
139#define SND_NODEFAULT 0x0002 /* don't use default sound */
140#define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */
141#define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */
142#define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */
143
144/* waveform audio error return values */
145#define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
146#define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
147#define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
148#define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
149#define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
150
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000151typedef HWAVEIN16 *LPHWAVEIN16;
152typedef HWAVEOUT16 *LPHWAVEOUT16;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000153typedef LPDRVCALLBACK LPWAVECALLBACK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000154
155#define WOM_OPEN MM_WOM_OPEN
156#define WOM_CLOSE MM_WOM_CLOSE
157#define WOM_DONE MM_WOM_DONE
158#define WIM_OPEN MM_WIM_OPEN
159#define WIM_CLOSE MM_WIM_CLOSE
160#define WIM_DATA MM_WIM_DATA
161
162#define WAVE_MAPPER (-1)
163
164#define WAVE_FORMAT_QUERY 0x0001
165#define WAVE_ALLOWSYNC 0x0002
166
Alexandre Julliard6b81b391994-07-07 16:23:58 +0000167typedef struct wavehdr_tag {
Alexandre Julliard58199531994-04-21 01:20:00 +0000168 LPSTR lpData; /* pointer to locked data buffer */
169 DWORD dwBufferLength; /* length of data buffer */
170 DWORD dwBytesRecorded; /* used for input only */
171 DWORD dwUser; /* for client's use */
172 DWORD dwFlags; /* assorted flags (see defines) */
173 DWORD dwLoops; /* loop control counter */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000174 struct wavehdr_tag *lpNext; /* reserved for driver */
Alexandre Julliard58199531994-04-21 01:20:00 +0000175 DWORD reserved; /* reserved for driver */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000176} WAVEHDR, *LPWAVEHDR;
Alexandre Julliard58199531994-04-21 01:20:00 +0000177
178#define WHDR_DONE 0x00000001 /* done bit */
179#define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
180#define WHDR_BEGINLOOP 0x00000004 /* loop start block */
181#define WHDR_ENDLOOP 0x00000008 /* loop end block */
182#define WHDR_INQUEUE 0x00000010 /* reserved for driver */
183
184typedef struct {
185 UINT wMid; /* manufacturer ID */
186 UINT wPid; /* product ID */
187 VERSION vDriverVersion; /* version of the driver */
188 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
189 DWORD dwFormats; /* formats supported */
190 UINT wChannels; /* number of sources supported */
191 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000192} WAVEOUTCAPS, *LPWAVEOUTCAPS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000193
194#define WAVECAPS_PITCH 0x0001 /* supports pitch control */
195#define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
196#define WAVECAPS_VOLUME 0x0004 /* supports volume control */
197#define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
198#define WAVECAPS_SYNC 0x0010
199
200typedef struct {
201 UINT wMid; /* manufacturer ID */
202 UINT wPid; /* product ID */
203 VERSION vDriverVersion; /* version of the driver */
204 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
205 DWORD dwFormats; /* formats supported */
206 UINT wChannels; /* number of channels supported */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000207} WAVEINCAPS, *LPWAVEINCAPS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000208
209#define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */
210#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
211#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
212#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
213#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
214#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
215#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
216#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
217#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
218#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
219#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
220#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
221#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
222
223/* general format structure common to all formats */
224typedef struct {
Alexandre Julliard2787be81995-05-22 18:23:01 +0000225 WORD wFormatTag; /* format type */
226 WORD nChannels; /* number of channels */
227 DWORD nSamplesPerSec WINE_PACKED; /* sample rate */
228 DWORD nAvgBytesPerSec WINE_PACKED; /* for buffer estimation */
229 WORD nBlockAlign; /* block size of data */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000230} WAVEFORMAT, *LPWAVEFORMAT;
Alexandre Julliard58199531994-04-21 01:20:00 +0000231
232#define WAVE_FORMAT_PCM 1
233
234typedef struct {
235 WAVEFORMAT wf;
236 WORD wBitsPerSample;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000237} PCMWAVEFORMAT, *LPPCMWAVEFORMAT;
Alexandre Julliard58199531994-04-21 01:20:00 +0000238
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000239UINT waveOutGetNumDevs(void);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000240UINT waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS * lpCaps,
Alexandre Julliard58199531994-04-21 01:20:00 +0000241 UINT uSize);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000242UINT waveOutGetVolume(UINT uDeviceID, DWORD * lpdwVolume);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000243UINT waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
244UINT waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
245UINT waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000246UINT waveOutOpen(HWAVEOUT16 * lphWaveOut, UINT uDeviceID,
Alexandre Julliard36ca1361994-06-02 22:38:20 +0000247 const LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000248UINT waveOutClose(HWAVEOUT16 hWaveOut);
249UINT waveOutPrepareHeader(HWAVEOUT16 hWaveOut,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000250 WAVEHDR * lpWaveOutHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000251UINT waveOutUnprepareHeader(HWAVEOUT16 hWaveOut,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000252 WAVEHDR * lpWaveOutHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000253UINT waveOutWrite(HWAVEOUT16 hWaveOut, WAVEHDR * lpWaveOutHdr,
Alexandre Julliard58199531994-04-21 01:20:00 +0000254 UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000255UINT waveOutPause(HWAVEOUT16 hWaveOut);
256UINT waveOutRestart(HWAVEOUT16 hWaveOut);
257UINT waveOutReset(HWAVEOUT16 hWaveOut);
258UINT waveOutBreakLoop(HWAVEOUT16 hWaveOut);
259UINT waveOutGetPosition(HWAVEOUT16 hWaveOut, MMTIME * lpInfo,
Alexandre Julliard58199531994-04-21 01:20:00 +0000260 UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000261UINT waveOutGetPitch(HWAVEOUT16 hWaveOut, DWORD * lpdwPitch);
262UINT waveOutSetPitch(HWAVEOUT16 hWaveOut, DWORD dwPitch);
263UINT waveOutGetPlaybackRate(HWAVEOUT16 hWaveOut, DWORD * lpdwRate);
264UINT waveOutSetPlaybackRate(HWAVEOUT16 hWaveOut, DWORD dwRate);
265UINT waveOutGetID(HWAVEOUT16 hWaveOut, UINT * lpuDeviceID);
Alexandre Julliard58199531994-04-21 01:20:00 +0000266
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000267DWORD waveOutMessage(HWAVEOUT16 hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000268
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000269UINT waveInGetNumDevs(void);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000270UINT waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS * lpCaps,
Alexandre Julliard58199531994-04-21 01:20:00 +0000271 UINT uSize);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000272UINT waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000273UINT waveInOpen(HWAVEIN16 * lphWaveIn, UINT uDeviceID,
Alexandre Julliard36ca1361994-06-02 22:38:20 +0000274 const LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000275UINT waveInClose(HWAVEIN16 hWaveIn);
276UINT waveInPrepareHeader(HWAVEIN16 hWaveIn,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000277 WAVEHDR * lpWaveInHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000278UINT waveInUnprepareHeader(HWAVEIN16 hWaveIn,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000279 WAVEHDR * lpWaveInHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000280UINT waveInAddBuffer(HWAVEIN16 hWaveIn,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000281 WAVEHDR * lpWaveInHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000282UINT waveInStart(HWAVEIN16 hWaveIn);
283UINT waveInStop(HWAVEIN16 hWaveIn);
284UINT waveInReset(HWAVEIN16 hWaveIn);
285UINT waveInGetPosition(HWAVEIN16 hWaveIn, MMTIME * lpInfo,
Alexandre Julliard58199531994-04-21 01:20:00 +0000286 UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000287UINT waveInGetID(HWAVEIN16 hWaveIn, UINT * lpuDeviceID);
Alexandre Julliard58199531994-04-21 01:20:00 +0000288
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000289DWORD waveInMessage(HWAVEIN16 hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000290
291#define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
292#define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
293#define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */
294#define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */
295#define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */
296#define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */
297#define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */
298
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000299typedef HMIDIIN16 *LPHMIDIIN16;
300typedef HMIDIOUT16 *LPHMIDIOUT16;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000301typedef LPDRVCALLBACK LPMIDICALLBACK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000302#define MIDIPATCHSIZE 128
303typedef WORD PATCHARRAY[MIDIPATCHSIZE];
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000304typedef WORD *LPPATCHARRAY;
Alexandre Julliard58199531994-04-21 01:20:00 +0000305typedef WORD KEYARRAY[MIDIPATCHSIZE];
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000306typedef WORD *LPKEYARRAY;
Alexandre Julliard58199531994-04-21 01:20:00 +0000307
308#define MIM_OPEN MM_MIM_OPEN
309#define MIM_CLOSE MM_MIM_CLOSE
310#define MIM_DATA MM_MIM_DATA
311#define MIM_LONGDATA MM_MIM_LONGDATA
312#define MIM_ERROR MM_MIM_ERROR
313#define MIM_LONGERROR MM_MIM_LONGERROR
314#define MOM_OPEN MM_MOM_OPEN
315#define MOM_CLOSE MM_MOM_CLOSE
316#define MOM_DONE MM_MOM_DONE
317
318#define MIDIMAPPER (-1)
319#define MIDI_MAPPER (-1)
320
321/* flags for wFlags parm of
322 midiOutCachePatches(),
323 midiOutCacheDrumPatches() */
324#define MIDI_CACHE_ALL 1
325#define MIDI_CACHE_BESTFIT 2
326#define MIDI_CACHE_QUERY 3
327#define MIDI_UNCACHE 4
328
329typedef struct {
330 UINT wMid; /* manufacturer ID */
331 UINT wPid; /* product ID */
332 VERSION vDriverVersion; /* version of the driver */
333 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
334 UINT wTechnology; /* type of device */
335 UINT wVoices; /* # of voices (internal synth only) */
336 UINT wNotes; /* max # of notes (internal synth only) */
337 UINT wChannelMask; /* channels used (internal synth only) */
338 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000339} MIDIOUTCAPS, *LPMIDIOUTCAPS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000340
341#define MOD_MIDIPORT 1 /* output port */
342#define MOD_SYNTH 2 /* generic internal synth */
343#define MOD_SQSYNTH 3 /* square wave internal synth */
344#define MOD_FMSYNTH 4 /* FM internal synth */
345#define MOD_MAPPER 5 /* MIDI mapper */
346
347#define MIDICAPS_VOLUME 0x0001 /* supports volume control */
348#define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */
349#define MIDICAPS_CACHE 0x0004
350
351typedef struct {
352 UINT wMid; /* manufacturer ID */
353 UINT wPid; /* product ID */
354 VERSION vDriverVersion; /* version of the driver */
355 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000356} MIDIINCAPS, *LPMIDIINCAPS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000357
358typedef struct {
359 LPSTR lpData; /* pointer to locked data block */
360 DWORD dwBufferLength; /* length of data in data block */
361 DWORD dwBytesRecorded; /* used for input only */
362 DWORD dwUser; /* for client's use */
363 DWORD dwFlags; /* assorted flags (see defines) */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000364 struct midihdr_tag *lpNext; /* reserved for driver */
Alexandre Julliard58199531994-04-21 01:20:00 +0000365 DWORD reserved; /* reserved for driver */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000366} MIDIHDR, *LPMIDIHDR;
Alexandre Julliard58199531994-04-21 01:20:00 +0000367
368#define MHDR_DONE 0x00000001 /* done bit */
369#define MHDR_PREPARED 0x00000002 /* set if header prepared */
370#define MHDR_INQUEUE 0x00000004 /* reserved for driver */
371
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000372UINT midiOutGetNumDevs(void);
373UINT midiOutGetDevCaps(UINT uDeviceID,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000374 MIDIOUTCAPS * lpCaps, UINT uSize);
375UINT midiOutGetVolume(UINT uDeviceID, DWORD * lpdwVolume);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000376UINT midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
377UINT midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
378UINT midiGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000379UINT midiOutOpen(HMIDIOUT16 * lphMidiOut, UINT uDeviceID,
Alexandre Julliard58199531994-04-21 01:20:00 +0000380 DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000381UINT midiOutClose(HMIDIOUT16 hMidiOut);
382UINT midiOutPrepareHeader(HMIDIOUT16 hMidiOut,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000383 MIDIHDR * lpMidiOutHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000384UINT midiOutUnprepareHeader(HMIDIOUT16 hMidiOut,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000385 MIDIHDR * lpMidiOutHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000386UINT midiOutShortMsg(HMIDIOUT16 hMidiOut, DWORD dwMsg);
387UINT midiOutLongMsg(HMIDIOUT16 hMidiOut,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000388 MIDIHDR * lpMidiOutHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000389UINT midiOutReset(HMIDIOUT16 hMidiOut);
390UINT midiOutCachePatches(HMIDIOUT16 hMidiOut,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000391 UINT uBank, WORD * lpwPatchArray, UINT uFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000392UINT midiOutCacheDrumPatches(HMIDIOUT16 hMidiOut,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000393 UINT uPatch, WORD * lpwKeyArray, UINT uFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000394UINT midiOutGetID(HMIDIOUT16 hMidiOut, UINT * lpuDeviceID);
Alexandre Julliard58199531994-04-21 01:20:00 +0000395
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000396DWORD midiOutMessage(HMIDIOUT16 hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000397
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000398UINT midiInGetNumDevs(void);
399UINT midiInGetDevCaps(UINT uDeviceID,
Alexandre Julliard58199531994-04-21 01:20:00 +0000400 LPMIDIINCAPS lpCaps, UINT uSize);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000401UINT midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000402UINT midiInOpen(HMIDIIN16 * lphMidiIn, UINT uDeviceID,
Alexandre Julliard58199531994-04-21 01:20:00 +0000403 DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000404UINT midiInClose(HMIDIIN16 hMidiIn);
405UINT midiInPrepareHeader(HMIDIIN16 hMidiIn,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000406 MIDIHDR * lpMidiInHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000407UINT midiInUnprepareHeader(HMIDIIN16 hMidiIn,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000408 MIDIHDR * lpMidiInHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000409UINT midiInAddBuffer(HMIDIIN16 hMidiIn,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000410 MIDIHDR * lpMidiInHdr, UINT uSize);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000411UINT midiInStart(HMIDIIN16 hMidiIn);
412UINT midiInStop(HMIDIIN16 hMidiIn);
413UINT midiInReset(HMIDIIN16 hMidiIn);
414UINT midiInGetID(HMIDIIN16 hMidiIn, UINT * lpuDeviceID);
Alexandre Julliard58199531994-04-21 01:20:00 +0000415
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000416DWORD midiInMessage(HMIDIIN16 hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000417
418#define AUX_MAPPER (-1)
419
420typedef struct {
421 UINT wMid; /* manufacturer ID */
422 UINT wPid; /* product ID */
423 VERSION vDriverVersion; /* version of the driver */
424 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
425 UINT wTechnology; /* type of device */
426 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000427} AUXCAPS, *LPAUXCAPS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000428
429#define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
430#define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
431
432#define AUXCAPS_VOLUME 0x0001 /* supports volume control */
433#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
434
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000435UINT auxGetNumDevs(void);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000436UINT auxGetDevCaps(UINT uDeviceID, AUXCAPS * lpCaps, UINT uSize);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000437UINT auxSetVolume(UINT uDeviceID, DWORD dwVolume);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000438UINT auxGetVolume(UINT uDeviceID, DWORD * lpdwVolume);
Alexandre Julliard58199531994-04-21 01:20:00 +0000439
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000440DWORD auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000441
442#define TIMERR_NOERROR (0) /* no error */
443#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
444#define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
445
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000446typedef void (*LPTIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000447
448#define TIME_ONESHOT 0 /* program timer for single event */
449#define TIME_PERIODIC 1 /* program for continuous periodic event */
450
451typedef struct {
452 UINT wPeriodMin; /* minimum period supported */
453 UINT wPeriodMax; /* maximum period supported */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000454} TIMECAPS, *LPTIMECAPS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000455
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000456UINT timeGetSystemTime(MMTIME * lpTime, UINT uSize);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000457DWORD timeGetTime(void);
458UINT timeSetEvent(UINT uDelay, UINT uResolution,
Alexandre Julliard58199531994-04-21 01:20:00 +0000459 LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000460UINT timeKillEvent(UINT uTimerID);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000461UINT timeGetDevCaps(TIMECAPS * lpTimeCaps, UINT uSize);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000462UINT timeBeginPeriod(UINT uPeriod);
463UINT timeEndPeriod(UINT uPeriod);
Alexandre Julliard58199531994-04-21 01:20:00 +0000464
465#define JOYERR_NOERROR (0) /* no error */
466#define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
467#define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */
468#define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */
469
470#define JOY_BUTTON1 0x0001
471#define JOY_BUTTON2 0x0002
472#define JOY_BUTTON3 0x0004
473#define JOY_BUTTON4 0x0008
474#define JOY_BUTTON1CHG 0x0100
475#define JOY_BUTTON2CHG 0x0200
476#define JOY_BUTTON3CHG 0x0400
477#define JOY_BUTTON4CHG 0x0800
478
479#define JOYSTICKID1 0
480#define JOYSTICKID2 1
481
482typedef struct {
483 UINT wMid; /* manufacturer ID */
484 UINT wPid; /* product ID */
485 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
486 UINT wXmin; /* minimum x position value */
487 UINT wXmax; /* maximum x position value */
488 UINT wYmin; /* minimum y position value */
489 UINT wYmax; /* maximum y position value */
490 UINT wZmin; /* minimum z position value */
491 UINT wZmax; /* maximum z position value */
492 UINT wNumButtons; /* number of buttons */
493 UINT wPeriodMin; /* minimum message period when captured */
494 UINT wPeriodMax; /* maximum message period when captured */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000495} JOYCAPS, *LPJOYCAPS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000496
497typedef struct {
498 UINT wXpos; /* x position */
499 UINT wYpos; /* y position */
500 UINT wZpos; /* z position */
501 UINT wButtons; /* button states */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000502} JOYINFO, *LPJOYINFO;
Alexandre Julliard58199531994-04-21 01:20:00 +0000503
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000504UINT joyGetDevCaps(UINT uJoyID, JOYCAPS * lpCaps, UINT uSize);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000505UINT joyGetNumDevs(void);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000506UINT joyGetPos(UINT uJoyID, JOYINFO * lpInfo);
507UINT joyGetThreshold(UINT uJoyID, UINT * lpuThreshold);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000508UINT joyReleaseCapture(UINT uJoyID);
509UINT joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
Alexandre Julliard58199531994-04-21 01:20:00 +0000510 BOOL bChanged);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000511UINT joySetThreshold(UINT uJoyID, UINT uThreshold);
Alexandre Julliard58199531994-04-21 01:20:00 +0000512
513#define MMIOERR_BASE 256
514#define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
515#define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */
516#define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */
517#define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */
518#define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */
519#define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */
520#define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */
521#define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */
522#define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */
523#define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */
524
525#define CFSEPCHAR '+' /* compound file name separator char. */
526
527typedef DWORD FOURCC; /* a four character code */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000528typedef LONG (*LPMMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
Alexandre Julliard58199531994-04-21 01:20:00 +0000529 LPARAM lParam1, LPARAM lParam2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000530
531typedef struct {
532 DWORD dwFlags; /* general status flags */
533 FOURCC fccIOProc; /* pointer to I/O procedure */
534 LPMMIOPROC pIOProc; /* pointer to I/O procedure */
535 UINT wErrorRet; /* place for error to be returned */
Alexandre Julliardbf9130a1996-10-13 17:45:47 +0000536 HTASK16 htask; /* alternate local task */
Alexandre Julliard58199531994-04-21 01:20:00 +0000537 /* fields maintained by MMIO functions during buffered I/O */
538 LONG cchBuffer; /* size of I/O buffer (or 0L) */
539 HPSTR pchBuffer; /* start of I/O buffer (or NULL) */
540 HPSTR pchNext; /* pointer to next byte to read/write */
541 HPSTR pchEndRead; /* pointer to last valid byte to read */
542 HPSTR pchEndWrite; /* pointer to last byte to write */
543 LONG lBufOffset; /* disk offset of start of buffer */
544 /* fields maintained by I/O procedure */
545 LONG lDiskOffset; /* disk offset of next read or write */
546 DWORD adwInfo[3]; /* data specific to type of MMIOPROC */
547 /* other fields maintained by MMIO */
548 DWORD dwReserved1; /* reserved for MMIO use */
549 DWORD dwReserved2; /* reserved for MMIO use */
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000550 HMMIO16 hmmio; /* handle to open file */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000551} MMIOINFO, *LPMMIOINFO;
Alexandre Julliard58199531994-04-21 01:20:00 +0000552
553typedef struct _MMCKINFO
554{
555 FOURCC ckid; /* chunk ID */
556 DWORD cksize; /* chunk size */
557 FOURCC fccType; /* form type or list type */
558 DWORD dwDataOffset; /* offset of data portion of chunk */
559 DWORD dwFlags; /* flags used by MMIO functions */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000560} MMCKINFO, *LPMMCKINFO;
Alexandre Julliard58199531994-04-21 01:20:00 +0000561
562#define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */
563#define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */
564
565#define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */
566#define MMIO_PARSE 0x00000100 /* parse new file returning path */
567#define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */
568#define MMIO_EXIST 0x00004000 /* checks for existence of file */
569#define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */
570#define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */
571
572#define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */
573
574#define MMIO_READ 0x00000000 /* open file for reading only */
575#define MMIO_WRITE 0x00000001 /* open file for writing only */
576#define MMIO_READWRITE 0x00000002 /* open file for reading and writing */
577
578#define MMIO_COMPAT 0x00000000 /* compatibility mode */
579#define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */
580#define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */
581#define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */
582#define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */
583
584#define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */
585#define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */
586#define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */
587#define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */
588#define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */
589#define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */
590#define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */
591#define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */
592#define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */
593#define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */
594#define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */
595#define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */
596
Alexandre Julliard7e50df31994-08-06 11:22:41 +0000597#define SEEK_SET 0
598#define SEEK_CUR 1
599#define SEEK_END 2
600
Alexandre Julliard58199531994-04-21 01:20:00 +0000601#define MMIOM_READ MMIO_READ /* read */
602#define MMIOM_WRITE MMIO_WRITE /* write */
603#define MMIOM_SEEK 2 /* seek to a new position in file */
604#define MMIOM_OPEN 3 /* open file */
605#define MMIOM_CLOSE 4 /* close file */
606#define MMIOM_WRITEFLUSH 5 /* write and flush */
607
608#define MMIOM_RENAME 6 /* rename specified file */
609
610#define MMIOM_USER 0x8000 /* beginning of user-defined messages */
611
612#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
613#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
614
615#define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ')
616#define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ')
617
618#define MMIO_DEFAULTBUFFER 8192 /* default buffer size */
619
620#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
621 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
622 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
623
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000624FOURCC mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
625LPMMIOPROC mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
Alexandre Julliard58199531994-04-21 01:20:00 +0000626 DWORD dwFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000627HMMIO16 mmioOpen(LPSTR szFileName, MMIOINFO * lpmmioinfo,
Alexandre Julliard58199531994-04-21 01:20:00 +0000628 DWORD dwOpenFlags);
629
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000630UINT mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000631 MMIOINFO * lpmmioinfo, DWORD dwRenameFlags);
Alexandre Julliard58199531994-04-21 01:20:00 +0000632
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000633UINT mmioClose(HMMIO16 hmmio, UINT uFlags);
634LONG mmioRead(HMMIO16 hmmio, HPSTR pch, LONG cch);
635LONG mmioWrite(HMMIO16 hmmio, HPCSTR pch, LONG cch);
636LONG mmioSeek(HMMIO16 hmmio, LONG lOffset, int iOrigin);
637UINT mmioGetInfo(HMMIO16 hmmio, MMIOINFO * lpmmioinfo, UINT uFlags);
638UINT mmioSetInfo(HMMIO16 hmmio, const MMIOINFO * lpmmioinfo, UINT uFlags);
639UINT mmioSetBuffer(HMMIO16 hmmio, LPSTR pchBuffer, LONG cchBuffer,
Alexandre Julliard58199531994-04-21 01:20:00 +0000640 UINT uFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000641UINT mmioFlush(HMMIO16 hmmio, UINT uFlags);
642UINT mmioAdvance(HMMIO16 hmmio, MMIOINFO * lpmmioinfo, UINT uFlags);
643LONG mmioSendMessage(HMMIO16 hmmio, UINT uMessage,
Alexandre Julliard58199531994-04-21 01:20:00 +0000644 LPARAM lParam1, LPARAM lParam2);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000645UINT mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000646 const MMCKINFO * lpckParent, UINT uFlags);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000647UINT mmioAscend(HMMIO16 hmmio, MMCKINFO * lpck, UINT uFlags);
648UINT mmioCreateChunk(HMMIO16 hmmio, MMCKINFO * lpck, UINT uFlags);
Alexandre Julliard58199531994-04-21 01:20:00 +0000649
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000650typedef UINT (*YIELDPROC) (UINT uDeviceID, DWORD dwYieldData);
Alexandre Julliard58199531994-04-21 01:20:00 +0000651
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000652DWORD mciSendCommand (UINT uDeviceID, UINT uMessage,
Alexandre Julliard58199531994-04-21 01:20:00 +0000653 DWORD dwParam1, DWORD dwParam2);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000654DWORD mciSendString (LPCSTR lpstrCommand,
Alexandre Julliard58199531994-04-21 01:20:00 +0000655 LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000656UINT mciGetDeviceID (LPCSTR lpstrName);
657UINT mciGetDeviceIDFromElementID (DWORD dwElementID,
Alexandre Julliard58199531994-04-21 01:20:00 +0000658 LPCSTR lpstrType);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000659BOOL mciGetErrorString (DWORD wError, LPSTR lpstrBuffer,
Alexandre Julliard58199531994-04-21 01:20:00 +0000660 UINT uLength);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +0000661BOOL mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc,
Alexandre Julliard58199531994-04-21 01:20:00 +0000662 DWORD dwYieldData);
663
Alexandre Julliardbf9130a1996-10-13 17:45:47 +0000664HTASK16 mciGetCreatorTask(UINT uDeviceID);
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000665YIELDPROC mciGetYieldProc (UINT uDeviceID, DWORD * lpdwYieldData);
Alexandre Julliard58199531994-04-21 01:20:00 +0000666
667#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
668#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)
669#define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5)
670#define MCIERR_HARDWARE (MCIERR_BASE + 6)
671#define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7)
672#define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8)
673#define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9)
674#define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10)
675#define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11)
676#define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12)
677#define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13)
678#define MCIERR_BAD_INTEGER (MCIERR_BASE + 14)
679#define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15)
680#define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16)
681#define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17)
682#define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18)
683#define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19)
684#define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20)
685#define MCIERR_INTERNAL (MCIERR_BASE + 21)
686#define MCIERR_DRIVER (MCIERR_BASE + 22)
687#define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23)
688#define MCIERR_MULTIPLE (MCIERR_BASE + 24)
689#define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25)
690#define MCIERR_OUTOFRANGE (MCIERR_BASE + 26)
691#define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28)
692#define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30)
693#define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31)
694#define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32)
695#define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33)
696#define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34)
697#define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35)
698#define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36)
699#define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37)
700#define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38)
701#define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39)
702#define MCIERR_INVALID_FILE (MCIERR_BASE + 40)
703#define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41)
704#define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42)
705#define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43)
706#define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44)
707#define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45)
708#define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46)
709#define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47)
710#define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48)
711#define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49)
712#define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50)
713#define MCIERR_GET_CD (MCIERR_BASE + 51)
714#define MCIERR_SET_CD (MCIERR_BASE + 52)
715#define MCIERR_SET_DRIVE (MCIERR_BASE + 53)
716#define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54)
717#define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55)
718#define MCIERR_NO_INTEGER (MCIERR_BASE + 56)
719
720#define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64)
721#define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65)
722#define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66)
723#define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67)
724#define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68)
725#define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69)
726#define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70)
727#define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
728#define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72)
729#define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73)
730
731#define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80)
732#define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81)
733#define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82)
734#define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83)
735#define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84)
736#define MCIERR_SEQ_TIMER (MCIERR_BASE + 85)
737#define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86)
738#define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87)
739
740#define MCIERR_NO_WINDOW (MCIERR_BASE + 90)
741#define MCIERR_CREATEWINDOW (MCIERR_BASE + 91)
742#define MCIERR_FILE_READ (MCIERR_BASE + 92)
743#define MCIERR_FILE_WRITE (MCIERR_BASE + 93)
744
745#define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256)
746
Alexandre Julliard6b81b391994-07-07 16:23:58 +0000747#define MCI_OPEN_DRIVER 0x0801
748#define MCI_CLOSE_DRIVER 0x0802
749#define MCI_OPEN 0x0803
750#define MCI_CLOSE 0x0804
Alexandre Julliard58199531994-04-21 01:20:00 +0000751#define MCI_ESCAPE 0x0805
752#define MCI_PLAY 0x0806
753#define MCI_SEEK 0x0807
754#define MCI_STOP 0x0808
755#define MCI_PAUSE 0x0809
756#define MCI_INFO 0x080A
757#define MCI_GETDEVCAPS 0x080B
758#define MCI_SPIN 0x080C
759#define MCI_SET 0x080D
760#define MCI_STEP 0x080E
761#define MCI_RECORD 0x080F
762#define MCI_SYSINFO 0x0810
763#define MCI_BREAK 0x0811
764#define MCI_SOUND 0x0812
765#define MCI_SAVE 0x0813
766#define MCI_STATUS 0x0814
767#define MCI_CUE 0x0830
768#define MCI_REALIZE 0x0840
769#define MCI_WINDOW 0x0841
770#define MCI_PUT 0x0842
771#define MCI_WHERE 0x0843
772#define MCI_FREEZE 0x0844
773#define MCI_UNFREEZE 0x0845
774#define MCI_LOAD 0x0850
775#define MCI_CUT 0x0851
776#define MCI_COPY 0x0852
777#define MCI_PASTE 0x0853
778#define MCI_UPDATE 0x0854
779#define MCI_RESUME 0x0855
780#define MCI_DELETE 0x0856
781
782#define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST)
783
784#define MCI_ALL_DEVICE_ID 0xFFFF
785
786#define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1)
787#define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2)
788#define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3)
789#define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4)
790#define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5)
791#define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6)
792#define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7)
793#define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8)
794#define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9)
795#define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10)
796#define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11)
797
798#define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR
799#define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER
800
801#define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12)
802#define MCI_MODE_STOP (MCI_STRING_OFFSET + 13)
803#define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14)
804#define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15)
805#define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16)
806#define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17)
807#define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18)
808
809#define MCI_FORMAT_MILLISECONDS 0
810#define MCI_FORMAT_HMS 1
811#define MCI_FORMAT_MSF 2
812#define MCI_FORMAT_FRAMES 3
813#define MCI_FORMAT_SMPTE_24 4
814#define MCI_FORMAT_SMPTE_25 5
815#define MCI_FORMAT_SMPTE_30 6
816#define MCI_FORMAT_SMPTE_30DROP 7
817#define MCI_FORMAT_BYTES 8
818#define MCI_FORMAT_SAMPLES 9
819#define MCI_FORMAT_TMSF 10
820
821#define MCI_MSF_MINUTE(msf) ((BYTE)(msf))
822#define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
823#define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16))
824
825#define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
826 ((WORD)(s)<<8)) | \
827 (((DWORD)(BYTE)(f))<<16)))
828
829#define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf))
830#define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8))
831#define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16))
832#define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24))
833
834#define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \
835 ((WORD)(m)<<8)) | \
836 (((DWORD)(BYTE)(s) | \
837 ((WORD)(f)<<8))<<16)))
838
839#define MCI_HMS_HOUR(hms) ((BYTE)(hms))
840#define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8))
841#define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16))
842
843#define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \
844 ((WORD)(m)<<8)) | \
845 (((DWORD)(BYTE)(s))<<16)))
846
847#define MCI_NOTIFY_SUCCESSFUL 0x0001
848#define MCI_NOTIFY_SUPERSEDED 0x0002
849#define MCI_NOTIFY_ABORTED 0x0004
850#define MCI_NOTIFY_FAILURE 0x0008
851
852#define MCI_NOTIFY 0x00000001L
853#define MCI_WAIT 0x00000002L
854#define MCI_FROM 0x00000004L
855#define MCI_TO 0x00000008L
856#define MCI_TRACK 0x00000010L
857
858#define MCI_OPEN_SHAREABLE 0x00000100L
859#define MCI_OPEN_ELEMENT 0x00000200L
860#define MCI_OPEN_ALIAS 0x00000400L
861#define MCI_OPEN_ELEMENT_ID 0x00000800L
862#define MCI_OPEN_TYPE_ID 0x00001000L
863#define MCI_OPEN_TYPE 0x00002000L
864
865#define MCI_SEEK_TO_START 0x00000100L
866#define MCI_SEEK_TO_END 0x00000200L
867
868#define MCI_STATUS_ITEM 0x00000100L
869#define MCI_STATUS_START 0x00000200L
870
871#define MCI_STATUS_LENGTH 0x00000001L
872#define MCI_STATUS_POSITION 0x00000002L
873#define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L
874#define MCI_STATUS_MODE 0x00000004L
875#define MCI_STATUS_MEDIA_PRESENT 0x00000005L
876#define MCI_STATUS_TIME_FORMAT 0x00000006L
877#define MCI_STATUS_READY 0x00000007L
878#define MCI_STATUS_CURRENT_TRACK 0x00000008L
879
880#define MCI_INFO_PRODUCT 0x00000100L
881#define MCI_INFO_FILE 0x00000200L
882
883#define MCI_GETDEVCAPS_ITEM 0x00000100L
884
885#define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L
886#define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L
887#define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L
888#define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L
889#define MCI_GETDEVCAPS_USES_FILES 0x00000005L
890#define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L
891#define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L
892#define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L
893#define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L
894
895#define MCI_SYSINFO_QUANTITY 0x00000100L
896#define MCI_SYSINFO_OPEN 0x00000200L
897#define MCI_SYSINFO_NAME 0x00000400L
898#define MCI_SYSINFO_INSTALLNAME 0x00000800L
899
900#define MCI_SET_DOOR_OPEN 0x00000100L
901#define MCI_SET_DOOR_CLOSED 0x00000200L
902#define MCI_SET_TIME_FORMAT 0x00000400L
903#define MCI_SET_AUDIO 0x00000800L
904#define MCI_SET_VIDEO 0x00001000L
905#define MCI_SET_ON 0x00002000L
906#define MCI_SET_OFF 0x00004000L
907
908#define MCI_SET_AUDIO_ALL 0x00000000L
909#define MCI_SET_AUDIO_LEFT 0x00000001L
910#define MCI_SET_AUDIO_RIGHT 0x00000002L
911
912#define MCI_BREAK_KEY 0x00000100L
913#define MCI_BREAK_HWND 0x00000200L
914#define MCI_BREAK_OFF 0x00000400L
915
916#define MCI_RECORD_INSERT 0x00000100L
917#define MCI_RECORD_OVERWRITE 0x00000200L
918
919#define MCI_SOUND_NAME 0x00000100L
920
921#define MCI_SAVE_FILE 0x00000100L
922
923#define MCI_LOAD_FILE 0x00000100L
924
925typedef struct {
926 DWORD dwCallback;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000927} MCI_GENERIC_PARMS, *LPMCI_GENERIC_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000928
929typedef struct {
930 DWORD dwCallback;
931 UINT wDeviceID;
932 UINT wReserved0;
933 LPCSTR lpstrDeviceType;
934 LPCSTR lpstrElementName;
935 LPCSTR lpstrAlias;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000936} MCI_OPEN_PARMS, *LPMCI_OPEN_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000937
938typedef struct {
939 DWORD dwCallback;
940 DWORD dwFrom;
941 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000942} MCI_PLAY_PARMS, *LPMCI_PLAY_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000943
944typedef struct {
945 DWORD dwCallback;
946 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000947} MCI_SEEK_PARMS, *LPMCI_SEEK_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000948
949typedef struct {
950 DWORD dwCallback;
951 DWORD dwReturn;
952 DWORD dwItem;
953 DWORD dwTrack;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000954} MCI_STATUS_PARMS, *LPMCI_STATUS_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000955
956typedef struct {
957 DWORD dwCallback;
958 LPSTR lpstrReturn;
959 DWORD dwRetSize;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000960} MCI_INFO_PARMS, *LPMCI_INFO_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000961
962typedef struct {
963 DWORD dwCallback;
964 DWORD dwReturn;
965 DWORD dwItem;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000966} MCI_GETDEVCAPS_PARMS, *LPMCI_GETDEVCAPS_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000967
968typedef struct {
969 DWORD dwCallback;
970 LPSTR lpstrReturn;
971 DWORD dwRetSize;
972 DWORD dwNumber;
973 UINT wDeviceType;
974 UINT wReserved0;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000975} MCI_SYSINFO_PARMS, *LPMCI_SYSINFO_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000976
977typedef struct {
978 DWORD dwCallback;
979 DWORD dwTimeFormat;
980 DWORD dwAudio;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000981} MCI_SET_PARMS, *LPMCI_SET_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000982
983typedef struct {
984 DWORD dwCallback;
985 int nVirtKey;
986 UINT wReserved0;
987 HWND hwndBreak;
988 UINT wReserved1;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000989} MCI_BREAK_PARMS, *LPMCI_BREAK_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000990
991typedef struct {
992 DWORD dwCallback;
993 LPCSTR lpstrSoundName;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000994} MCI_SOUND_PARMS, *LPMCI_SOUND_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +0000995
996typedef struct {
997 DWORD dwCallback;
998 LPCSTR lpfilename;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000999} MCI_SAVE_PARMS, *LPMCI_SAVE_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001000
1001typedef struct {
1002 DWORD dwCallback;
1003 LPCSTR lpfilename;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001004} MCI_LOAD_PARMS, *LPMCI_LOAD_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001005
1006typedef struct {
1007 DWORD dwCallback;
1008 DWORD dwFrom;
1009 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001010} MCI_RECORD_PARMS, *LPMCI_RECORD_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001011
1012#define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1)
1013
1014#define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2)
1015#define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3)
1016#define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4)
1017
1018#define MCI_VD_FORMAT_TRACK 0x4001
1019
1020#define MCI_VD_PLAY_REVERSE 0x00010000L
1021#define MCI_VD_PLAY_FAST 0x00020000L
1022#define MCI_VD_PLAY_SPEED 0x00040000L
1023#define MCI_VD_PLAY_SCAN 0x00080000L
1024#define MCI_VD_PLAY_SLOW 0x00100000L
1025
1026#define MCI_VD_SEEK_REVERSE 0x00010000L
1027
1028#define MCI_VD_STATUS_SPEED 0x00004002L
1029#define MCI_VD_STATUS_FORWARD 0x00004003L
1030#define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L
1031#define MCI_VD_STATUS_SIDE 0x00004005L
1032#define MCI_VD_STATUS_DISC_SIZE 0x00004006L
1033
1034#define MCI_VD_GETDEVCAPS_CLV 0x00010000L
1035#define MCI_VD_GETDEVCAPS_CAV 0x00020000L
1036
1037#define MCI_VD_SPIN_UP 0x00010000L
1038#define MCI_VD_SPIN_DOWN 0x00020000L
1039
1040#define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L
1041#define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L
1042#define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L
1043#define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L
1044
1045#define MCI_VD_STEP_FRAMES 0x00010000L
1046#define MCI_VD_STEP_REVERSE 0x00020000L
1047
1048#define MCI_VD_ESCAPE_STRING 0x00000100L
1049
1050typedef struct {
1051 DWORD dwCallback;
1052 DWORD dwFrom;
1053 DWORD dwTo;
1054 DWORD dwSpeed;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001055} MCI_VD_PLAY_PARMS, *LPMCI_VD_PLAY_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001056
1057typedef struct {
1058 DWORD dwCallback;
1059 DWORD dwFrames;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001060} MCI_VD_STEP_PARMS, *LPMCI_VD_STEP_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001061
1062typedef struct {
1063 DWORD dwCallback;
1064 LPCSTR lpstrCommand;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001065} MCI_VD_ESCAPE_PARMS, *LPMCI_VD_ESCAPE_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001066
1067#define MCI_WAVE_OPEN_BUFFER 0x00010000L
1068
1069#define MCI_WAVE_SET_FORMATTAG 0x00010000L
1070#define MCI_WAVE_SET_CHANNELS 0x00020000L
1071#define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L
1072#define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L
1073#define MCI_WAVE_SET_BLOCKALIGN 0x00100000L
1074#define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L
1075
1076#define MCI_WAVE_INPUT 0x00400000L
1077#define MCI_WAVE_OUTPUT 0x00800000L
1078
1079#define MCI_WAVE_STATUS_FORMATTAG 0x00004001L
1080#define MCI_WAVE_STATUS_CHANNELS 0x00004002L
1081#define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L
1082#define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L
1083#define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L
1084#define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L
1085#define MCI_WAVE_STATUS_LEVEL 0x00004007L
1086
1087#define MCI_WAVE_SET_ANYINPUT 0x04000000L
1088#define MCI_WAVE_SET_ANYOUTPUT 0x08000000L
1089
1090#define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L
1091#define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L
1092
1093typedef struct {
1094 DWORD dwCallback;
1095 UINT wDeviceID;
1096 UINT wReserved0;
1097 LPCSTR lpstrDeviceType;
1098 LPCSTR lpstrElementName;
1099 LPCSTR lpstrAlias;
1100 DWORD dwBufferSeconds;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001101} MCI_WAVE_OPEN_PARMS, *LPMCI_WAVE_OPEN_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001102
1103typedef struct {
1104 DWORD dwCallback;
1105 DWORD dwFrom;
1106 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001107} MCI_WAVE_DELETE_PARMS, *LPMCI_WAVE_DELETE_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001108
1109typedef struct {
1110 DWORD dwCallback;
1111 DWORD dwTimeFormat;
1112 DWORD dwAudio;
1113 UINT wInput;
1114 UINT wReserved0;
1115 UINT wOutput;
1116 UINT wReserved1;
1117 UINT wFormatTag;
1118 UINT wReserved2;
1119 UINT nChannels;
1120 UINT wReserved3;
1121 DWORD nSamplesPerSec;
1122 DWORD nAvgBytesPerSec;
1123 UINT nBlockAlign;
1124 UINT wReserved4;
1125 UINT wBitsPerSample;
1126 UINT wReserved5;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001127} MCI_WAVE_SET_PARMS, * LPMCI_WAVE_SET_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001128
1129#define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET)
1130#define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET)
1131#define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET)
1132#define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET)
1133#define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET)
1134
1135#define MCI_SEQ_FORMAT_SONGPTR 0x4001
1136#define MCI_SEQ_FILE 0x4002
1137#define MCI_SEQ_MIDI 0x4003
1138#define MCI_SEQ_SMPTE 0x4004
1139#define MCI_SEQ_NONE 65533
1140
1141#define MCI_SEQ_STATUS_TEMPO 0x00004002L
1142#define MCI_SEQ_STATUS_PORT 0x00004003L
1143#define MCI_SEQ_STATUS_SLAVE 0x00004007L
1144#define MCI_SEQ_STATUS_MASTER 0x00004008L
1145#define MCI_SEQ_STATUS_OFFSET 0x00004009L
1146#define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL
1147
1148#define MCI_SEQ_SET_TEMPO 0x00010000L
1149#define MCI_SEQ_SET_PORT 0x00020000L
1150#define MCI_SEQ_SET_SLAVE 0x00040000L
1151#define MCI_SEQ_SET_MASTER 0x00080000L
1152#define MCI_SEQ_SET_OFFSET 0x01000000L
1153
1154typedef struct {
1155 DWORD dwCallback;
1156 DWORD dwTimeFormat;
1157 DWORD dwAudio;
1158 DWORD dwTempo;
1159 DWORD dwPort;
1160 DWORD dwSlave;
1161 DWORD dwMaster;
1162 DWORD dwOffset;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001163} MCI_SEQ_SET_PARMS, *LPMCI_SEQ_SET_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001164
1165#define MCI_ANIM_OPEN_WS 0x00010000L
1166#define MCI_ANIM_OPEN_PARENT 0x00020000L
1167#define MCI_ANIM_OPEN_NOSTATIC 0x00040000L
1168
1169#define MCI_ANIM_PLAY_SPEED 0x00010000L
1170#define MCI_ANIM_PLAY_REVERSE 0x00020000L
1171#define MCI_ANIM_PLAY_FAST 0x00040000L
1172#define MCI_ANIM_PLAY_SLOW 0x00080000L
1173#define MCI_ANIM_PLAY_SCAN 0x00100000L
1174
1175#define MCI_ANIM_STEP_REVERSE 0x00010000L
1176#define MCI_ANIM_STEP_FRAMES 0x00020000L
1177
1178#define MCI_ANIM_STATUS_SPEED 0x00004001L
1179#define MCI_ANIM_STATUS_FORWARD 0x00004002L
1180#define MCI_ANIM_STATUS_HWND 0x00004003L
1181#define MCI_ANIM_STATUS_HPAL 0x00004004L
1182#define MCI_ANIM_STATUS_STRETCH 0x00004005L
1183
1184#define MCI_ANIM_INFO_TEXT 0x00010000L
1185
1186#define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
1187#define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L
1188#define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L
1189#define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
1190#define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L
1191#define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
1192#define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
1193
1194#define MCI_ANIM_REALIZE_NORM 0x00010000L
1195#define MCI_ANIM_REALIZE_BKGD 0x00020000L
1196
1197#define MCI_ANIM_WINDOW_HWND 0x00010000L
1198#define MCI_ANIM_WINDOW_STATE 0x00040000L
1199#define MCI_ANIM_WINDOW_TEXT 0x00080000L
1200#define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L
1201#define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
1202
1203#define MCI_ANIM_WINDOW_DEFAULT 0x00000000L
1204
1205#define MCI_ANIM_RECT 0x00010000L
1206#define MCI_ANIM_PUT_SOURCE 0x00020000L
1207#define MCI_ANIM_PUT_DESTINATION 0x00040000L
1208
1209#define MCI_ANIM_WHERE_SOURCE 0x00020000L
1210#define MCI_ANIM_WHERE_DESTINATION 0x00040000L
1211
1212#define MCI_ANIM_UPDATE_HDC 0x00020000L
1213
1214typedef struct {
1215 DWORD dwCallback;
1216 UINT wDeviceID;
1217 UINT wReserved0;
1218 LPCSTR lpstrDeviceType;
1219 LPCSTR lpstrElementName;
1220 LPCSTR lpstrAlias;
1221 DWORD dwStyle;
1222 HWND hWndParent;
1223 UINT wReserved1;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001224} MCI_ANIM_OPEN_PARMS, *LPMCI_ANIM_OPEN_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001225
1226typedef struct {
1227 DWORD dwCallback;
1228 DWORD dwFrom;
1229 DWORD dwTo;
1230 DWORD dwSpeed;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001231} MCI_ANIM_PLAY_PARMS, *LPMCI_ANIM_PLAY_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001232
1233typedef struct {
1234 DWORD dwCallback;
1235 DWORD dwFrames;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001236} MCI_ANIM_STEP_PARMS, *LPMCI_ANIM_STEP_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001237
1238typedef struct {
1239 DWORD dwCallback;
1240 HWND hWnd;
1241 UINT wReserved1;
1242 UINT nCmdShow;
1243 UINT wReserved2;
1244 LPCSTR lpstrText;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001245} MCI_ANIM_WINDOW_PARMS, *LPMCI_ANIM_WINDOW_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001246
1247typedef struct {
1248 DWORD dwCallback;
1249#ifdef MCI_USE_OFFEXT
Alexandre Julliarde2bfa4c1996-05-16 18:21:06 +00001250 POINT16 ptOffset;
1251 POINT16 ptExtent;
Alexandre Julliard58199531994-04-21 01:20:00 +00001252#else /* ifdef MCI_USE_OFFEXT */
Alexandre Julliarde2bfa4c1996-05-16 18:21:06 +00001253 RECT16 rc;
Alexandre Julliard58199531994-04-21 01:20:00 +00001254#endif /* ifdef MCI_USE_OFFEXT */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001255} MCI_ANIM_RECT_PARMS, *LPMCI_ANIM_RECT_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001256
1257typedef struct {
1258 DWORD dwCallback;
Alexandre Julliarde2bfa4c1996-05-16 18:21:06 +00001259 RECT16 rc;
Alexandre Julliard530ee841996-10-23 16:59:13 +00001260 HDC16 hDC;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001261} MCI_ANIM_UPDATE_PARMS, *LPMCI_ANIM_UPDATE_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001262
1263#define MCI_OVLY_OPEN_WS 0x00010000L
1264#define MCI_OVLY_OPEN_PARENT 0x00020000L
1265
1266#define MCI_OVLY_STATUS_HWND 0x00004001L
1267#define MCI_OVLY_STATUS_STRETCH 0x00004002L
1268
1269#define MCI_OVLY_INFO_TEXT 0x00010000L
1270
1271#define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
1272#define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L
1273#define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
1274
1275#define MCI_OVLY_WINDOW_HWND 0x00010000L
1276#define MCI_OVLY_WINDOW_STATE 0x00040000L
1277#define MCI_OVLY_WINDOW_TEXT 0x00080000L
1278#define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L
1279#define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
1280
1281#define MCI_OVLY_WINDOW_DEFAULT 0x00000000L
1282
1283#define MCI_OVLY_RECT 0x00010000L
1284#define MCI_OVLY_PUT_SOURCE 0x00020000L
1285#define MCI_OVLY_PUT_DESTINATION 0x00040000L
1286#define MCI_OVLY_PUT_FRAME 0x00080000L
1287#define MCI_OVLY_PUT_VIDEO 0x00100000L
1288
1289#define MCI_OVLY_WHERE_SOURCE 0x00020000L
1290#define MCI_OVLY_WHERE_DESTINATION 0x00040000L
1291#define MCI_OVLY_WHERE_FRAME 0x00080000L
1292#define MCI_OVLY_WHERE_VIDEO 0x00100000L
1293
1294typedef struct {
1295 DWORD dwCallback;
1296 UINT wDeviceID;
1297 UINT wReserved0;
1298 LPCSTR lpstrDeviceType;
1299 LPCSTR lpstrElementName;
1300 LPCSTR lpstrAlias;
1301 DWORD dwStyle;
1302 HWND hWndParent;
1303 UINT wReserved1;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001304} MCI_OVLY_OPEN_PARMS, *LPMCI_OVLY_OPEN_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001305
1306typedef struct {
1307 DWORD dwCallback;
1308 HWND hWnd;
1309 UINT wReserved1;
1310 UINT nCmdShow;
1311 UINT wReserved2;
1312 LPCSTR lpstrText;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001313} MCI_OVLY_WINDOW_PARMS, *LPMCI_OVLY_WINDOW_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001314
1315typedef struct {
1316 DWORD dwCallback;
1317#ifdef MCI_USE_OFFEXT
Alexandre Julliarde2bfa4c1996-05-16 18:21:06 +00001318 POINT16 ptOffset;
1319 POINT16 ptExtent;
Alexandre Julliard58199531994-04-21 01:20:00 +00001320#else /* ifdef MCI_USE_OFFEXT */
Alexandre Julliarde2bfa4c1996-05-16 18:21:06 +00001321 RECT16 rc;
Alexandre Julliard58199531994-04-21 01:20:00 +00001322#endif /* ifdef MCI_USE_OFFEXT */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001323} MCI_OVLY_RECT_PARMS, *LPMCI_OVLY_RECT_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001324
1325typedef struct {
1326 DWORD dwCallback;
1327 LPCSTR lpfilename;
Alexandre Julliarde2bfa4c1996-05-16 18:21:06 +00001328 RECT16 rc;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001329} MCI_OVLY_SAVE_PARMS, *LPMCI_OVLY_SAVE_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001330
1331typedef struct {
1332 DWORD dwCallback;
1333 LPCSTR lpfilename;
Alexandre Julliarde2bfa4c1996-05-16 18:21:06 +00001334 RECT16 rc;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001335} MCI_OVLY_LOAD_PARMS, *LPMCI_OVLY_LOAD_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001336
1337
Alexandre Julliard36ca1361994-06-02 22:38:20 +00001338/**************************************************************
1339 * Linux MMSYSTEM Internals & Sample Audio Drivers
1340 */
1341
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001342#define DRVM_INIT 100
1343#define WODM_INIT DRVM_INIT
1344#define WIDM_INIT DRVM_INIT
1345#define MODM_INIT DRVM_INIT
1346#define MIDM_INIT DRVM_INIT
1347#define AUXM_INIT DRVM_INIT
1348
1349#define WODM_GETNUMDEVS 3
1350#define WODM_GETDEVCAPS 4
1351#define WODM_OPEN 5
1352#define WODM_CLOSE 6
1353#define WODM_PREPARE 7
1354#define WODM_UNPREPARE 8
1355#define WODM_WRITE 9
1356#define WODM_PAUSE 10
1357#define WODM_RESTART 11
1358#define WODM_RESET 12
1359#define WODM_GETPOS 13
1360#define WODM_GETPITCH 14
1361#define WODM_SETPITCH 15
1362#define WODM_GETVOLUME 16
1363#define WODM_SETVOLUME 17
1364#define WODM_GETPLAYBACKRATE 18
1365#define WODM_SETPLAYBACKRATE 19
1366#define WODM_BREAKLOOP 20
1367
1368#define WIDM_GETNUMDEVS 50
1369#define WIDM_GETDEVCAPS 51
1370#define WIDM_OPEN 52
1371#define WIDM_CLOSE 53
1372#define WIDM_PREPARE 54
1373#define WIDM_UNPREPARE 55
1374#define WIDM_ADDBUFFER 56
1375#define WIDM_START 57
1376#define WIDM_STOP 58
1377#define WIDM_RESET 59
1378#define WIDM_GETPOS 60
1379
1380#define MODM_GETNUMDEVS 1
1381#define MODM_GETDEVCAPS 2
1382#define MODM_OPEN 3
1383#define MODM_CLOSE 4
1384#define MODM_PREPARE 5
1385#define MODM_UNPREPARE 6
1386#define MODM_DATA 7
1387#define MODM_LONGDATA 8
1388#define MODM_RESET 9
1389#define MODM_GETVOLUME 10
1390#define MODM_SETVOLUME 11
1391#define MODM_CACHEPATCHES 12
1392#define MODM_CACHEDRUMPATCHES 13
1393
1394#define MIDM_GETNUMDEVS 53
1395#define MIDM_GETDEVCAPS 54
1396#define MIDM_OPEN 55
1397#define MIDM_CLOSE 56
1398#define MIDM_PREPARE 57
1399#define MIDM_UNPREPARE 58
1400#define MIDM_ADDBUFFER 59
1401#define MIDM_START 60
1402#define MIDM_STOP 61
1403#define MIDM_RESET 62
1404
1405#define AUXDM_GETNUMDEVS 3
1406#define AUXDM_GETDEVCAPS 4
1407#define AUXDM_GETVOLUME 5
1408#define AUXDM_SETVOLUME 6
1409
1410#define MCI_MAX_DEVICE_TYPE_LENGTH 80
1411
1412#define MCI_FALSE (MCI_STRING_OFFSET + 19)
1413#define MCI_TRUE (MCI_STRING_OFFSET + 20)
1414
1415#define MCI_FORMAT_RETURN_BASE MCI_FORMAT_MILLISECONDS_S
1416#define MCI_FORMAT_MILLISECONDS_S (MCI_STRING_OFFSET + 21)
1417#define MCI_FORMAT_HMS_S (MCI_STRING_OFFSET + 22)
1418#define MCI_FORMAT_MSF_S (MCI_STRING_OFFSET + 23)
1419#define MCI_FORMAT_FRAMES_S (MCI_STRING_OFFSET + 24)
1420#define MCI_FORMAT_SMPTE_24_S (MCI_STRING_OFFSET + 25)
1421#define MCI_FORMAT_SMPTE_25_S (MCI_STRING_OFFSET + 26)
1422#define MCI_FORMAT_SMPTE_30_S (MCI_STRING_OFFSET + 27)
1423#define MCI_FORMAT_SMPTE_30DROP_S (MCI_STRING_OFFSET + 28)
1424#define MCI_FORMAT_BYTES_S (MCI_STRING_OFFSET + 29)
1425#define MCI_FORMAT_SAMPLES_S (MCI_STRING_OFFSET + 30)
1426#define MCI_FORMAT_TMSF_S (MCI_STRING_OFFSET + 31)
1427
1428#define MCI_VD_FORMAT_TRACK_S (MCI_VD_OFFSET + 5)
1429
1430#define WAVE_FORMAT_PCM_S (MCI_WAVE_OFFSET + 0)
1431#define WAVE_MAPPER_S (MCI_WAVE_OFFSET + 1)
1432
1433#define MCI_SEQ_MAPPER_S (MCI_SEQ_OFFSET + 5)
1434#define MCI_SEQ_FILE_S (MCI_SEQ_OFFSET + 6)
1435#define MCI_SEQ_MIDI_S (MCI_SEQ_OFFSET + 7)
1436#define MCI_SEQ_SMPTE_S (MCI_SEQ_OFFSET + 8)
1437#define MCI_SEQ_FORMAT_SONGPTR_S (MCI_SEQ_OFFSET + 9)
1438#define MCI_SEQ_NONE_S (MCI_SEQ_OFFSET + 10)
1439#define MIDIMAPPER_S (MCI_SEQ_OFFSET + 11)
1440
1441#define MCI_RESOURCE_RETURNED 0x00010000 /* resource ID */
1442#define MCI_COLONIZED3_RETURN 0x00020000 /* colonized ID, 3 bytes data */
1443#define MCI_COLONIZED4_RETURN 0x00040000 /* colonized ID, 4 bytes data */
1444#define MCI_INTEGER_RETURNED 0x00080000 /* integer conversion needed */
1445#define MCI_RESOURCE_DRIVER 0x00100000 /* driver owns returned resource */
1446
1447#define MCI_NO_COMMAND_TABLE 0xFFFF
1448
1449#define MCI_COMMAND_HEAD 0
1450#define MCI_STRING 1
1451#define MCI_INTEGER 2
1452#define MCI_END_COMMAND 3
1453#define MCI_RETURN 4
1454#define MCI_FLAG 5
1455#define MCI_END_COMMAND_LIST 6
1456#define MCI_RECT 7
1457#define MCI_CONSTANT 8
1458#define MCI_END_CONSTANT 9
1459
Alexandre Julliard18f92e71996-07-17 20:02:21 +00001460/* Mixer flags */
1461#define MIXER_OBJECTF_HANDLE 0x80000000L
1462#define MIXER_OBJECTF_MIXER 0x00000000L
1463#define MIXER_OBJECTF_HMIXER (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER)
1464#define MIXER_OBJECTF_WAVEOUT 0x10000000L
1465#define MIXER_OBJECTF_HWAVEOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT)
1466#define MIXER_OBJECTF_WAVEIN 0x20000000L
1467#define MIXER_OBJECTF_HWAVEIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN)
1468#define MIXER_OBJECTF_MIDIOUT 0x30000000L
1469#define MIXER_OBJECTF_HMIDIOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT)
1470#define MIXER_OBJECTF_MIDIIN 0x40000000L
1471#define MIXER_OBJECTF_HMIDIIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN)
1472#define MIXER_OBJECTF_AUX 0x50000000L
1473
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001474#define MAKEMCIRESOURCE(wRet, wRes) MAKELRESULT((wRet), (wRes))
1475
Alexandre Julliard36ca1361994-06-02 22:38:20 +00001476typedef struct {
1477 DWORD dwCallback;
1478 DWORD dwInstance;
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +00001479 HMIDIOUT16 hMidi;
Alexandre Julliard36ca1361994-06-02 22:38:20 +00001480 DWORD dwFlags;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001481} PORTALLOC, *LPPORTALLOC;
Alexandre Julliard36ca1361994-06-02 22:38:20 +00001482
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001483typedef struct {
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +00001484 HWAVE16 hWave;
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001485 LPWAVEFORMAT lpFormat;
1486 DWORD dwCallBack;
1487 DWORD dwInstance;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001488} WAVEOPENDESC, *LPWAVEOPENDESC;
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001489
1490typedef struct {
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +00001491 HMIDI16 hMidi;
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001492 DWORD dwCallback;
1493 DWORD dwInstance;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001494} MIDIOPENDESC, *LPMIDIOPENDESC;
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001495
1496typedef struct {
1497 UINT wDelay;
1498 UINT wResolution;
1499 LPTIMECALLBACK lpFunction;
1500 DWORD dwUser;
1501 UINT wFlags;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001502} TIMEREVENT, *LPTIMEREVENT;
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001503
1504typedef struct {
1505 UINT wDeviceID; /* device ID */
1506 LPSTR lpstrParams; /* parameter string for entry in SYSTEM.INI */
1507 UINT wCustomCommandTable; /* custom command table (0xFFFF if none) */
1508 /* filled in by the driver */
1509 UINT wType; /* driver type */
1510 /* filled in by the driver */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001511} MCI_OPEN_DRIVER_PARMS, * LPMCI_OPEN_DRIVER_PARMS;
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001512
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +00001513DWORD mciGetDriverData(UINT uDeviceID);
1514BOOL mciSetDriverData(UINT uDeviceID, DWORD dwData);
1515UINT mciDriverYield(UINT uDeviceID);
1516BOOL mciDriverNotify(HWND hwndCallback, UINT uDeviceID,
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001517 UINT uStatus);
Alexandre Julliardbf9130a1996-10-13 17:45:47 +00001518UINT mciLoadCommandResource(HINSTANCE16 hInstance,
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001519 LPCSTR lpResName, UINT uType);
Alexandre Julliardbd34d4f1995-06-20 19:08:12 +00001520BOOL mciFreeCommandResource(UINT uTable);
Alexandre Julliard6b81b391994-07-07 16:23:58 +00001521
1522#define DCB_NULL 0x0000
1523#define DCB_WINDOW 0x0001 /* dwCallback is a HWND */
1524#define DCB_TASK 0x0002 /* dwCallback is a HTASK */
1525#define DCB_FUNCTION 0x0003 /* dwCallback is a FARPROC */
1526#define DCB_TYPEMASK 0x0007
1527#define DCB_NOSWITCH 0x0008 /* don't switch stacks for callback */
1528
Alexandre Julliardbf9130a1996-10-13 17:45:47 +00001529BOOL DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE16 hDev,
Alexandre Julliard36ca1361994-06-02 22:38:20 +00001530 WORD wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
1531DWORD auxMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
1532 DWORD dwParam1, DWORD dwParam2);
1533DWORD midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
1534 DWORD dwParam1, DWORD dwParam2);
1535DWORD modMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
1536 DWORD dwParam1, DWORD dwParam2);
1537DWORD widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
1538 DWORD dwParam1, DWORD dwParam2);
1539DWORD wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
1540 DWORD dwParam1, DWORD dwParam2);
1541
Alexandre Julliard58199531994-04-21 01:20:00 +00001542#endif /* MMSYSTEM_H */
1543
1544
Alexandre Julliard36ca1361994-06-02 22:38:20 +00001545