dmusicc.h 36 KB

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