master
  1#undef INTERFACE
  2/* DirectMusic Core API Stuff
  3 *
  4 * Copyright (C) 2003-2004 Rok Mandeljc
  5 *
  6 * This program is free software; you can redistribute it and/or
  7 * modify it under the terms of the GNU Lesser General Public
  8 * License as published by the Free Software Foundation; either
  9 * version 2.1 of the License, or (at your option) any later version.
 10 *
 11 * This program is distributed in the hope that it will be useful,
 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14 * Lesser General Public License for more details.
 15 *
 16 * You should have received a copy of the GNU Lesser General Public
 17 * License along with this program; if not, write to the Free Software
 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 19 */
 20
 21#ifndef __WINE_DMUSIC_CORE_H
 22#define __WINE_DMUSIC_CORE_H
 23
 24#include <windows.h>
 25
 26#define COM_NO_WINDOWS_H
 27#include <objbase.h>
 28#include <mmsystem.h>
 29
 30#include <dls1.h>
 31#include <dmerror.h>
 32#include <dmdls.h>
 33#include <dsound.h>
 34#include <dmusbuff.h>
 35#include <strmif.h>
 36
 37#pragma pack(push,8)
 38
 39#ifdef __cplusplus
 40extern "C" {
 41#endif
 42
 43
 44/*****************************************************************************
 45 * Predeclare the interfaces
 46 */
 47/* CLSIDs */
 48DEFINE_GUID(CLSID_DirectMusic,                    0x636b9f10,0x0c7d,0x11d1,0x95,0xb2,0x00,0x20,0xaf,0xdc,0x74,0x21);
 49DEFINE_GUID(CLSID_DirectMusicCollection,          0x480ff4b0,0x28b2,0x11d1,0xbe,0xf7,0x00,0xc0,0x4f,0xbf,0x8f,0xef);
 50DEFINE_GUID(CLSID_DirectMusicSynth,               0x58c2b4d0,0x46e7,0x11d1,0x89,0xac,0x00,0xa0,0xc9,0x05,0x41,0x29);
 51	
 52/* IIDs */
 53DEFINE_GUID(IID_IDirectMusic,                     0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12);
 54DEFINE_GUID(IID_IDirectMusic2,                    0x6fc2cae1,0xbc78,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
 55DEFINE_GUID(IID_IDirectMusic8,                    0x2d3629f7,0x813d,0x4939,0x85,0x08,0xf0,0x5c,0x6b,0x75,0xfd,0x97);
 56DEFINE_GUID(IID_IDirectMusicBuffer,               0xd2ac2878,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd);
 57DEFINE_GUID(IID_IDirectMusicCollection,           0xd2ac287c,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd);
 58DEFINE_GUID(IID_IDirectMusicDownload,             0xd2ac287b,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd);
 59DEFINE_GUID(IID_IDirectMusicDownloadedInstrument, 0xd2ac287e,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd);
 60DEFINE_GUID(IID_IDirectMusicInstrument,           0xd2ac287d,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd);
 61DEFINE_GUID(IID_IDirectMusicPort,                 0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
 62DEFINE_GUID(IID_IDirectMusicPortDownload,         0xd2ac287a,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd);
 63DEFINE_GUID(IID_IDirectMusicThru,                 0xced153e7,0x3606,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
 64
 65#define IID_IDirectMusicCollection8 IID_IDirectMusicCollection
 66#define IID_IDirectMusicDownload8 IID_IDirectMusicDownload
 67#define IID_IDirectMusicDownloadedInstrument8 IID_IDirectMusicDownloadedInstrument
 68#define IID_IDirectMusicInstrument8 IID_IDirectMusicInstrument
 69#define IID_IDirectMusicPort8 IID_IDirectMusicPort
 70#define IID_IDirectMusicPortDownload8 IID_IDirectMusicPortDownload
 71#define IID_IDirectMusicThru8 IID_IDirectMusicThru
 72
 73/* GUIDs - property set */
 74DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware,           0x178f2f24,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
 75DEFINE_GUID(GUID_DMUS_PROP_GS_Capable,            0x6496aba2,0x61b0,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
 76DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware,           0x178f2f25,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
 77DEFINE_GUID(GUID_DMUS_PROP_DLS1,                  0x178f2f27,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
 78DEFINE_GUID(GUID_DMUS_PROP_DLS2,                  0xf14599e5,0x4689,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
 79DEFINE_GUID(GUID_DMUS_PROP_Effects,               0xcda8d611,0x684a,0x11d2,0x87,0x1e,0x00,0x60,0x08,0x93,0xb1,0xbd);
 80DEFINE_GUID(GUID_DMUS_PROP_INSTRUMENT2,           0x865fd372,0x9f67,0x11d2,0x87,0x2a,0x00,0x60,0x08,0x93,0xb1,0xbd);
 81DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps,            0xcfa7cdc2,0x00a1,0x11d2,0xaa,0xd5,0x00,0x00,0xf8,0x75,0xac,0x12);
 82DEFINE_GUID(GUID_DMUS_PROP_MemorySize,            0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
 83DEFINE_GUID(GUID_DMUS_PROP_SampleMemorySize,      0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
 84DEFINE_GUID(GUID_DMUS_PROP_SamplePlaybackRate,    0x2a91f713,0xa4bf,0x11d2,0xbb,0xdf,0x00,0x60,0x08,0x33,0xdb,0xd8);
 85DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND,      0x0aa97844,0xc877,0x11d1,0x87,0x0c,0x00,0x60,0x08,0x93,0xb1,0xbd);
 86DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE,        0x0aa97845,0xc877,0x11d1,0x87,0x0c,0x00,0x60,0x08,0x93,0xb1,0xbd);
 87DEFINE_GUID(GUID_DMUS_PROP_Volume,                0xfedfae25,0xe46e,0x11d1,0xaa,0xce,0x00,0x00,0xf8,0x75,0xac,0x12);
 88DEFINE_GUID(GUID_DMUS_PROP_WavesReverb,           0x04cb5622,0x32e5,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
 89DEFINE_GUID(GUID_DMUS_PROP_WriteLatency,          0x268a0fa0,0x60f2,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
 90DEFINE_GUID(GUID_DMUS_PROP_WritePeriod,           0x268a0fa1,0x60f2,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
 91DEFINE_GUID(GUID_DMUS_PROP_XG_Capable,            0x6496aba1,0x61b0,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
 92DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware,           0x178f2f26,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);	
 93
 94/* typedef definitions */
 95typedef struct IDirectMusic *LPDIRECTMUSIC;
 96typedef struct IDirectMusic8 *LPDIRECTMUSIC8;
 97typedef struct IDirectMusicBuffer *LPDIRECTMUSICBUFFER;
 98typedef struct IDirectMusicBuffer IDirectMusicBuffer8, *LPDIRECTMUSICBUFFER8;
 99typedef struct IDirectMusicInstrument *LPDIRECTMUSICINSTRUMENT;
100typedef struct IDirectMusicInstrument IDirectMusicInstrument8, *LPDIRECTMUSICINSTRUMENT8;
101typedef struct IDirectMusicDownloadedInstrument *LPDIRECTMUSICDOWNLOADEDINSTRUMENT;
102typedef struct IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument8, *LPDIRECTMUSICDOWNLOADEDINSTRUMENT8;
103typedef struct IDirectMusicCollection *LPDIRECTMUSICCOLLECTION;
104typedef struct IDirectMusicCollection IDirectMusicCollection8, *LPDIRECTMUSICCOLLECTION8;
105typedef struct IDirectMusicDownload *LPDIRECTMUSICDOWNLOAD;
106typedef struct IDirectMusicDownload IDirectMusicDownload8, *LPDIRECTMUSICDOWNLOAD8;
107typedef struct IDirectMusicPortDownload *LPDIRECTMUSICPORTDOWNLOAD;
108typedef struct IDirectMusicPortDownload IDirectMusicPortDownload8, *LPDIRECTMUSICPORTDOWNLOAD8;
109typedef struct IDirectMusicPort *LPDIRECTMUSICPORT;
110typedef struct IDirectMusicPort IDirectMusicPort8, *LPDIRECTMUSICPORT8;
111typedef struct IDirectMusicThru *LPDIRECTMUSICTHRU;
112typedef struct IDirectMusicThru IDirectMusicThru8, *LPDIRECTMUSICTHRU8;
113
114/*****************************************************************************
115 * Typedef definitions
116 */
117typedef ULONGLONG    SAMPLE_TIME, *LPSAMPLE_TIME;
118typedef ULONGLONG    SAMPLE_POSITION, *LPSAMPLE_POSITION;	
119
120
121/*****************************************************************************
122 * Flags
123 */
124#ifndef _DIRECTAUDIO_PRIORITIES_DEFINED_
125#define _DIRECTAUDIO_PRIORITIES_DEFINED_
126
127#define DAUD_CRITICAL_VOICE_PRIORITY 0xF0000000
128#define DAUD_HIGH_VOICE_PRIORITY     0xC0000000
129#define DAUD_STANDARD_VOICE_PRIORITY 0x80000000
130#define DAUD_LOW_VOICE_PRIORITY      0x40000000
131#define DAUD_PERSIST_VOICE_PRIORITY  0x10000000
132
133#define DAUD_CHAN1_VOICE_PRIORITY_OFFSET  0x0000000E
134#define DAUD_CHAN2_VOICE_PRIORITY_OFFSET  0x0000000D
135#define DAUD_CHAN3_VOICE_PRIORITY_OFFSET  0x0000000C
136#define DAUD_CHAN4_VOICE_PRIORITY_OFFSET  0x0000000B
137#define DAUD_CHAN5_VOICE_PRIORITY_OFFSET  0x0000000A
138#define DAUD_CHAN6_VOICE_PRIORITY_OFFSET  0x00000009
139#define DAUD_CHAN7_VOICE_PRIORITY_OFFSET  0x00000008
140#define DAUD_CHAN8_VOICE_PRIORITY_OFFSET  0x00000007
141#define DAUD_CHAN9_VOICE_PRIORITY_OFFSET  0x00000006
142#define DAUD_CHAN10_VOICE_PRIORITY_OFFSET 0x0000000F
143#define DAUD_CHAN11_VOICE_PRIORITY_OFFSET 0x00000005
144#define DAUD_CHAN12_VOICE_PRIORITY_OFFSET 0x00000004
145#define DAUD_CHAN13_VOICE_PRIORITY_OFFSET 0x00000003
146#define DAUD_CHAN14_VOICE_PRIORITY_OFFSET 0x00000002
147#define DAUD_CHAN15_VOICE_PRIORITY_OFFSET 0x00000001
148#define DAUD_CHAN16_VOICE_PRIORITY_OFFSET 0x00000000
149
150#define DAUD_CHAN1_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN1_VOICE_PRIORITY_OFFSET)
151#define DAUD_CHAN2_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN2_VOICE_PRIORITY_OFFSET)
152#define DAUD_CHAN3_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN3_VOICE_PRIORITY_OFFSET)
153#define DAUD_CHAN4_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN4_VOICE_PRIORITY_OFFSET)
154#define DAUD_CHAN5_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN5_VOICE_PRIORITY_OFFSET)
155#define DAUD_CHAN6_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN6_VOICE_PRIORITY_OFFSET)
156#define DAUD_CHAN7_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN7_VOICE_PRIORITY_OFFSET)
157#define DAUD_CHAN8_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN8_VOICE_PRIORITY_OFFSET)
158#define DAUD_CHAN9_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN9_VOICE_PRIORITY_OFFSET)
159#define DAUD_CHAN10_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN10_VOICE_PRIORITY_OFFSET)
160#define DAUD_CHAN11_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN11_VOICE_PRIORITY_OFFSET)
161#define DAUD_CHAN12_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN12_VOICE_PRIORITY_OFFSET)
162#define DAUD_CHAN13_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN13_VOICE_PRIORITY_OFFSET)
163#define DAUD_CHAN14_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN14_VOICE_PRIORITY_OFFSET)
164#define DAUD_CHAN15_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN15_VOICE_PRIORITY_OFFSET)
165#define DAUD_CHAN16_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN16_VOICE_PRIORITY_OFFSET)
166#endif  /* _DIRECTAUDIO_PRIORITIES_DEFINED_ */
167
168#define DMUS_CLOCKF_GLOBAL 0x1
169
170#define DMUS_EFFECT_NONE   0x0
171#define DMUS_EFFECT_REVERB 0x1
172#define DMUS_EFFECT_CHORUS 0x2
173#define DMUS_EFFECT_DELAY  0x4
174	
175#define DMUS_MAX_DESCRIPTION 0x80
176#define DMUS_MAX_DRIVER 0x80
177
178#define DMUS_PC_INPUTCLASS  0x0
179#define DMUS_PC_OUTPUTCLASS 0x1
180
181#define DMUS_PC_DLS             0x00000001
182#define DMUS_PC_EXTERNAL        0x00000002
183#define DMUS_PC_SOFTWARESYNTH   0x00000004
184#define DMUS_PC_MEMORYSIZEFIXED 0x00000008
185#define DMUS_PC_GMINHARDWARE    0x00000010
186#define DMUS_PC_GSINHARDWARE    0x00000020
187#define DMUS_PC_XGINHARDWARE    0x00000040
188#define DMUS_PC_DIRECTSOUND     0x00000080
189#define DMUS_PC_SHAREABLE       0x00000100
190#define DMUS_PC_DLS2            0x00000200
191#define DMUS_PC_AUDIOPATH       0x00000400
192#define DMUS_PC_WAVE            0x00000800
193#define DMUS_PC_SYSTEMMEMORY    0x7FFFFFFF
194
195#define DMUS_PORT_WINMM_DRIVER    0x0
196#define DMUS_PORT_USER_MODE_SYNTH 0x1
197#define DMUS_PORT_KERNEL_MODE     0x2
198
199#define DMUS_PORT_FEATURE_AUDIOPATH     0x1
200#define DMUS_PORT_FEATURE_STREAMING     0x2
201
202#define DMUS_PORTPARAMS_VOICES           0x01
203#define DMUS_PORTPARAMS_CHANNELGROUPS    0x02
204#define DMUS_PORTPARAMS_AUDIOCHANNELS    0x04
205#define DMUS_PORTPARAMS_SAMPLERATE       0x08
206#define DMUS_PORTPARAMS_EFFECTS          0x20
207#define DMUS_PORTPARAMS_SHARE            0x40
208#define DMUS_PORTPARAMS_FEATURES         0x80
209
210#define DMUS_VOLUME_MAX     2000
211#define DMUS_VOLUME_MIN   -20000
212
213#define DMUS_SYNTHSTATS_VOICES        0x01
214#define DMUS_SYNTHSTATS_TOTAL_CPU     0x02
215#define DMUS_SYNTHSTATS_CPU_PER_VOICE 0x04
216#define DMUS_SYNTHSTATS_LOST_NOTES    0x08
217#define DMUS_SYNTHSTATS_PEAK_VOLUME   0x10
218#define DMUS_SYNTHSTATS_FREE_MEMORY   0x20
219#define DMUS_SYNTHSTATS_SYSTEMMEMORY  DMUS_PC_SYSTEMMEMORY
220
221#define DSBUSID_FIRST_SPKR_LOC        0x00000000
222#define DSBUSID_FRONT_LEFT            0x00000000
223#define DSBUSID_LEFT                  0x00000000
224#define DSBUSID_FRONT_RIGHT           0x00000001
225#define DSBUSID_RIGHT                 0x00000001
226#define DSBUSID_FRONT_CENTER          0x00000002
227#define DSBUSID_LOW_FREQUENCY         0x00000003
228#define DSBUSID_BACK_LEFT             0x00000004
229#define DSBUSID_BACK_RIGHT            0x00000005
230#define DSBUSID_FRONT_LEFT_OF_CENTER  0x00000006 
231#define DSBUSID_FRONT_RIGHT_OF_CENTER 0x00000007
232#define DSBUSID_BACK_CENTER           0x00000008
233#define DSBUSID_SIDE_LEFT             0x00000009
234#define DSBUSID_SIDE_RIGHT            0x0000000A
235#define DSBUSID_TOP_CENTER            0x0000000B
236#define DSBUSID_TOP_FRONT_LEFT        0x0000000C
237#define DSBUSID_TOP_FRONT_CENTER      0x0000000D
238#define DSBUSID_TOP_FRONT_RIGHT       0x0000000E
239#define DSBUSID_TOP_BACK_LEFT         0x0000000F
240#define DSBUSID_TOP_BACK_CENTER       0x00000010
241#define DSBUSID_TOP_BACK_RIGHT        0x011
242#define DSBUSID_LAST_SPKR_LOC         0x00000011
243#define DSBUSID_IS_SPKR_LOC(id)       (((id) >= DSBUSID_FIRST_SPKR_LOC) && ((id) <= DSBUSID_LAST_SPKR_LOC))
244
245#define DSBUSID_REVERB_SEND           0x00000040
246#define DSBUSID_CHORUS_SEND           0x00000041
247
248#define DSBUSID_DYNAMIC_0             0x00000200 
249
250#define DSBUSID_NULL			      0xFFFFFFFF
251
252/*****************************************************************************
253 * Enumerations
254 */
255typedef enum {
256	DMUS_CLOCK_SYSTEM = 0x0,
257	DMUS_CLOCK_WAVE   = 0x1
258} DMUS_CLOCKTYPE;
259
260
261/*****************************************************************************
262 * Structures
263 */
264/* typedef definitions */
265typedef struct _DMUS_BUFFERDESC          DMUS_BUFFERDESC,          *LPDMUS_BUFFERDESC;
266typedef struct _DMUS_PORTCAPS            DMUS_PORTCAPS,            *LPDMUS_PORTCAPS;
267typedef struct _DMUS_PORTPARAMS          DMUS_PORTPARAMS7,         *LPDMUS_PORTPARAMS7;
268typedef struct _DMUS_PORTPARAMS8         DMUS_PORTPARAMS8,         *LPDMUS_PORTPARAMS8;
269typedef         DMUS_PORTPARAMS8         DMUS_PORTPARAMS,          *LPDMUS_PORTPARAMS;
270typedef struct _DMUS_SYNTHSTATS          DMUS_SYNTHSTATS,          *LPDMUS_SYNTHSTATS;
271typedef struct _DMUS_SYNTHSTATS8         DMUS_SYNTHSTATS8,         *LPDMUS_SYNTHSTATS8;
272typedef struct _DMUS_WAVES_REVERB_PARAMS DMUS_WAVES_REVERB_PARAMS, *LPDMUS_WAVES_REVERB_PARAMS;
273typedef struct _DMUS_CLOCKINFO7          DMUS_CLOCKINFO7,          *LPDMUS_CLOCKINFO7;
274typedef struct _DMUS_CLOCKINFO8          DMUS_CLOCKINFO8,          *LPDMUS_CLOCKINFO8;
275typedef         DMUS_CLOCKINFO8          DMUS_CLOCKINFO,           *LPDMUS_CLOCKINFO;
276
277
278/* actual structures */
279struct _DMUS_BUFFERDESC {
280	DWORD dwSize;
281	DWORD dwFlags;
282	GUID guidBufferFormat;
283	DWORD cbBuffer;
284} ;
285
286struct _DMUS_PORTCAPS {
287	DWORD dwSize;
288	DWORD dwFlags;
289	GUID  guidPort;
290	DWORD dwClass;
291	DWORD dwType;
292	DWORD dwMemorySize;
293	DWORD dwMaxChannelGroups;
294	DWORD dwMaxVoices;    
295	DWORD dwMaxAudioChannels;
296	DWORD dwEffectFlags;
297	WCHAR wszDescription[DMUS_MAX_DESCRIPTION];
298};
299
300struct _DMUS_PORTPARAMS {
301	DWORD dwSize;
302	DWORD dwValidParams;
303	DWORD dwVoices;
304	DWORD dwChannelGroups;
305	DWORD dwAudioChannels;
306	DWORD dwSampleRate;
307	DWORD dwEffectFlags;
308	WINBOOL  fShare;
309};
310
311struct _DMUS_PORTPARAMS8 {
312	DWORD dwSize;
313	DWORD dwValidParams;
314	DWORD dwVoices;
315	DWORD dwChannelGroups;
316	DWORD dwAudioChannels;
317	DWORD dwSampleRate;
318	DWORD dwEffectFlags;
319	WINBOOL  fShare;
320	DWORD dwFeatures;
321};
322
323struct _DMUS_SYNTHSTATS {
324	DWORD dwSize;
325	DWORD dwValidStats;
326	DWORD dwVoices;
327	DWORD dwTotalCPU;
328	DWORD dwCPUPerVoice;
329	DWORD dwLostNotes;
330	DWORD dwFreeMemory;
331	LONG  lPeakVolume;
332};
333
334struct _DMUS_SYNTHSTATS8 {
335	DWORD dwSize;
336	DWORD dwValidStats;
337	DWORD dwVoices;
338	DWORD dwTotalCPU;
339	DWORD dwCPUPerVoice;
340	DWORD dwLostNotes;
341	DWORD dwFreeMemory;
342	LONG  lPeakVolume;
343	DWORD dwSynthMemUse;
344};
345
346struct _DMUS_WAVES_REVERB_PARAMS {
347	float fInGain;
348	float fReverbMix;
349	float fReverbTime;
350	float fHighFreqRTRatio;
351};
352
353struct _DMUS_CLOCKINFO7 {
354	DWORD          dwSize;
355	DMUS_CLOCKTYPE ctType;
356	GUID           guidClock;
357	WCHAR          wszDescription[DMUS_MAX_DESCRIPTION];
358};
359
360struct _DMUS_CLOCKINFO8 {
361    DWORD          dwSize;
362    DMUS_CLOCKTYPE ctType;
363    GUID           guidClock;
364    WCHAR          wszDescription[DMUS_MAX_DESCRIPTION];
365    DWORD          dwFlags;           
366};
367
368
369/*****************************************************************************
370 * IDirectMusic interface
371 */
372#define INTERFACE IDirectMusic
373DECLARE_INTERFACE_(IDirectMusic,IUnknown)
374{
375    /*** IUnknown methods ***/
376    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
377    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
378    STDMETHOD_(ULONG,Release)(THIS) PURE;
379    /*** IDirectMusic methods ***/
380    STDMETHOD(EnumPort)(THIS_ DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps) PURE;
381    STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER *ppBuffer, LPUNKNOWN pUnkOuter) PURE;
382    STDMETHOD(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE;
383    STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) PURE;
384    STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, IReferenceClock **ppReferenceClock) PURE;
385    STDMETHOD(SetMasterClock)(THIS_ REFGUID rguidClock) PURE;
386    STDMETHOD(Activate)(THIS_ WINBOOL fEnable) PURE;
387    STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE;
388    STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, HWND hWnd) PURE;
389};
390#undef INTERFACE
391
392#if !defined(__cplusplus) || defined(CINTERFACE)
393/*** IUnknown methods ***/
394#define IDirectMusic_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
395#define IDirectMusic_AddRef(p)                  (p)->lpVtbl->AddRef(p)
396#define IDirectMusic_Release(p)                 (p)->lpVtbl->Release(p)
397/*** IDirectMusic methods ***/
398#define IDirectMusic_EnumPort(p,a,b)            (p)->lpVtbl->EnumPort(p,a,b)
399#define IDirectMusic_CreateMusicBuffer(p,a,b,c) (p)->lpVtbl->CreateMusicBuffer(p,a,b,c)
400#define IDirectMusic_CreatePort(p,a,b,c,d)      (p)->lpVtbl->CreatePort(p,a,b,c,d)
401#define IDirectMusic_EnumMasterClock(p,a,b)     (p)->lpVtbl->EnumMasterClock(p,a,b)
402#define IDirectMusic_GetMasterClock(p,a,b)      (p)->lpVtbl->GetMasterClock(p,a,b)
403#define IDirectMusic_SetMasterClock(p,a)        (p)->lpVtbl->SetMasterClock(p,a)
404#define IDirectMusic_Activate(p,a)              (p)->lpVtbl->Activate(p,a)
405#define IDirectMusic_GetDefaultPort(p,a)        (p)->lpVtbl->GetDefaultPort(p,a)
406#define IDirectMusic_SetDirectSound(p,a,b)      (p)->lpVtbl->SetDirectSound(p,a,b)
407#endif
408
409
410/*****************************************************************************
411 * IDirectMusic8 interface
412 */
413#define INTERFACE IDirectMusic8
414DECLARE_INTERFACE_(IDirectMusic8,IDirectMusic)
415{
416    /*** IUnknown methods ***/
417    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
418    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
419    STDMETHOD_(ULONG,Release)(THIS) PURE;
420    /*** IDirectMusic methods ***/
421    STDMETHOD(EnumPort)(THIS_ DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps) PURE;
422    STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER *ppBuffer, LPUNKNOWN pUnkOuter) PURE;
423    STDMETHOD(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE;
424    STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) PURE;
425    STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, IReferenceClock **ppReferenceClock) PURE;
426    STDMETHOD(SetMasterClock)(THIS_ REFGUID rguidClock) PURE;
427    STDMETHOD(Activate)(THIS_ WINBOOL fEnable) PURE;
428    STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE;
429    STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, HWND hWnd) PURE;
430    /*** IDirectMusic8 methods ***/
431    STDMETHOD(SetExternalMasterClock)(THIS_ IReferenceClock *pClock) PURE;
432};
433#undef INTERFACE
434
435#if !defined(__cplusplus) || defined(CINTERFACE)
436/*** IUnknown methods ***/
437#define IDirectMusic8_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
438#define IDirectMusic8_AddRef(p)                   (p)->lpVtbl->AddRef(p)
439#define IDirectMusic8_Release(p)                  (p)->lpVtbl->Release(p)
440/*** IDirectMusic methods ***/
441#define IDirectMusic8_EnumPort(p,a,b)             (p)->lpVtbl->EnumPort(p,a,b)
442#define IDirectMusic8_CreateMusicBuffer(p,a,b,c)  (p)->lpVtbl->CreateMusicBuffer(p,a,b,c)
443#define IDirectMusic8_CreatePort(p,a,b,c,d)       (p)->lpVtbl->CreatePort(p,a,b,c,d)
444#define IDirectMusic8_EnumMasterClock(p,a,b)      (p)->lpVtbl->EnumMasterClock(p,a,b)
445#define IDirectMusic8_GetMasterClock(p,a,b)       (p)->lpVtbl->GetMasterClock(p,a,b)
446#define IDirectMusic8_SetMasterClock(p,a)         (p)->lpVtbl->SetMasterClock(p,a)
447#define IDirectMusic8_Activate(p,a)               (p)->lpVtbl->Activate(p,a)
448#define IDirectMusic8_GetDefaultPort(p,a)         (p)->lpVtbl->GetDefaultPort(p,a)
449#define IDirectMusic8_SetDirectSound(p,a,b)       (p)->lpVtbl->SetDirectSound(p,a,b)
450/*** IDirectMusic8 methods ***/
451#define IDirectMusic8_SetExternalMasterClock(p,a) (p)->lpVtbl->SetExternalMasterClock(p,a)
452#endif
453
454
455/*****************************************************************************
456 * IDirectMusicBuffer interface
457 */
458#define INTERFACE IDirectMusicBuffer
459DECLARE_INTERFACE_(IDirectMusicBuffer,IUnknown)
460{
461    /*** IUnknown methods ***/
462    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
463    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
464    STDMETHOD_(ULONG,Release)(THIS) PURE;
465    /*** IDirectMusicBuffer methods ***/
466    STDMETHOD(Flush)(THIS) PURE;
467    STDMETHOD(TotalTime)(THIS_ LPREFERENCE_TIME prtTime) PURE;
468    STDMETHOD(PackStructured)(THIS_ REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage) PURE;
469    STDMETHOD(PackUnstructured)(THIS_ REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb) PURE;
470    STDMETHOD(ResetReadPtr)(THIS) PURE;
471    STDMETHOD(GetNextEvent)(THIS_ LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE *ppData) PURE;
472    STDMETHOD(GetRawBufferPtr)(THIS_ LPBYTE *ppData) PURE;
473    STDMETHOD(GetStartTime)(THIS_ LPREFERENCE_TIME prt) PURE;
474    STDMETHOD(GetUsedBytes)(THIS_ LPDWORD pcb) PURE;
475    STDMETHOD(GetMaxBytes)(THIS_ LPDWORD pcb) PURE;
476    STDMETHOD(GetBufferFormat)(THIS_ LPGUID pGuidFormat) PURE;
477    STDMETHOD(SetStartTime)(THIS_ REFERENCE_TIME rt) PURE;
478    STDMETHOD(SetUsedBytes)(THIS_ DWORD cb) PURE;
479};
480#undef INTERFACE
481
482#if !defined(__cplusplus) || defined(CINTERFACE)
483/*** IUnknown methods ***/
484#define IDirectMusicBuffer_QueryInterface(p,a,b)            (p)->lpVtbl->QueryInterface(p,a,b)
485#define IDirectMusicBuffer_AddRef(p)                        (p)->lpVtbl->AddRef(p)
486#define IDirectMusicBuffer_Release(p)                       (p)->lpVtbl->Release(p)
487/*** IDirectMusicBuffer methods ***/
488#define IDirectMusicBuffer_Flush(p)                         (p)->lpVtbl->Flush(p)
489#define IDirectMusicBuffer_TotalTime(p,a)                   (p)->lpVtbl->TotalTime(p,a)
490#define IDirectMusicBuffer_PackStructured(p,a,b,c)          (p)->lpVtbl->PackStructured(p,a,b,c)
491#define IDirectMusicBuffer_PackUnstructured(p,a,b,c,d)      (p)->lpVtbl->PackUnstructured(p,a,b,c,d)
492#define IDirectMusicBuffer_ResetReadPtr(p)                  (p)->lpVtbl->ResetReadPtr(p)
493#define IDirectMusicBuffer_GetNextEvent(p,a,b,c,d)          (p)->lpVtbl->GetNextEvent(p,a,b,c,d)
494#define IDirectMusicBuffer_GetRawBufferPtr(p,a)             (p)->lpVtbl->GetRawBufferPtr(p,a)
495#define IDirectMusicBuffer_GetStartTime(p,a)                (p)->lpVtbl->GetStartTime(p,a)
496#define IDirectMusicBuffer_GetUsedBytes(p,a)                (p)->lpVtbl->GetUsedBytes(p,a)
497#define IDirectMusicBuffer_GetMaxBytes(p,a)                 (p)->lpVtbl->GetMaxBytes(p,a)
498#define IDirectMusicBuffer_GetBufferFormat(p,a)             (p)->lpVtbl->GetBufferFormat(p,a)
499#define IDirectMusicBuffer_SetStartTime(p,a)                (p)->lpVtbl->SetStartTime(p,a)
500#define IDirectMusicBuffer_SetUsedBytes(p,a)                (p)->lpVtbl->SetUsedBytes(p,a)
501#endif
502
503
504/*****************************************************************************
505 * IDirectMusicInstrument interface
506 */
507#define INTERFACE IDirectMusicInstrument
508DECLARE_INTERFACE_(IDirectMusicInstrument,IUnknown)
509{
510    /*** IUnknown methods ***/
511    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
512    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
513    STDMETHOD_(ULONG,Release)(THIS) PURE;
514    /*** IDirectMusicInstrument methods ***/
515    STDMETHOD(GetPatch)(THIS_ DWORD *pdwPatch) PURE;
516    STDMETHOD(SetPatch)(THIS_ DWORD dwPatch) PURE;
517};
518#undef INTERFACE
519
520#if !defined(__cplusplus) || defined(CINTERFACE)
521/*** IUnknown methods ***/
522#define IDirectMusicInstrument_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
523#define IDirectMusicInstrument_AddRef(p)             (p)->lpVtbl->AddRef(p)
524#define IDirectMusicInstrument_Release(p)            (p)->lpVtbl->Release(p)
525/*** IDirectMusicInstrument methods ***/
526#define IDirectMusicInstrument_GetPatch(p,a)         (p)->lpVtbl->GetPatch(p,a)
527#define IDirectMusicInstrument_SetPatch(p,a)         (p)->lpVtbl->SetPatch(p,a)
528#endif
529
530
531/*****************************************************************************
532 * IDirectMusicDownloadedInstrument interface
533 */
534#define INTERFACE IDirectMusicDownloadedInstrument
535DECLARE_INTERFACE_(IDirectMusicDownloadedInstrument,IUnknown)
536{
537    /*** IUnknown methods ***/
538    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
539    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
540    STDMETHOD_(ULONG,Release)(THIS) PURE;
541    /* no IDirectMusicDownloadedInstrument methods at this time */
542};
543#undef INTERFACE
544
545#if !defined(__cplusplus) || defined(CINTERFACE)
546/*** IUnknown methods ***/
547#define IDirectMusicDownloadedInstrument_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
548#define IDirectMusicDownloadedInstrument_AddRef(p)             (p)->lpVtbl->AddRef(p)
549#define IDirectMusicDownloadedInstrument_Release(p)            (p)->lpVtbl->Release(p)
550/*** IDirectMusicDownloadedInstrument methods ***/
551/* none at this time */
552#endif
553
554
555/*****************************************************************************
556 * IDirectMusicCollection interface
557 */
558#define INTERFACE IDirectMusicCollection
559DECLARE_INTERFACE_(IDirectMusicCollection,IUnknown)
560{
561    /*** IUnknown methods ***/
562    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
563    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
564    STDMETHOD_(ULONG,Release)(THIS) PURE;
565    /*** IDirectMusicCollection methods ***/
566    STDMETHOD(GetInstrument)(THIS_ DWORD dwPatch, IDirectMusicInstrument **ppInstrument) PURE;
567    STDMETHOD(EnumInstrument)(THIS_ DWORD dwIndex, DWORD *pdwPatch, LPWSTR pwszName, DWORD dwNameLen) PURE;
568};
569#undef INTERFACE
570
571#if !defined(__cplusplus) || defined(CINTERFACE)
572/*** IUnknown methods ***/
573#define IDirectMusicCollection_QueryInterface(p,a,b)            (p)->lpVtbl->QueryInterface(p,a,b)
574#define IDirectMusicCollection_AddRef(p)                        (p)->lpVtbl->AddRef(p)
575#define IDirectMusicCollection_Release(p)                       (p)->lpVtbl->Release(p)
576/*** IDirectMusicCollection methods ***/
577#define IDirectMusicCollection_GetInstrument(p,a,b)             (p)->lpVtbl->GetInstrument(p,a,b)
578#define IDirectMusicCollection_EnumInstrument(p,a,b,c,d)        (p)->lpVtbl->EnumInstrument(p,a,b,c,d)
579#endif
580
581
582/*****************************************************************************
583 * IDirectMusicDownload interface
584 */
585#define INTERFACE IDirectMusicDownload
586DECLARE_INTERFACE_(IDirectMusicDownload,IUnknown)
587{
588    /*** IUnknown methods ***/
589    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
590    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
591    STDMETHOD_(ULONG,Release)(THIS) PURE;
592    /*** IDirectMusicDownload methods ***/
593    STDMETHOD(GetBuffer)(THIS_ void **ppvBuffer, DWORD *pdwSize) PURE;
594};
595#undef INTERFACE
596
597#if !defined(__cplusplus) || defined(CINTERFACE)
598/*** IUnknown methods ***/
599#define IDirectMusicDownload_QueryInterface(p,a,b)          (p)->lpVtbl->QueryInterface(p,a,b)
600#define IDirectMusicDownload_AddRef(p)                      (p)->lpVtbl->AddRef(p)
601#define IDirectMusicDownload_Release(p)                     (p)->lpVtbl->Release(p)
602/*** IDirectMusicDownload methods ***/
603#define IDirectMusicDownload_GetBuffer(p,a,b)               (p)->lpVtbl->GetBuffer(p,a,b)
604#endif
605
606
607/*****************************************************************************
608 * IDirectMusicPortDownload interface
609 */
610#define INTERFACE IDirectMusicPortDownload
611DECLARE_INTERFACE_(IDirectMusicPortDownload,IUnknown)
612{
613    /*** IUnknown methods ***/
614    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
615    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
616    STDMETHOD_(ULONG,Release)(THIS) PURE;
617    /*** IDirectMusicPortDownload methods ***/
618    STDMETHOD(GetBuffer)(THIS_ DWORD dwDLId, IDirectMusicDownload **ppIDMDownload) PURE;
619    STDMETHOD(AllocateBuffer)(THIS_ DWORD dwSize, IDirectMusicDownload **ppIDMDownload) PURE;
620    STDMETHOD(GetDLId)(THIS_ DWORD *pdwStartDLId, DWORD dwCount) PURE;
621    STDMETHOD(GetAppend)(THIS_ DWORD *pdwAppend) PURE;
622    STDMETHOD(Download)(THIS_ IDirectMusicDownload *pIDMDownload) PURE;
623    STDMETHOD(Unload)(THIS_ IDirectMusicDownload *pIDMDownload) PURE;
624};
625#undef INTERFACE
626
627#if !defined(__cplusplus) || defined(CINTERFACE)
628/*** IUnknown methods ***/
629#define IDirectMusicPortDownload_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
630#define IDirectMusicPortDownload_AddRef(p)             (p)->lpVtbl->AddRef(p)
631#define IDirectMusicPortDownload_Release(p)            (p)->lpVtbl->Release(p)
632/*** IDirectMusicPortDownload methods ***/
633#define IDirectMusicPortDownload_GetBuffer(p,a,b)      (p)->lpVtbl->GetBuffer(p,a,b)
634#define IDirectMusicPortDownload_AllocateBuffer(p,a,b) (p)->lpVtbl->AllocateBuffer(p,a,b)
635#define IDirectMusicPortDownload_GetDLId(p,a,b)        (p)->lpVtbl->GetDLId(p,a,b)
636#define IDirectMusicPortDownload_GetAppend(p,a)        (p)->lpVtbl->GetAppend(p,a)
637#define IDirectMusicPortDownload_Download(p,a)         (p)->lpVtbl->Download(p,a)
638#define IDirectMusicPortDownload_Unload(p,a)           (p)->lpVtbl->Unload(p,a)
639#endif
640
641
642/*****************************************************************************
643 * IDirectMusicPort interface
644 */
645#define INTERFACE IDirectMusicPort
646DECLARE_INTERFACE_(IDirectMusicPort,IUnknown)
647{
648    /*** IUnknown methods ***/
649    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
650    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
651    STDMETHOD_(ULONG,Release)(THIS) PURE;
652    /*** IDirectMusicPort methods ***/
653    STDMETHOD(PlayBuffer)(THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE;
654    STDMETHOD(SetReadNotificationHandle)(THIS_ HANDLE hEvent) PURE;
655    STDMETHOD(Read)(THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE;
656    STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInstrument, IDirectMusicDownloadedInstrument **ppDownloadedInstrument, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges) PURE;
657    STDMETHOD(UnloadInstrument)(THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument) PURE;
658    STDMETHOD(GetLatencyClock)(THIS_ IReferenceClock **ppClock) PURE;
659    STDMETHOD(GetRunningStats)(THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
660    STDMETHOD(Compact)(THIS) PURE;
661    STDMETHOD(GetCaps)(THIS_ LPDMUS_PORTCAPS pPortCaps) PURE;
662    STDMETHOD(DeviceIoControl)(THIS_ DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped) PURE;
663    STDMETHOD(SetNumChannelGroups)(THIS_ DWORD dwChannelGroups) PURE;
664    STDMETHOD(GetNumChannelGroups)(THIS_ LPDWORD pdwChannelGroups) PURE;
665    STDMETHOD(Activate)(THIS_ WINBOOL fActive) PURE;
666    STDMETHOD(SetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE;
667    STDMETHOD(GetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE;
668    STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE;
669    STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) PURE;
670};
671#undef INTERFACE
672
673#if !defined(__cplusplus) || defined(CINTERFACE)
674/*** IUnknown methods ***/
675#define IDirectMusicPort_QueryInterface(p,a,b)            (p)->lpVtbl->QueryInterface(p,a,b)
676#define IDirectMusicPort_AddRef(p)                        (p)->lpVtbl->AddRef(p)
677#define IDirectMusicPort_Release(p)                       (p)->lpVtbl->Release(p)
678/*** IDirectMusicPort methods ***/
679#define IDirectMusicPort_PlayBuffer(p,a)                  (p)->lpVtbl->PlayBuffer(p,a)
680#define IDirectMusicPort_SetReadNotificationHandle(p,a)   (p)->lpVtbl->SetReadNotificationHandle(p,a)
681#define IDirectMusicPort_Read(p,a)                        (p)->lpVtbl->Read(p,a)
682#define IDirectMusicPort_DownloadInstrument(p,a,b,c,d)    (p)->lpVtbl->DownloadInstrument(p,a,b,c,d)
683#define IDirectMusicPort_UnloadInstrument(p,a)            (p)->lpVtbl->UnloadInstrument(p,a)
684#define IDirectMusicPort_GetLatencyClock(p,a)             (p)->lpVtbl->GetLatencyClock(p,a)
685#define IDirectMusicPort_GetRunningStats(p,a)             (p)->lpVtbl->GetRunningStats(p,a)
686#define IDirectMusicPort_Compact(p)                       (p)->lpVtbl->Compact(p)
687#define IDirectMusicPort_GetCaps(p,a)                     (p)->lpVtbl->GetCaps(p,a)
688#define IDirectMusicPort_DeviceIoControl(p,a,b,c,d,e,f,g) (p)->lpVtbl->DeviceIoControl(p,a,b,c,d,e,f,g)
689#define IDirectMusicPort_SetNumChannelGroups(p,a)         (p)->lpVtbl->SetNumChannelGroups(p,a)
690#define IDirectMusicPort_GetNumChannelGroups(p,a)         (p)->lpVtbl->GetNumChannelGroups(p,a)
691#define IDirectMusicPort_Activate(p,a)                    (p)->lpVtbl->Activate(p,a)
692#define IDirectMusicPort_SetChannelPriority(p,a,b,c)      (p)->lpVtbl->SetChannelPriority(p,a,b,c)
693#define IDirectMusicPort_GetChannelPriority(p,a,b,c)      (p)->lpVtbl->GetChannelPriority(p,a,b,c)
694#define IDirectMusicPort_SetDirectSound(p,a,b)            (p)->lpVtbl->SetDirectSound(p,a,b)
695#define IDirectMusicPort_GetFormat(p,a,b,c)               (p)->lpVtbl->GetFormat(p,a,b,c)
696#endif
697
698
699/*****************************************************************************
700 * IDirectMusicThru interface
701 */
702#define INTERFACE IDirectMusicThru
703DECLARE_INTERFACE_(IDirectMusicThru,IUnknown)
704{
705    /*** IUnknown methods ***/
706    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
707    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
708    STDMETHOD_(ULONG,Release)(THIS) PURE;
709    /*** IDirectMusicThru methods ***/
710    STDMETHOD(ThruChannel)(THIS_ DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort) PURE;
711};
712#undef INTERFACE
713
714#if !defined(__cplusplus) || defined(CINTERFACE)
715/*** IUnknown methods ***/
716#define IDirectMusicThru_QueryInterface(p,a,b)                  (p)->lpVtbl->QueryInterface(p,a,b)
717#define IDirectMusicThru_AddRef(p)                              (p)->lpVtbl->AddRef(p)
718#define IDirectMusicThru_Release(p)                             (p)->lpVtbl->Release(p)
719/*** IDirectMusicThru methods ***/
720#define IDirectMusicThru_ThruChannel(p,a,b,c,d,e)               (p)->lpVtbl->ThruChannel(p,a,b,c,d,e)
721#endif
722
723#ifdef __cplusplus
724}
725#endif
726
727#pragma pack(pop)
728
729#endif /* __WINE_DMUSIC_CORE_H */