dmusicc.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:35k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /************************************************************************
  2. *                                                                       *
  3. *   dmusicc.h -- This module defines the DirectMusic core API's         *
  4. *                                                                       *
  5. *   Copyright (c) 1998-1999 Microsoft Corporation
  6. *                                                                       *
  7. ************************************************************************/
  8. #ifndef _DMUSICC_
  9. #define _DMUSICC_
  10. #include <windows.h>
  11. #define COM_NO_WINDOWS_H
  12. #include <objbase.h>
  13. #include <mmsystem.h>
  14. #include "dls1.h"
  15. #include "dmerror.h"
  16. #include "dmdls.h"
  17. #include "dsound.h"
  18. #include "dmusbuff.h"
  19. #include <pshpack8.h>
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. typedef ULONGLONG    SAMPLE_TIME;
  24. typedef ULONGLONG    SAMPLE_POSITION;
  25. typedef SAMPLE_TIME *LPSAMPLE_TIME;
  26. #define DMUS_MAX_DESCRIPTION 128
  27. #define DMUS_MAX_DRIVER 128
  28. typedef struct _DMUS_BUFFERDESC *LPDMUS_BUFFERDESC;
  29. typedef struct _DMUS_BUFFERDESC
  30. {
  31.     DWORD dwSize;
  32.     DWORD dwFlags;
  33.     GUID guidBufferFormat;
  34.     DWORD cbBuffer;
  35. } DMUS_BUFFERDESC;
  36. /* DMUS_EFFECT_ flags are used in the dwEffectFlags fields of both DMUS_PORTCAPS 
  37.  * and DMUS_PORTPARAMS.
  38.  */
  39. #define DMUS_EFFECT_NONE             0x00000000
  40. #define DMUS_EFFECT_REVERB           0x00000001
  41. #define DMUS_EFFECT_CHORUS           0x00000002
  42. #define DMUS_EFFECT_DELAY            0x00000004
  43. /* For DMUS_PORTCAPS dwClass
  44.  */ 
  45. #define DMUS_PC_INPUTCLASS       (0)
  46. #define DMUS_PC_OUTPUTCLASS      (1)
  47. /* For DMUS_PORTCAPS dwFlags
  48.  */
  49. #define DMUS_PC_DLS              (0x00000001)   // Supports DLS downloading and DLS level 1.
  50. #define DMUS_PC_EXTERNAL         (0x00000002)   // External MIDI module.
  51. #define DMUS_PC_SOFTWARESYNTH    (0x00000004)   // Software synthesizer.
  52. #define DMUS_PC_MEMORYSIZEFIXED  (0x00000008)   // Memory size is fixed.
  53. #define DMUS_PC_GMINHARDWARE     (0x00000010)   // GM sound set is built in, no need to download.
  54. #define DMUS_PC_GSINHARDWARE     (0x00000020)   // GS sound set is built in.
  55. #define DMUS_PC_XGINHARDWARE     (0x00000040)   // XG sound set is built in.
  56. #define DMUS_PC_DIRECTSOUND      (0x00000080)   // Connects to DirectSound via a DSound buffer.
  57. #define DMUS_PC_SHAREABLE        (0x00000100)   // Synth can be actively shared by multiple apps at once.
  58. #define DMUS_PC_DLS2             (0x00000200)   // Supports DLS2 instruments.
  59. #define DMUS_PC_AUDIOPATH        (0x00000400)   // Multiple outputs can be connected to DirectSound for audiopaths.
  60. #define DMUS_PC_WAVE             (0x00000800)   // Supports streaming and one shot waves.
  61. #define DMUS_PC_SYSTEMMEMORY     (0x7FFFFFFF)   // Sample memory is system memory.
  62. typedef struct _DMUS_PORTCAPS
  63. {
  64.     DWORD   dwSize;
  65.     DWORD   dwFlags;
  66.     GUID    guidPort;
  67.     DWORD   dwClass;
  68.     DWORD   dwType;
  69.     DWORD   dwMemorySize;
  70.     DWORD   dwMaxChannelGroups;
  71.     DWORD   dwMaxVoices;    
  72.     DWORD   dwMaxAudioChannels;
  73.     DWORD   dwEffectFlags;
  74.     WCHAR   wszDescription[DMUS_MAX_DESCRIPTION];
  75. } DMUS_PORTCAPS;
  76. typedef DMUS_PORTCAPS *LPDMUS_PORTCAPS;
  77. /* Values for DMUS_PORTCAPS dwType. This field indicates the underlying 
  78.  * driver type of the port.
  79.  */
  80. #define DMUS_PORT_WINMM_DRIVER      (0)
  81. #define DMUS_PORT_USER_MODE_SYNTH   (1)
  82. #define DMUS_PORT_KERNEL_MODE       (2)
  83. /* These flags (set in dwValidParams) indicate which other members of the */
  84. /* DMUS_PORTPARAMS are valid. */
  85. /* */
  86. #define DMUS_PORTPARAMS_VOICES           0x00000001
  87. #define DMUS_PORTPARAMS_CHANNELGROUPS    0x00000002
  88. #define DMUS_PORTPARAMS_AUDIOCHANNELS    0x00000004
  89. #define DMUS_PORTPARAMS_SAMPLERATE       0x00000008
  90. #define DMUS_PORTPARAMS_EFFECTS          0x00000020
  91. #define DMUS_PORTPARAMS_SHARE            0x00000040
  92. #define DMUS_PORTPARAMS_FEATURES         0x00000080     /* DirectX 8.0 and above */
  93. typedef struct _DMUS_PORTPARAMS
  94. {
  95.     DWORD   dwSize;
  96.     DWORD   dwValidParams;
  97.     DWORD   dwVoices;
  98.     DWORD   dwChannelGroups;
  99.     DWORD   dwAudioChannels;
  100.     DWORD   dwSampleRate;
  101.     DWORD   dwEffectFlags;
  102.     BOOL    fShare;
  103. } DMUS_PORTPARAMS7;
  104. typedef struct _DMUS_PORTPARAMS8
  105. {
  106.     DWORD   dwSize;
  107.     DWORD   dwValidParams;
  108.     DWORD   dwVoices;
  109.     DWORD   dwChannelGroups;
  110.     DWORD   dwAudioChannels;
  111.     DWORD   dwSampleRate;
  112.     DWORD   dwEffectFlags;
  113.     BOOL    fShare;
  114.     DWORD   dwFeatures;
  115. } DMUS_PORTPARAMS8;
  116. #define DMUS_PORT_FEATURE_AUDIOPATH     0x00000001 /* Supports audiopath connection to DSound buffers. */
  117. #define DMUS_PORT_FEATURE_STREAMING     0x00000002 /* Supports streaming waves through the synth. */
  118. typedef DMUS_PORTPARAMS8 DMUS_PORTPARAMS;
  119. typedef DMUS_PORTPARAMS *LPDMUS_PORTPARAMS;
  120. typedef struct _DMUS_SYNTHSTATS *LPDMUS_SYNTHSTATS;
  121. typedef struct _DMUS_SYNTHSTATS8 *LPDMUS_SYNTHSTATS8;
  122. typedef struct _DMUS_SYNTHSTATS
  123. {
  124.     DWORD   dwSize;             /* Size in bytes of the structure */
  125.     DWORD   dwValidStats;       /* Flags indicating which fields below are valid. */
  126.     DWORD   dwVoices;           /* Average number of voices playing. */
  127.     DWORD   dwTotalCPU;         /* Total CPU usage as percent * 100. */
  128.     DWORD   dwCPUPerVoice;      /* CPU per voice as percent * 100. */
  129.     DWORD   dwLostNotes;        /* Number of notes lost in 1 second. */
  130.     DWORD   dwFreeMemory;       /* Free memory in bytes */
  131.     long    lPeakVolume;        /* Decibel level * 100. */
  132. } DMUS_SYNTHSTATS;
  133. typedef struct _DMUS_SYNTHSTATS8
  134. {
  135.     DWORD   dwSize;             /* Size in bytes of the structure */
  136.     DWORD   dwValidStats;       /* Flags indicating which fields below are valid. */
  137.     DWORD   dwVoices;           /* Average number of voices playing. */
  138.     DWORD   dwTotalCPU;         /* Total CPU usage as percent * 100. */
  139.     DWORD   dwCPUPerVoice;      /* CPU per voice as percent * 100. */
  140.     DWORD   dwLostNotes;        /* Number of notes lost in 1 second. */
  141.     DWORD   dwFreeMemory;       /* Free memory in bytes */
  142.     long    lPeakVolume;        /* Decibel level * 100. */
  143. DWORD   dwSynthMemUse; /* Memory used by synth wave data */ 
  144. } DMUS_SYNTHSTATS8;
  145. #define DMUS_SYNTHSTATS_VOICES          (1 << 0)
  146. #define DMUS_SYNTHSTATS_TOTAL_CPU       (1 << 1)
  147. #define DMUS_SYNTHSTATS_CPU_PER_VOICE   (1 << 2)
  148. #define DMUS_SYNTHSTATS_LOST_NOTES      (1 << 3)
  149. #define DMUS_SYNTHSTATS_PEAK_VOLUME     (1 << 4)
  150. #define DMUS_SYNTHSTATS_FREE_MEMORY     (1 << 5)
  151. #define DMUS_SYNTHSTATS_SYSTEMMEMORY    DMUS_PC_SYSTEMMEMORY
  152. typedef struct _DMUS_WAVES_REVERB_PARAMS
  153. {
  154.     float   fInGain;        /* Input gain in dB (to avoid output overflows) */
  155.     float   fReverbMix;     /* Reverb mix in dB. 0dB means 100% wet reverb (no direct signal)
  156.                             Negative values gives less wet signal.
  157.                             The coeficients are calculated so that the overall output level stays 
  158.                             (approximately) constant regardless of the ammount of reverb mix. */
  159.     float   fReverbTime;    /* The reverb decay time, in milliseconds. */
  160.     float   fHighFreqRTRatio; /* The ratio of the high frequencies to the global reverb time. 
  161.                             Unless very 'splashy-bright' reverbs are wanted, this should be set to 
  162.                             a value < 1.0.
  163.                             For example if dRevTime==1000ms and dHighFreqRTRatio=0.1 than the 
  164.                             decay time for high frequencies will be 100ms.*/
  165. } DMUS_WAVES_REVERB_PARAMS;
  166. /*  Note: Default values for Reverb are:
  167.     fInGain             = 0.0dB   (no change in level)
  168.     fReverbMix          = -10.0dB   (a reasonable reverb mix)
  169.     fReverbTime         = 1000.0ms (one second global reverb time)
  170.     fHighFreqRTRatio    = 0.001    (the ratio of the high frequencies to the global reverb time) 
  171. */
  172. typedef enum
  173. {
  174.     DMUS_CLOCK_SYSTEM = 0,
  175.     DMUS_CLOCK_WAVE = 1
  176. } DMUS_CLOCKTYPE;
  177. #define DMUS_CLOCKF_GLOBAL              0x00000001
  178. typedef struct _DMUS_CLOCKINFO7 *LPDMUS_CLOCKINFO7;
  179. typedef struct _DMUS_CLOCKINFO7
  180. {
  181.     DWORD           dwSize;
  182.     DMUS_CLOCKTYPE  ctType;
  183.     GUID            guidClock;          /* Identifies this time source */
  184.     WCHAR           wszDescription[DMUS_MAX_DESCRIPTION];
  185. } DMUS_CLOCKINFO7;
  186. typedef struct _DMUS_CLOCKINFO8 *LPDMUS_CLOCKINFO8;
  187. typedef struct _DMUS_CLOCKINFO8
  188. {
  189.     DWORD           dwSize;
  190.     DMUS_CLOCKTYPE  ctType;
  191.     GUID            guidClock;          /* Identifies this time source */
  192.     WCHAR           wszDescription[DMUS_MAX_DESCRIPTION];
  193.     DWORD           dwFlags;           
  194. } DMUS_CLOCKINFO8;
  195. typedef DMUS_CLOCKINFO8 DMUS_CLOCKINFO;
  196. typedef DMUS_CLOCKINFO *LPDMUS_CLOCKINFO;
  197. /* Default bus identifiers
  198.  *
  199.  * The first 17 are direct mappings to the destinations defined in both
  200.  * the MMA DLS Level 2 specification and the Microsoft Multi-Channel audio
  201.  * specification.
  202.  */
  203. #define DSBUSID_FIRST_SPKR_LOC              0
  204. #define DSBUSID_FRONT_LEFT                  0
  205. #define DSBUSID_LEFT                        0   /* Front left is also just left */
  206. #define DSBUSID_FRONT_RIGHT                 1
  207. #define DSBUSID_RIGHT                       1   /* Ditto front right */ 
  208. #define DSBUSID_FRONT_CENTER                2
  209. #define DSBUSID_LOW_FREQUENCY               3
  210. #define DSBUSID_BACK_LEFT                   4
  211. #define DSBUSID_BACK_RIGHT                  5
  212. #define DSBUSID_FRONT_LEFT_OF_CENTER        6 
  213. #define DSBUSID_FRONT_RIGHT_OF_CENTER       7
  214. #define DSBUSID_BACK_CENTER                 8
  215. #define DSBUSID_SIDE_LEFT                   9
  216. #define DSBUSID_SIDE_RIGHT                 10
  217. #define DSBUSID_TOP_CENTER                 11
  218. #define DSBUSID_TOP_FRONT_LEFT             12
  219. #define DSBUSID_TOP_FRONT_CENTER           13
  220. #define DSBUSID_TOP_FRONT_RIGHT            14
  221. #define DSBUSID_TOP_BACK_LEFT              15
  222. #define DSBUSID_TOP_BACK_CENTER            16
  223. #define DSBUSID_TOP_BACK_RIGHT             17
  224. #define DSBUSID_LAST_SPKR_LOC              17
  225. #define DSBUSID_IS_SPKR_LOC(id) ( ((id) >= DSBUSID_FIRST_SPKR_LOC) && ((id) <= DSBUSID_LAST_SPKR_LOC) )
  226. /* These bus identifiers are for the standard DLS effect sends 
  227.  */
  228. #define DSBUSID_REVERB_SEND                64
  229. #define DSBUSID_CHORUS_SEND                65
  230. /* Dynamic bus identifiers start here. See the documentation for how
  231.  * synthesizers map the output of voices to static and dynamic
  232.  * bus identifiers.
  233.  */ 
  234. #define DSBUSID_DYNAMIC_0                 512 
  235. /* Null bus, used to identify busses that have no function mapping. 
  236. */
  237. #define DSBUSID_NULL    0xFFFFFFFF
  238. interface IDirectMusic;
  239. interface IDirectMusic8;
  240. interface IDirectMusicBuffer;
  241. interface IDirectMusicPort;
  242. interface IDirectMusicThru;
  243. interface IReferenceClock;
  244. #ifndef __cplusplus 
  245. typedef interface IDirectMusic IDirectMusic;
  246. typedef interface IDirectMusic8 IDirectMusic8;
  247. typedef interface IDirectMusicPort IDirectMusicPort;
  248. typedef interface IDirectMusicBuffer IDirectMusicBuffer;
  249. typedef interface IDirectMusicThru IDirectMusicThru;
  250. typedef interface IReferenceClock IReferenceClock;
  251. #endif  /* C++ */
  252. typedef IDirectMusic *LPDIRECTMUSIC;
  253. typedef IDirectMusic8 *LPDIRECTMUSIC8;
  254. typedef IDirectMusicPort *LPDIRECTMUSICPORT;
  255. typedef IDirectMusicBuffer *LPDIRECTMUSICBUFFER;
  256. #undef  INTERFACE
  257. #define INTERFACE  IDirectMusic
  258. DECLARE_INTERFACE_(IDirectMusic, IUnknown)
  259. {
  260.     /*  IUnknown */
  261.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  262.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  263.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  264.     /*  IDirectMusic */
  265.     STDMETHOD(EnumPort)             (THIS_ DWORD dwIndex, 
  266.                                            LPDMUS_PORTCAPS pPortCaps) PURE;
  267.     STDMETHOD(CreateMusicBuffer)    (THIS_ LPDMUS_BUFFERDESC pBufferDesc, 
  268.                                            LPDIRECTMUSICBUFFER *ppBuffer, 
  269.                                            LPUNKNOWN pUnkOuter) PURE;
  270.     STDMETHOD(CreatePort)           (THIS_ REFCLSID rclsidPort, 
  271.                                            LPDMUS_PORTPARAMS pPortParams, 
  272.                                            LPDIRECTMUSICPORT *ppPort, 
  273.                                            LPUNKNOWN pUnkOuter) PURE;
  274.     STDMETHOD(EnumMasterClock)      (THIS_ DWORD dwIndex, 
  275.                                            LPDMUS_CLOCKINFO lpClockInfo) PURE;
  276.     STDMETHOD(GetMasterClock)       (THIS_ LPGUID pguidClock, 
  277.                                            IReferenceClock **ppReferenceClock) PURE;
  278.     STDMETHOD(SetMasterClock)       (THIS_ REFGUID rguidClock) PURE;
  279.     STDMETHOD(Activate)             (THIS_ BOOL fEnable) PURE;
  280.     STDMETHOD(GetDefaultPort)       (THIS_ LPGUID pguidPort) PURE;
  281.     STDMETHOD(SetDirectSound)       (THIS_ LPDIRECTSOUND pDirectSound,
  282.                                            HWND hWnd) PURE;
  283. };
  284. #undef  INTERFACE
  285. #define INTERFACE  IDirectMusic8
  286. DECLARE_INTERFACE_(IDirectMusic8, IDirectMusic)
  287. {
  288.     /*  IUnknown */
  289.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  290.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  291.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  292.     /*  IDirectMusic */
  293.     STDMETHOD(EnumPort)             (THIS_ DWORD dwIndex, 
  294.                                            LPDMUS_PORTCAPS pPortCaps) PURE;
  295.     STDMETHOD(CreateMusicBuffer)    (THIS_ LPDMUS_BUFFERDESC pBufferDesc, 
  296.                                            LPDIRECTMUSICBUFFER *ppBuffer, 
  297.                                            LPUNKNOWN pUnkOuter) PURE;
  298.     STDMETHOD(CreatePort)           (THIS_ REFCLSID rclsidPort, 
  299.                                            LPDMUS_PORTPARAMS pPortParams, 
  300.                                            LPDIRECTMUSICPORT *ppPort, 
  301.                                            LPUNKNOWN pUnkOuter) PURE;
  302.     STDMETHOD(EnumMasterClock)      (THIS_ DWORD dwIndex, 
  303.                                            LPDMUS_CLOCKINFO lpClockInfo) PURE;
  304.     STDMETHOD(GetMasterClock)       (THIS_ LPGUID pguidClock, 
  305.                                            IReferenceClock **ppReferenceClock) PURE;
  306.     STDMETHOD(SetMasterClock)       (THIS_ REFGUID rguidClock) PURE;
  307.     STDMETHOD(Activate)             (THIS_ BOOL fEnable) PURE;
  308.     STDMETHOD(GetDefaultPort)       (THIS_ LPGUID pguidPort) PURE;
  309.     STDMETHOD(SetDirectSound)       (THIS_ LPDIRECTSOUND pDirectSound,
  310.                                            HWND hWnd) PURE;
  311.     /*  IDirectMusic8 */
  312.     STDMETHOD(SetExternalMasterClock)
  313.                                     (THIS_ IReferenceClock *pClock) PURE;                                          
  314. };
  315. #undef  INTERFACE
  316. #define INTERFACE  IDirectMusicBuffer
  317. DECLARE_INTERFACE_(IDirectMusicBuffer, IUnknown)
  318. {
  319.     /*  IUnknown */
  320.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  321.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  322.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  323.     /*  IDirectMusicBuffer */
  324.     STDMETHOD(Flush)                (THIS) PURE;
  325.     STDMETHOD(TotalTime)            (THIS_ LPREFERENCE_TIME prtTime) PURE;
  326.     
  327.     STDMETHOD(PackStructured)       (THIS_ REFERENCE_TIME rt,
  328.                                            DWORD dwChannelGroup,
  329.                                            DWORD dwChannelMessage) PURE;
  330.     
  331.     STDMETHOD(PackUnstructured)     (THIS_ REFERENCE_TIME rt,
  332.                                            DWORD dwChannelGroup,
  333.                                            DWORD cb,
  334.                                            LPBYTE lpb) PURE;
  335.     
  336.     STDMETHOD(ResetReadPtr)         (THIS) PURE;
  337.     STDMETHOD(GetNextEvent)         (THIS_ LPREFERENCE_TIME prt,
  338.                                            LPDWORD pdwChannelGroup,
  339.                                            LPDWORD pdwLength,
  340.                                            LPBYTE *ppData) PURE;
  341.     STDMETHOD(GetRawBufferPtr)      (THIS_ LPBYTE *ppData) PURE;
  342.     STDMETHOD(GetStartTime)         (THIS_ LPREFERENCE_TIME prt) PURE;
  343.     STDMETHOD(GetUsedBytes)         (THIS_ LPDWORD pcb) PURE;
  344.     STDMETHOD(GetMaxBytes)          (THIS_ LPDWORD pcb) PURE;
  345.     STDMETHOD(GetBufferFormat)      (THIS_ LPGUID pGuidFormat) PURE;
  346.     STDMETHOD(SetStartTime)         (THIS_ REFERENCE_TIME rt) PURE;
  347.     STDMETHOD(SetUsedBytes)         (THIS_ DWORD cb) PURE;
  348. };
  349. typedef IDirectMusicBuffer IDirectMusicBuffer8;
  350. typedef IDirectMusicBuffer8 *LPDIRECTMUSICBUFFER8;
  351. #undef  INTERFACE
  352. #define INTERFACE  IDirectMusicInstrument
  353. DECLARE_INTERFACE_(IDirectMusicInstrument, IUnknown)
  354. {
  355.     /* IUnknown */
  356.     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID FAR *) PURE;
  357.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  358.     STDMETHOD_(ULONG,Release)           (THIS) PURE;
  359.     /* IDirectMusicInstrument */
  360.     STDMETHOD(GetPatch)                 (THIS_ DWORD* pdwPatch) PURE;
  361.     STDMETHOD(SetPatch)                 (THIS_ DWORD dwPatch) PURE;
  362. };
  363. typedef IDirectMusicInstrument IDirectMusicInstrument8;
  364. typedef IDirectMusicInstrument8 *LPDIRECTMUSICINSTRUMENT8;
  365. #undef  INTERFACE
  366. #define INTERFACE  IDirectMusicDownloadedInstrument
  367. DECLARE_INTERFACE_(IDirectMusicDownloadedInstrument, IUnknown)
  368. {
  369.     /* IUnknown */
  370.     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID FAR *) PURE;
  371.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  372.     STDMETHOD_(ULONG,Release)           (THIS) PURE;
  373.     /* IDirectMusicDownloadedInstrument */
  374.     /* None at this time */
  375. };
  376. typedef IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument8;
  377. typedef IDirectMusicDownloadedInstrument8 *LPDIRECTMUSICDOWNLOADEDINSTRUMENT8;
  378. #undef  INTERFACE
  379. #define INTERFACE  IDirectMusicCollection
  380. DECLARE_INTERFACE_(IDirectMusicCollection, IUnknown)
  381. {
  382.     /* IUnknown */
  383.     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID FAR *) PURE;
  384.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  385.     STDMETHOD_(ULONG,Release)           (THIS) PURE;
  386.     /* IDirectMusicCollection */
  387.     STDMETHOD(GetInstrument)            (THIS_ DWORD dwPatch, 
  388.                                                IDirectMusicInstrument** ppInstrument) PURE;
  389.     STDMETHOD(EnumInstrument)           (THIS_ DWORD dwIndex, 
  390.                                                DWORD* pdwPatch, 
  391.                                                LPWSTR pwszName, 
  392.                                                DWORD dwNameLen) PURE;
  393. };
  394. typedef IDirectMusicCollection IDirectMusicCollection8;
  395. typedef IDirectMusicCollection8 *LPDIRECTMUSICCOLLECTION8;
  396. #undef  INTERFACE
  397. #define INTERFACE  IDirectMusicDownload 
  398. DECLARE_INTERFACE_(IDirectMusicDownload , IUnknown)
  399. {
  400.     /* IUnknown */
  401.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  402.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  403.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  404.     /* IDirectMusicDownload */
  405.     STDMETHOD(GetBuffer)            (THIS_ void** ppvBuffer, 
  406.                                            DWORD* pdwSize) PURE;
  407. };
  408. typedef IDirectMusicDownload IDirectMusicDownload8;
  409. typedef IDirectMusicDownload8 *LPDIRECTMUSICDOWNLOAD8;
  410. #undef  INTERFACE
  411. #define INTERFACE  IDirectMusicPortDownload
  412. DECLARE_INTERFACE_(IDirectMusicPortDownload, IUnknown)
  413. {
  414.     /* IUnknown */
  415.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  416.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  417.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  418.     /* IDirectMusicPortDownload */
  419.     STDMETHOD(GetBuffer)            (THIS_ DWORD dwDLId, 
  420.                                            IDirectMusicDownload** ppIDMDownload) PURE;
  421.     STDMETHOD(AllocateBuffer)       (THIS_ DWORD dwSize, 
  422.                                            IDirectMusicDownload** ppIDMDownload) PURE;
  423.     STDMETHOD(GetDLId)              (THIS_ DWORD* pdwStartDLId, 
  424.                                            DWORD dwCount) PURE;
  425.     STDMETHOD(GetAppend)            (THIS_ DWORD* pdwAppend) PURE;
  426.     STDMETHOD(Download)             (THIS_ IDirectMusicDownload* pIDMDownload) PURE;
  427.     STDMETHOD(Unload)               (THIS_ IDirectMusicDownload* pIDMDownload) PURE;
  428. };
  429. typedef IDirectMusicPortDownload IDirectMusicPortDownload8;
  430. typedef IDirectMusicPortDownload8 *LPDIRECTMUSICPORTDOWNLOAD8;
  431. /* Standard values for voice priorities. Numerically higher priorities are higher in priority.
  432.  * These priorities are used to set the voice priority for all voices on a channel. They are
  433.  * used in the dwPriority parameter of IDirectMusicPort::GetPriority and returned in the
  434.  * lpwPriority parameter of pdwPriority.
  435.  *
  436.  * These priorities are shared with DirectSound.
  437.  */
  438. #ifndef _DIRECTAUDIO_PRIORITIES_DEFINED_
  439. #define _DIRECTAUDIO_PRIORITIES_DEFINED_
  440. #define DAUD_CRITICAL_VOICE_PRIORITY    (0xF0000000)
  441. #define DAUD_HIGH_VOICE_PRIORITY        (0xC0000000)
  442. #define DAUD_STANDARD_VOICE_PRIORITY    (0x80000000)
  443. #define DAUD_LOW_VOICE_PRIORITY         (0x40000000)
  444. #define DAUD_PERSIST_VOICE_PRIORITY     (0x10000000) 
  445. /* These are the default priorities assigned if not overridden. By default priorities are
  446.  * equal across channel groups (e.g. channel 5 on channel group 1 has the same priority as
  447.  * channel 5 on channel group 2).
  448.  *
  449.  * In accordance with DLS level 1, channel 10 has the highest priority, followed by 1 through 16
  450.  * except for 10.
  451.  */
  452. #define DAUD_CHAN1_VOICE_PRIORITY_OFFSET    (0x0000000E)
  453. #define DAUD_CHAN2_VOICE_PRIORITY_OFFSET    (0x0000000D)
  454. #define DAUD_CHAN3_VOICE_PRIORITY_OFFSET    (0x0000000C)
  455. #define DAUD_CHAN4_VOICE_PRIORITY_OFFSET    (0x0000000B)
  456. #define DAUD_CHAN5_VOICE_PRIORITY_OFFSET    (0x0000000A)
  457. #define DAUD_CHAN6_VOICE_PRIORITY_OFFSET    (0x00000009)
  458. #define DAUD_CHAN7_VOICE_PRIORITY_OFFSET    (0x00000008)
  459. #define DAUD_CHAN8_VOICE_PRIORITY_OFFSET    (0x00000007)
  460. #define DAUD_CHAN9_VOICE_PRIORITY_OFFSET    (0x00000006)
  461. #define DAUD_CHAN10_VOICE_PRIORITY_OFFSET   (0x0000000F)
  462. #define DAUD_CHAN11_VOICE_PRIORITY_OFFSET   (0x00000005)
  463. #define DAUD_CHAN12_VOICE_PRIORITY_OFFSET   (0x00000004)
  464. #define DAUD_CHAN13_VOICE_PRIORITY_OFFSET   (0x00000003)
  465. #define DAUD_CHAN14_VOICE_PRIORITY_OFFSET   (0x00000002)
  466. #define DAUD_CHAN15_VOICE_PRIORITY_OFFSET   (0x00000001)
  467. #define DAUD_CHAN16_VOICE_PRIORITY_OFFSET   (0x00000000)
  468.  
  469.  
  470. #define DAUD_CHAN1_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN1_VOICE_PRIORITY_OFFSET)
  471. #define DAUD_CHAN2_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN2_VOICE_PRIORITY_OFFSET)
  472. #define DAUD_CHAN3_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN3_VOICE_PRIORITY_OFFSET)
  473. #define DAUD_CHAN4_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN4_VOICE_PRIORITY_OFFSET)
  474. #define DAUD_CHAN5_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN5_VOICE_PRIORITY_OFFSET)
  475. #define DAUD_CHAN6_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN6_VOICE_PRIORITY_OFFSET)
  476. #define DAUD_CHAN7_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN7_VOICE_PRIORITY_OFFSET)
  477. #define DAUD_CHAN8_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN8_VOICE_PRIORITY_OFFSET)
  478. #define DAUD_CHAN9_DEF_VOICE_PRIORITY   (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN9_VOICE_PRIORITY_OFFSET)
  479. #define DAUD_CHAN10_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN10_VOICE_PRIORITY_OFFSET)
  480. #define DAUD_CHAN11_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN11_VOICE_PRIORITY_OFFSET)
  481. #define DAUD_CHAN12_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN12_VOICE_PRIORITY_OFFSET)
  482. #define DAUD_CHAN13_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN13_VOICE_PRIORITY_OFFSET)
  483. #define DAUD_CHAN14_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN14_VOICE_PRIORITY_OFFSET)
  484. #define DAUD_CHAN15_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN15_VOICE_PRIORITY_OFFSET)
  485. #define DAUD_CHAN16_DEF_VOICE_PRIORITY  (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN16_VOICE_PRIORITY_OFFSET)
  486. #endif  /* _DIRECTAUDIO_PRIORITIES_DEFINED_ */
  487. #undef  INTERFACE
  488. #define INTERFACE  IDirectMusicPort
  489. DECLARE_INTERFACE_(IDirectMusicPort, IUnknown)
  490. {
  491.     /*  IUnknown */
  492.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  493.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  494.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  495.     /*  IDirectMusicPort */
  496.     /*  */
  497.     STDMETHOD(PlayBuffer)           (THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE;
  498.     STDMETHOD(SetReadNotificationHandle) (THIS_ HANDLE hEvent) PURE;
  499.     STDMETHOD(Read)                 (THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE;
  500.     STDMETHOD(DownloadInstrument)   (THIS_ IDirectMusicInstrument *pInstrument, 
  501.                                      IDirectMusicDownloadedInstrument **ppDownloadedInstrument,
  502.                                      DMUS_NOTERANGE *pNoteRanges,
  503.                                      DWORD dwNumNoteRanges) PURE;
  504.     STDMETHOD(UnloadInstrument)     (THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument) PURE;
  505.     STDMETHOD(GetLatencyClock)      (THIS_ IReferenceClock **ppClock) PURE;
  506.     STDMETHOD(GetRunningStats)      (THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
  507.     STDMETHOD(Compact)              (THIS) PURE;
  508.     STDMETHOD(GetCaps)              (THIS_ LPDMUS_PORTCAPS pPortCaps) PURE;
  509.     STDMETHOD(DeviceIoControl)      (THIS_ DWORD dwIoControlCode, 
  510.                                            LPVOID lpInBuffer, 
  511.                                            DWORD nInBufferSize, 
  512.                                            LPVOID lpOutBuffer, 
  513.                                            DWORD nOutBufferSize, 
  514.                                            LPDWORD lpBytesReturned, 
  515.                                            LPOVERLAPPED lpOverlapped) PURE;
  516.     STDMETHOD(SetNumChannelGroups)  (THIS_ DWORD dwChannelGroups) PURE;
  517.     STDMETHOD(GetNumChannelGroups)  (THIS_ LPDWORD pdwChannelGroups) PURE;
  518.     STDMETHOD(Activate)             (THIS_ BOOL fActive) PURE;
  519.     STDMETHOD(SetChannelPriority)   (THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE;
  520.     STDMETHOD(GetChannelPriority)   (THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE;
  521.     STDMETHOD(SetDirectSound)       (THIS_ LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE;
  522.     STDMETHOD(GetFormat)            (THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) PURE;
  523. };
  524. typedef IDirectMusicPort IDirectMusicPort8;
  525. typedef IDirectMusicPort8 *LPDIRECTMUSICPORT8;
  526. #undef  INTERFACE
  527. #define INTERFACE  IDirectMusicThru
  528. DECLARE_INTERFACE_(IDirectMusicThru, IUnknown)
  529. {
  530.     /*  IUnknown */
  531.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  532.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  533.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  534.     
  535.     /* IDirectMusicThru 
  536.      */
  537.     STDMETHOD(ThruChannel)          (THIS_ DWORD dwSourceChannelGroup, 
  538.                                            DWORD dwSourceChannel, 
  539.                                            DWORD dwDestinationChannelGroup,
  540.                                            DWORD dwDestinationChannel,
  541.                                            LPDIRECTMUSICPORT pDestinationPort) PURE;
  542. };
  543. typedef IDirectMusicThru IDirectMusicThru8;
  544. typedef IDirectMusicThru8 *LPDIRECTMUSICTHRU8;
  545. #ifndef __IReferenceClock_INTERFACE_DEFINED__
  546. #define __IReferenceClock_INTERFACE_DEFINED__
  547. DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
  548. #undef  INTERFACE
  549. #define INTERFACE  IReferenceClock
  550. DECLARE_INTERFACE_(IReferenceClock, IUnknown)
  551. {
  552.     /*  IUnknown */
  553.     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID FAR *) PURE;
  554.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  555.     STDMETHOD_(ULONG,Release)           (THIS) PURE;
  556.     /*  IReferenceClock */
  557.     /*  */
  558.     
  559.     /*  get the time now */
  560.     STDMETHOD(GetTime)                  (THIS_ REFERENCE_TIME *pTime) PURE;
  561.     /*  ask for an async notification that a time has elapsed */
  562.     STDMETHOD(AdviseTime)               (THIS_ REFERENCE_TIME baseTime,         /*  base time */
  563.                                                REFERENCE_TIME streamTime,       /*  stream offset time */
  564.                                                HANDLE hEvent,                   /*  advise via this event */
  565.                                                DWORD * pdwAdviseCookie) PURE;   /*  where your cookie goes */
  566.     /*  ask for an async periodic notification that a time has elapsed */
  567.     STDMETHOD(AdvisePeriodic)           (THIS_ REFERENCE_TIME startTime,        /*  starting at this time */
  568.                                                REFERENCE_TIME periodTime,       /*  time between notifications */
  569.                                                HANDLE hSemaphore,               /*  advise via a semaphore */
  570.                                                DWORD * pdwAdviseCookie) PURE;   /*  where your cookie goes */
  571.     /*  cancel a request for notification */
  572.     STDMETHOD(Unadvise)                 (THIS_ DWORD dwAdviseCookie) PURE;
  573. };
  574. #endif /* __IReferenceClock_INTERFACE_DEFINED__ */
  575. DEFINE_GUID(CLSID_DirectMusic,0x636b9f10,0x0c7d,0x11d1,0x95,0xb2,0x00,0x20,0xaf,0xdc,0x74,0x21);
  576. DEFINE_GUID(CLSID_DirectMusicCollection,0x480ff4b0, 0x28b2, 0x11d1, 0xbe, 0xf7, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef);
  577. DEFINE_GUID(CLSID_DirectMusicSynth,0x58C2B4D0,0x46E7,0x11D1,0x89,0xAC,0x00,0xA0,0xC9,0x05,0x41,0x29);
  578. DEFINE_GUID(IID_IDirectMusic,0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12);
  579. DEFINE_GUID(IID_IDirectMusicBuffer,0xd2ac2878, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  580. DEFINE_GUID(IID_IDirectMusicPort, 0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
  581. DEFINE_GUID(IID_IDirectMusicThru, 0xced153e7, 0x3606, 0x11d2, 0xb9, 0xf9, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  582. DEFINE_GUID(IID_IDirectMusicPortDownload,0xd2ac287a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  583. DEFINE_GUID(IID_IDirectMusicDownload,0xd2ac287b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  584. DEFINE_GUID(IID_IDirectMusicCollection,0xd2ac287c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  585. DEFINE_GUID(IID_IDirectMusicInstrument,0xd2ac287d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  586. DEFINE_GUID(IID_IDirectMusicDownloadedInstrument,0xd2ac287e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  587. /* Alternate interface ID for IID_IDirectMusic, available in DX7 release and after. */
  588. DEFINE_GUID(IID_IDirectMusic2,0x6fc2cae1, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  589. DEFINE_GUID(IID_IDirectMusic8,0x2d3629f7,0x813d,0x4939,0x85,0x08,0xf0,0x5c,0x6b,0x75,0xfd,0x97);
  590. #define IID_IDirectMusicThru8 IID_IDirectMusicThru
  591. #define IID_IDirectMusicPortDownload8 IID_IDirectMusicPortDownload
  592. #define IID_IDirectMusicDownload8 IID_IDirectMusicDownload
  593. #define IID_IDirectMusicCollection8 IID_IDirectMusicCollection
  594. #define IID_IDirectMusicInstrument8 IID_IDirectMusicInstrument
  595. #define IID_IDirectMusicDownloadedInstrument8 IID_IDirectMusicDownloadedInstrument
  596. #define IID_IDirectMusicPort8 IID_IDirectMusicPort
  597. /* Property Query GUID_DMUS_PROP_GM_Hardware - Local GM set, no need to download
  598.  * Property Query GUID_DMUS_PROP_GS_Hardware - Local GS set, no need to download
  599.  * Property Query GUID_DMUS_PROP_XG_Hardware - Local XG set, no need to download
  600.  * Property Query GUID_DMUS_PROP_DLS1        - Support DLS level 1
  601.  * Property Query GUID_DMUS_PROP_INSTRUMENT2 - Support new INSTRUMENT2 download format
  602.  * Property Query GUID_DMUS_PROP_XG_Capable  - Support minimum requirements of XG
  603.  * Property Query GUID_DMUS_PROP_GS_Capable  - Support minimum requirements of GS
  604.  * Property Query GUID_DMUS_PROP_SynthSink_DSOUND - Synthsink talks to DSound
  605.  * Property Query GUID_DMUS_PROP_SynthSink_WAVE - Synthsink talks to Wave device
  606.  *
  607.  * Item 0: Supported
  608.  * Returns a DWORD which is non-zero if the feature is supported
  609.  */
  610. DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware, 0x178f2f24, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  611. DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware, 0x178f2f25, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  612. DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware, 0x178f2f26, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  613. DEFINE_GUID(GUID_DMUS_PROP_XG_Capable,  0x6496aba1, 0x61b0, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  614. DEFINE_GUID(GUID_DMUS_PROP_GS_Capable,  0x6496aba2, 0x61b0, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  615. DEFINE_GUID(GUID_DMUS_PROP_DLS1,        0x178f2f27, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  616. DEFINE_GUID(GUID_DMUS_PROP_DLS2,        0xf14599e5, 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  617. DEFINE_GUID(GUID_DMUS_PROP_INSTRUMENT2, 0x865fd372, 0x9f67, 0x11d2, 0x87, 0x2a, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  618. DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND,0xaa97844, 0xc877, 0x11d1, 0x87, 0xc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  619. DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE,0xaa97845, 0xc877, 0x11d1, 0x87, 0xc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  620. DEFINE_GUID(GUID_DMUS_PROP_SampleMemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  621. DEFINE_GUID(GUID_DMUS_PROP_SamplePlaybackRate, 0x2a91f713, 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
  622. /* Property Get/Set GUID_DMUS_PROP_WriteLatency
  623.  *
  624.  * Item 0: Synth buffer write latency, in milliseconds
  625.  * Get/Set SynthSink latency, the average time after the play head that the next buffer gets written.
  626.  */
  627. DEFINE_GUID(GUID_DMUS_PROP_WriteLatency,0x268a0fa0, 0x60f2, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  628. /* Property Get/Set GUID_DMUS_PROP_WritePeriod
  629.  *
  630.  * Item 0: Synth buffer write period, in milliseconds
  631.  * Get/Set SynthSink buffer write period, time span between successive writes.
  632.  */
  633. DEFINE_GUID(GUID_DMUS_PROP_WritePeriod,0x268a0fa1, 0x60f2, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  634. /* Property Get GUID_DMUS_PROP_MemorySize
  635.  *
  636.  * Item 0: Memory size
  637.  * Returns a DWORD containing the total number of bytes of sample RAM
  638.  */
  639. DEFINE_GUID(GUID_DMUS_PROP_MemorySize,  0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  640. /* Property Set GUID_DMUS_PROP_WavesReverb
  641.  *
  642.  * Item 0: DMUS_WAVES_REVERB structure
  643.  * Sets reverb parameters
  644.  */
  645. DEFINE_GUID(GUID_DMUS_PROP_WavesReverb,0x4cb5622, 0x32e5, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  646. /* Property Set GUID_DMUS_PROP_Effects
  647.  *
  648.  * Item 0: DWORD with effects flags. 
  649.  * Get/Set effects bits, same as dwEffectFlags in DMUS_PORTPARAMS and DMUS_PORTCAPS:
  650.  * DMUS_EFFECT_NONE 
  651.  * DMUS_EFFECT_REVERB 
  652.  * DMUS_EFFECT_CHORUS 
  653.  */
  654. DEFINE_GUID(GUID_DMUS_PROP_Effects, 0xcda8d611, 0x684a, 0x11d2, 0x87, 0x1e, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  655. /* Property Set GUID_DMUS_PROP_LegacyCaps
  656.  *
  657.  * Item 0: The MIDINCAPS or MIDIOUTCAPS which describes the port's underlying WinMM device. This property is only supported
  658.  * by ports which wrap WinMM devices.
  659.  */
  660. DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps,0xcfa7cdc2, 0x00a1, 0x11d2, 0xaa, 0xd5, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  661. /* Property Set GUID_DMUS_PROP_Volume
  662.  *
  663.  * Item 0: A long which contains an offset, in 1/100 dB, to be added to the final volume
  664.  *
  665.  */
  666. DEFINE_GUID(GUID_DMUS_PROP_Volume, 0xfedfae25L, 0xe46e, 0x11d1, 0xaa, 0xce, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
  667. /* Min and Max values for setting volume with GUID_DMUS_PROP_Volume */
  668. #define DMUS_VOLUME_MAX     2000        /* +20 dB */
  669. #define DMUS_VOLUME_MIN   -20000        /* -200 dB */
  670. #ifdef __cplusplus
  671. }; /* extern "C" */
  672. #endif
  673. #include <poppack.h>
  674. #endif /* #ifndef _DMUSICC_ */