dsound.h 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191
  1. /*
  2. * Copyright (C) the Wine project
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __WINE_DSOUND_H
  19. #define __WINE_DSOUND_H
  20. #ifndef DIRECTSOUND_VERSION
  21. #define DIRECTSOUND_VERSION 0x0900
  22. #endif
  23. #define COM_NO_WINDOWS_H
  24. #include <objbase.h>
  25. #include <float.h>
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif /* defined(__cplusplus) */
  29. #ifndef DX_SHARED_DEFINES
  30. typedef float D3DVALUE, *LPD3DVALUE;
  31. #ifndef D3DCOLOR_DEFINED
  32. typedef DWORD D3DCOLOR, *LPD3DCOLOR;
  33. #define D3DCOLOR_DEFINED
  34. #endif
  35. #ifndef D3DVECTOR_DEFINED
  36. typedef struct _D3DVECTOR {
  37. float x;
  38. float y;
  39. float z;
  40. } D3DVECTOR, *LPD3DVECTOR;
  41. #define D3DVECTOR_DEFINED
  42. #endif
  43. #define DX_SHARED_DEFINES
  44. #endif /* DX_SHARED_DEFINES */
  45. /*****************************************************************************
  46. * Predeclare the interfaces
  47. */
  48. DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
  49. DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
  50. DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  51. DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
  52. DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
  53. DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
  54. typedef struct IDirectSound IDirectSound,*LPDIRECTSOUND,**LPLPDIRECTSOUND;
  55. DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66);
  56. typedef struct IDirectSound8 IDirectSound8,*LPDIRECTSOUND8,**LPLPDIRECTSOUND8;
  57. DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
  58. typedef struct IDirectSoundBuffer IDirectSoundBuffer,*LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
  59. DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
  60. typedef struct IDirectSoundBuffer8 IDirectSoundBuffer8,*LPDIRECTSOUNDBUFFER8,**LPLPDIRECTSOUNDBUFFER8;
  61. DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
  62. typedef struct IDirectSoundNotify IDirectSoundNotify,*LPDIRECTSOUNDNOTIFY,**LPLPDIRECTSOUNDNOTIFY;
  63. #define IID_IDirectSoundNotify8 IID_IDirectSoundNotify
  64. DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
  65. typedef struct IDirectSound3DListener IDirectSound3DListener,*LPDIRECTSOUND3DLISTENER,**LPLPDIRECTSOUND3DLISTENER;
  66. DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
  67. typedef struct IDirectSound3DBuffer IDirectSound3DBuffer,*LPDIRECTSOUND3DBUFFER,**LPLPDIRECTSOUND3DBUFFER;
  68. DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
  69. typedef struct IDirectSoundCapture IDirectSoundCapture,*LPDIRECTSOUNDCAPTURE,**LPLPDIRECTSOUNDCAPTURE;
  70. #define IID_IDirectSoundCapture8 IID_IDirectSoundCapture
  71. typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8,**LPLPDIRECTSOUNDCAPTURE8;
  72. DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
  73. typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer,*LPDIRECTSOUNDCAPTUREBUFFER,**LPLPDIRECTSOUNDCAPTUREBUFFER;
  74. DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
  75. typedef struct IDirectSoundCaptureBuffer8 IDirectSoundCaptureBuffer8,*LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8;
  76. DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
  77. typedef struct IDirectSoundFullDuplex IDirectSoundFullDuplex,*LPDIRECTSOUNDFULLDUPLEX,**LPLPDIRECTSOUNDFULLDUPLEX;
  78. #define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex
  79. DEFINE_GUID(DSDEVID_DefaultPlayback, 0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
  80. DEFINE_GUID(DSDEVID_DefaultCapture, 0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
  81. DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
  82. DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
  83. DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
  84. #define _FACDS 0x878
  85. #define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
  86. #define DS_OK 0
  87. #define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10)
  88. #define DS_INCOMPLETE MAKE_HRESULT(0, _FACDS, 20)
  89. #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
  90. #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
  91. #define DSERR_INVALIDPARAM E_INVALIDARG
  92. #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
  93. #define DSERR_GENERIC E_FAIL
  94. #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
  95. #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
  96. #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
  97. #define DSERR_UNSUPPORTED E_NOTIMPL
  98. #define DSERR_NODRIVER MAKE_DSHRESULT(120)
  99. #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
  100. #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
  101. #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
  102. #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
  103. #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
  104. #define DSERR_NOINTERFACE E_NOINTERFACE
  105. #define DSERR_ACCESSDENIED E_ACCESSDENIED
  106. #define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180)
  107. #define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190)
  108. #define DSERR_SENDLOOP MAKE_DSHRESULT(200)
  109. #define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210)
  110. #define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220)
  111. #define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449)
  112. #define DSCAPS_PRIMARYMONO 0x00000001
  113. #define DSCAPS_PRIMARYSTEREO 0x00000002
  114. #define DSCAPS_PRIMARY8BIT 0x00000004
  115. #define DSCAPS_PRIMARY16BIT 0x00000008
  116. #define DSCAPS_CONTINUOUSRATE 0x00000010
  117. #define DSCAPS_EMULDRIVER 0x00000020
  118. #define DSCAPS_CERTIFIED 0x00000040
  119. #define DSCAPS_SECONDARYMONO 0x00000100
  120. #define DSCAPS_SECONDARYSTEREO 0x00000200
  121. #define DSCAPS_SECONDARY8BIT 0x00000400
  122. #define DSCAPS_SECONDARY16BIT 0x00000800
  123. #define DSSCL_NORMAL 1
  124. #define DSSCL_PRIORITY 2
  125. #define DSSCL_EXCLUSIVE 3
  126. #define DSSCL_WRITEPRIMARY 4
  127. typedef struct _DSCAPS
  128. {
  129. DWORD dwSize;
  130. DWORD dwFlags;
  131. DWORD dwMinSecondarySampleRate;
  132. DWORD dwMaxSecondarySampleRate;
  133. DWORD dwPrimaryBuffers;
  134. DWORD dwMaxHwMixingAllBuffers;
  135. DWORD dwMaxHwMixingStaticBuffers;
  136. DWORD dwMaxHwMixingStreamingBuffers;
  137. DWORD dwFreeHwMixingAllBuffers;
  138. DWORD dwFreeHwMixingStaticBuffers;
  139. DWORD dwFreeHwMixingStreamingBuffers;
  140. DWORD dwMaxHw3DAllBuffers;
  141. DWORD dwMaxHw3DStaticBuffers;
  142. DWORD dwMaxHw3DStreamingBuffers;
  143. DWORD dwFreeHw3DAllBuffers;
  144. DWORD dwFreeHw3DStaticBuffers;
  145. DWORD dwFreeHw3DStreamingBuffers;
  146. DWORD dwTotalHwMemBytes;
  147. DWORD dwFreeHwMemBytes;
  148. DWORD dwMaxContigFreeHwMemBytes;
  149. DWORD dwUnlockTransferRateHwBuffers;
  150. DWORD dwPlayCpuOverheadSwBuffers;
  151. DWORD dwReserved1;
  152. DWORD dwReserved2;
  153. } DSCAPS,*LPDSCAPS;
  154. typedef const DSCAPS *LPCDSCAPS;
  155. #define DSBPLAY_LOOPING 0x00000001
  156. #define DSBPLAY_LOCHARDWARE 0x00000002
  157. #define DSBPLAY_LOCSOFTWARE 0x00000004
  158. #define DSBPLAY_TERMINATEBY_TIME 0x00000008
  159. #define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010
  160. #define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020
  161. #define DSBSTATUS_PLAYING 0x00000001
  162. #define DSBSTATUS_BUFFERLOST 0x00000002
  163. #define DSBSTATUS_LOOPING 0x00000004
  164. #define DSBSTATUS_LOCHARDWARE 0x00000008
  165. #define DSBSTATUS_LOCSOFTWARE 0x00000010
  166. #define DSBSTATUS_TERMINATED 0x00000020
  167. #define DSBLOCK_FROMWRITECURSOR 0x00000001
  168. #define DSBLOCK_ENTIREBUFFER 0x00000002
  169. #define DSBCAPS_PRIMARYBUFFER 0x00000001
  170. #define DSBCAPS_STATIC 0x00000002
  171. #define DSBCAPS_LOCHARDWARE 0x00000004
  172. #define DSBCAPS_LOCSOFTWARE 0x00000008
  173. #define DSBCAPS_CTRL3D 0x00000010
  174. #define DSBCAPS_CTRLFREQUENCY 0x00000020
  175. #define DSBCAPS_CTRLPAN 0x00000040
  176. #define DSBCAPS_CTRLVOLUME 0x00000080
  177. #define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */
  178. #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
  179. #define DSBCAPS_CTRLFX 0x00000200
  180. #define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */
  181. #define DSBCAPS_STICKYFOCUS 0x00004000
  182. #define DSBCAPS_GLOBALFOCUS 0x00008000
  183. #define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/
  184. #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
  185. #define DSBCAPS_LOCDEFER 0x00040000
  186. #define DSBSIZE_MIN 4
  187. #define DSBSIZE_MAX 0xFFFFFFF
  188. #define DSBPAN_LEFT -10000
  189. #define DSBPAN_CENTER 0
  190. #define DSBPAN_RIGHT 10000
  191. #define DSBVOLUME_MAX 0
  192. #define DSBVOLUME_MIN -10000
  193. #define DSBFREQUENCY_MIN 100
  194. #define DSBFREQUENCY_MAX 200000
  195. #define DSBFREQUENCY_ORIGINAL 0
  196. typedef struct _DSBCAPS
  197. {
  198. DWORD dwSize;
  199. DWORD dwFlags;
  200. DWORD dwBufferBytes;
  201. DWORD dwUnlockTransferRate;
  202. DWORD dwPlayCpuOverhead;
  203. } DSBCAPS,*LPDSBCAPS;
  204. typedef const DSBCAPS *LPCDSBCAPS;
  205. #define DSSCL_NORMAL 1
  206. #define DSSCL_PRIORITY 2
  207. #define DSSCL_EXCLUSIVE 3
  208. #define DSSCL_WRITEPRIMARY 4
  209. typedef struct _DSEFFECTDESC
  210. {
  211. DWORD dwSize;
  212. DWORD dwFlags;
  213. GUID guidDSFXClass;
  214. DWORD_PTR dwReserved1;
  215. DWORD_PTR dwReserved2;
  216. } DSEFFECTDESC,*LPDSEFFECTDESC;
  217. typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
  218. #define DSFX_LOCHARDWARE 0x00000001
  219. #define DSFX_LOCSOFTWARE 0x00000002
  220. enum
  221. {
  222. DSFXR_PRESENT,
  223. DSFXR_LOCHARDWARE,
  224. DSFXR_LOCSOFTWARE,
  225. DSFXR_UNALLOCATED,
  226. DSFXR_FAILED,
  227. DSFXR_UNKNOWN,
  228. DSFXR_SENDLOOP
  229. };
  230. typedef struct _DSBUFFERDESC1
  231. {
  232. DWORD dwSize;
  233. DWORD dwFlags;
  234. DWORD dwBufferBytes;
  235. DWORD dwReserved;
  236. LPWAVEFORMATEX lpwfxFormat;
  237. } DSBUFFERDESC1,*LPDSBUFFERDESC1;
  238. typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
  239. typedef struct _DSBUFFERDESC
  240. {
  241. DWORD dwSize;
  242. DWORD dwFlags;
  243. DWORD dwBufferBytes;
  244. DWORD dwReserved;
  245. LPWAVEFORMATEX lpwfxFormat;
  246. GUID guid3DAlgorithm;
  247. } DSBUFFERDESC,*LPDSBUFFERDESC;
  248. typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
  249. typedef struct _DSBPOSITIONNOTIFY
  250. {
  251. DWORD dwOffset;
  252. HANDLE hEventNotify;
  253. } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
  254. typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
  255. #define DSSPEAKER_HEADPHONE 1
  256. #define DSSPEAKER_MONO 2
  257. #define DSSPEAKER_QUAD 3
  258. #define DSSPEAKER_STEREO 4
  259. #define DSSPEAKER_SURROUND 5
  260. #define DSSPEAKER_5POINT1 6
  261. #define DSSPEAKER_7POINT1 7
  262. #define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */
  263. #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */
  264. #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
  265. #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
  266. #define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
  267. #define DSSPEAKER_CONFIG(a) ((BYTE)(a))
  268. #define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
  269. #define DS_CERTIFIED 0x00000000
  270. #define DS_UNCERTIFIED 0x00000001
  271. typedef struct _DSCEFFECTDESC
  272. {
  273. DWORD dwSize;
  274. DWORD dwFlags;
  275. GUID guidDSCFXClass;
  276. GUID guidDSCFXInstance;
  277. DWORD dwReserved1;
  278. DWORD dwReserved2;
  279. } DSCEFFECTDESC, *LPDSCEFFECTDESC;
  280. typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
  281. #define DSCFX_LOCHARDWARE 0x00000001
  282. #define DSCFX_LOCSOFTWARE 0x00000002
  283. #define DSCFXR_LOCHARDWARE 0x00000010
  284. #define DSCFXR_LOCSOFTWARE 0x00000020
  285. typedef struct _DSCBUFFERDESC1
  286. {
  287. DWORD dwSize;
  288. DWORD dwFlags;
  289. DWORD dwBufferBytes;
  290. DWORD dwReserved;
  291. LPWAVEFORMATEX lpwfxFormat;
  292. } DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
  293. typedef struct _DSCBUFFERDESC
  294. {
  295. DWORD dwSize;
  296. DWORD dwFlags;
  297. DWORD dwBufferBytes;
  298. DWORD dwReserved;
  299. LPWAVEFORMATEX lpwfxFormat;
  300. DWORD dwFXCount;
  301. LPDSCEFFECTDESC lpDSCFXDesc;
  302. } DSCBUFFERDESC, *LPDSCBUFFERDESC;
  303. typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
  304. typedef struct _DSCCAPS
  305. {
  306. DWORD dwSize;
  307. DWORD dwFlags;
  308. DWORD dwFormats;
  309. DWORD dwChannels;
  310. } DSCCAPS, *LPDSCCAPS;
  311. typedef const DSCCAPS *LPCDSCCAPS;
  312. typedef struct _DSCBCAPS
  313. {
  314. DWORD dwSize;
  315. DWORD dwFlags;
  316. DWORD dwBufferBytes;
  317. DWORD dwReserved;
  318. } DSCBCAPS, *LPDSCBCAPS;
  319. typedef const DSCBCAPS *LPCDSCBCAPS;
  320. #define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER
  321. #define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED
  322. #define DSCCAPS_MULTIPLECAPTURE 0x00000001
  323. #define DSCBCAPS_WAVEMAPPED 0x80000000
  324. #define DSCBCAPS_CTRLFX 0x00000200
  325. #define DSCBLOCK_ENTIREBUFFER 0x00000001
  326. #define DSCBSTART_LOOPING 0x00000001
  327. #define DSCBPN_OFFSET_STOP 0xffffffff
  328. #define DSCBSTATUS_CAPTURING 0x00000001
  329. #define DSCBSTATUS_LOOPING 0x00000002
  330. #ifndef __LPCGUID_DEFINED__
  331. #define __LPCGUID_DEFINED__
  332. typedef const GUID *LPCGUID;
  333. #endif
  334. typedef LPVOID* LPLPVOID;
  335. typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
  336. typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
  337. extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter);
  338. extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
  339. extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
  340. extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
  341. extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
  342. extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
  343. extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter);
  344. extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC8, LPUNKNOWN pUnkOuter);
  345. extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
  346. LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel,
  347. LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
  348. #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
  349. extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest);
  350. /*****************************************************************************
  351. * IDirectSound interface
  352. */
  353. #define INTERFACE IDirectSound
  354. DECLARE_INTERFACE_(IDirectSound,IUnknown)
  355. {
  356. /*** IUnknown methods ***/
  357. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  358. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  359. STDMETHOD_(ULONG,Release)(THIS) PURE;
  360. /*** IDirectSound methods ***/
  361. STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
  362. STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
  363. STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
  364. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
  365. STDMETHOD(Compact)(THIS) PURE;
  366. STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
  367. STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
  368. STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
  369. };
  370. #undef INTERFACE
  371. #if !defined(__cplusplus) || defined(CINTERFACE)
  372. /*** IUnknown methods ***/
  373. #define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  374. #define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
  375. #define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
  376. /*** IDirectSound methods ***/
  377. #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
  378. #define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  379. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
  380. #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  381. #define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
  382. #define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
  383. #define IDirectSound_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
  384. #define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  385. #else
  386. /*** IUnknown methods ***/
  387. #define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  388. #define IDirectSound_AddRef(p) (p)->AddRef()
  389. #define IDirectSound_Release(p) (p)->Release()
  390. /*** IDirectSound methods ***/
  391. #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
  392. #define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
  393. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
  394. #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  395. #define IDirectSound_Compact(p) (p)->Compact()
  396. #define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
  397. #define IDirectSound_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
  398. #define IDirectSound_Initialize(p,a) (p)->Initialize(a)
  399. #endif
  400. /*****************************************************************************
  401. * IDirectSound8 interface
  402. */
  403. #define INTERFACE IDirectSound8
  404. DECLARE_INTERFACE_(IDirectSound8,IUnknown)
  405. {
  406. /*** IUnknown methods ***/
  407. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  408. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  409. STDMETHOD_(ULONG,Release)(THIS) PURE;
  410. /*** IDirectSound8 methods ***/
  411. STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
  412. STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
  413. STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
  414. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
  415. STDMETHOD(Compact)(THIS) PURE;
  416. STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
  417. STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
  418. STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
  419. STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE;
  420. };
  421. #undef INTERFACE
  422. #if !defined(__cplusplus) || defined(CINTERFACE)
  423. /*** IUnknown methods ***/
  424. #define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  425. #define IDirectSound8_AddRef(p) (p)->lpVtbl->AddRef(p)
  426. #define IDirectSound8_Release(p) (p)->lpVtbl->Release(p)
  427. /*** IDirectSound methods ***/
  428. #define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
  429. #define IDirectSound8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  430. #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
  431. #define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  432. #define IDirectSound8_Compact(p) (p)->lpVtbl->Compact(p)
  433. #define IDirectSound8_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
  434. #define IDirectSound8_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
  435. #define IDirectSound8_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  436. /*** IDirectSound8 methods ***/
  437. #define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a)
  438. #else
  439. /*** IUnknown methods ***/
  440. #define IDirectSound8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  441. #define IDirectSound8_AddRef(p) (p)->AddRef()
  442. #define IDirectSound8_Release(p) (p)->Release()
  443. /*** IDirectSound methods ***/
  444. #define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
  445. #define IDirectSound8_GetCaps(p,a) (p)->GetCaps(a)
  446. #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
  447. #define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  448. #define IDirectSound8_Compact(p) (p)->Compact()
  449. #define IDirectSound8_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
  450. #define IDirectSound8_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
  451. #define IDirectSound8_Initialize(p,a) (p)->Initialize(a)
  452. /*** IDirectSound8 methods ***/
  453. #define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a)
  454. #endif
  455. /*****************************************************************************
  456. * IDirectSoundBuffer interface
  457. */
  458. #define INTERFACE IDirectSoundBuffer
  459. DECLARE_INTERFACE_(IDirectSoundBuffer,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. /*** IDirectSoundBuffer methods ***/
  466. STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
  467. STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
  468. STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
  469. STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
  470. STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
  471. STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
  472. STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
  473. STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
  474. STDMETHOD(Lock)(THIS_ DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
  475. STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
  476. STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
  477. STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
  478. STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
  479. STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
  480. STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
  481. STDMETHOD(Stop)(THIS) PURE;
  482. STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioPtr2) PURE;
  483. STDMETHOD(Restore)(THIS) PURE;
  484. };
  485. #undef INTERFACE
  486. #if !defined(__cplusplus) || defined(CINTERFACE)
  487. /*** IUnknown methods ***/
  488. #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  489. #define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  490. #define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
  491. /*** IDirectSoundBuffer methods ***/
  492. #define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  493. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  494. #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  495. #define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
  496. #define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
  497. #define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
  498. #define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  499. #define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  500. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  501. #define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
  502. #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
  503. #define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
  504. #define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
  505. #define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
  506. #define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
  507. #define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
  508. #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  509. #define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
  510. #else
  511. /*** IUnknown methods ***/
  512. #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  513. #define IDirectSoundBuffer_AddRef(p) (p)->AddRef()
  514. #define IDirectSoundBuffer_Release(p) (p)->Release()
  515. /*** IDirectSoundBuffer methods ***/
  516. #define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
  517. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  518. #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  519. #define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
  520. #define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
  521. #define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
  522. #define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
  523. #define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  524. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  525. #define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
  526. #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
  527. #define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
  528. #define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
  529. #define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
  530. #define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
  531. #define IDirectSoundBuffer_Stop(p) (p)->Stop()
  532. #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  533. #define IDirectSoundBuffer_Restore(p) (p)->Restore()
  534. #endif
  535. /*****************************************************************************
  536. * IDirectSoundBuffer8 interface
  537. */
  538. #define INTERFACE IDirectSoundBuffer8
  539. DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown)
  540. {
  541. /*** IUnknown methods ***/
  542. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  543. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  544. STDMETHOD_(ULONG,Release)(THIS) PURE;
  545. /*** IDirectSoundBuffer8 methods ***/
  546. STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
  547. STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
  548. STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
  549. STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
  550. STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
  551. STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
  552. STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
  553. STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
  554. STDMETHOD(Lock)(THIS_ DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
  555. STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
  556. STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
  557. STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
  558. STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
  559. STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
  560. STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
  561. STDMETHOD(Stop)(THIS) PURE;
  562. STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioPtr2) PURE;
  563. STDMETHOD(Restore)(THIS) PURE;
  564. STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
  565. STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
  566. STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
  567. };
  568. #undef INTERFACE
  569. #if !defined(__cplusplus) || defined(CINTERFACE)
  570. /*** IUnknown methods ***/
  571. #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  572. #define IDirectSoundBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
  573. #define IDirectSoundBuffer8_Release(p) (p)->lpVtbl->Release(p)
  574. /*** IDirectSoundBuffer methods ***/
  575. #define IDirectSoundBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  576. #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  577. #define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  578. #define IDirectSoundBuffer8_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
  579. #define IDirectSoundBuffer8_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
  580. #define IDirectSoundBuffer8_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
  581. #define IDirectSoundBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  582. #define IDirectSoundBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  583. #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  584. #define IDirectSoundBuffer8_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
  585. #define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
  586. #define IDirectSoundBuffer8_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
  587. #define IDirectSoundBuffer8_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
  588. #define IDirectSoundBuffer8_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
  589. #define IDirectSoundBuffer8_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
  590. #define IDirectSoundBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
  591. #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  592. #define IDirectSoundBuffer8_Restore(p) (p)->lpVtbl->Restore(p)
  593. /*** IDirectSoundBuffer8 methods ***/
  594. #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c)
  595. #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c)
  596. #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
  597. #else
  598. /*** IUnknown methods ***/
  599. #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  600. #define IDirectSoundBuffer8_AddRef(p) (p)->AddRef()
  601. #define IDirectSoundBuffer8_Release(p) (p)->Release()
  602. /*** IDirectSoundBuffer methods ***/
  603. #define IDirectSoundBuffer8_GetCaps(p,a) (p)->GetCaps(a)
  604. #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  605. #define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  606. #define IDirectSoundBuffer8_GetVolume(p,a) (p)->GetVolume(a)
  607. #define IDirectSoundBuffer8_GetPan(p,a) (p)->GetPan(a)
  608. #define IDirectSoundBuffer8_GetFrequency(p,a) (p)->GetFrequency(a)
  609. #define IDirectSoundBuffer8_GetStatus(p,a) (p)->GetStatus(a)
  610. #define IDirectSoundBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
  611. #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  612. #define IDirectSoundBuffer8_Play(p,a,b,c) (p)->Play(a,b,c)
  613. #define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
  614. #define IDirectSoundBuffer8_SetFormat(p,a) (p)->SetFormat(a)
  615. #define IDirectSoundBuffer8_SetVolume(p,a) (p)->SetVolume(a)
  616. #define IDirectSoundBuffer8_SetPan(p,a) (p)->SetPan(a)
  617. #define IDirectSoundBuffer8_SetFrequency(p,a) (p)->SetFrequency(a)
  618. #define IDirectSoundBuffer8_Stop(p) (p)->Stop()
  619. #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  620. #define IDirectSoundBuffer8_Restore(p) (p)->Restore()
  621. /*** IDirectSoundBuffer8 methods ***/
  622. #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c)
  623. #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c)
  624. #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
  625. #endif
  626. /*****************************************************************************
  627. * IDirectSoundCapture interface
  628. */
  629. #define INTERFACE IDirectSoundCapture
  630. DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown)
  631. {
  632. /*** IUnknown methods ***/
  633. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  634. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  635. STDMETHOD_(ULONG,Release)(THIS) PURE;
  636. /*** IDirectSoundCapture methods ***/
  637. STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE;
  638. STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE;
  639. STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE;
  640. };
  641. #undef INTERFACE
  642. #if !defined(__cplusplus) || defined(CINTERFACE)
  643. /*** IUnknown methods ***/
  644. #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  645. #define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p)
  646. #define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p)
  647. /*** IDirectSoundCapture methods ***/
  648. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
  649. #define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  650. #define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  651. #else
  652. /*** IUnknown methods ***/
  653. #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  654. #define IDirectSoundCapture_AddRef(p) (p)->AddRef()
  655. #define IDirectSoundCapture_Release(p) (p)->Release()
  656. /*** IDirectSoundCapture methods ***/
  657. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
  658. #define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
  659. #define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
  660. #endif
  661. /*****************************************************************************
  662. * IDirectSoundCaptureBuffer interface
  663. */
  664. #define INTERFACE IDirectSoundCaptureBuffer
  665. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,IUnknown)
  666. {
  667. /*** IUnknown methods ***/
  668. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  669. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  670. STDMETHOD_(ULONG,Release)(THIS) PURE;
  671. /*** IDirectSoundCaptureBuffer methods ***/
  672. STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
  673. STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
  674. STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
  675. STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
  676. STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
  677. STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
  678. STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
  679. STDMETHOD(Stop)(THIS) PURE;
  680. STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
  681. };
  682. #undef INTERFACE
  683. #if !defined(__cplusplus) || defined(CINTERFACE)
  684. /*** IUnknown methods ***/
  685. #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  686. #define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  687. #define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p)
  688. /*** IDirectSoundCaptureBuffer methods ***/
  689. #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  690. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  691. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  692. #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  693. #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  694. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  695. #define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
  696. #define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
  697. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  698. #else
  699. /*** IUnknown methods ***/
  700. #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  701. #define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef()
  702. #define IDirectSoundCaptureBuffer_Release(p) (p)->Release()
  703. /*** IDirectSoundCaptureBuffer methods ***/
  704. #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
  705. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  706. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  707. #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
  708. #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  709. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  710. #define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
  711. #define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
  712. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  713. #endif
  714. /*****************************************************************************
  715. * IDirectSoundCaptureBuffer8 interface
  716. */
  717. #define INTERFACE IDirectSoundCaptureBuffer8
  718. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)
  719. {
  720. /*** IUnknown methods ***/
  721. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  722. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  723. STDMETHOD_(ULONG,Release)(THIS) PURE;
  724. /*** IDirectSoundCaptureBuffer methods ***/
  725. STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
  726. STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
  727. STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
  728. STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
  729. STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
  730. STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
  731. STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
  732. STDMETHOD(Stop)(THIS) PURE;
  733. STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
  734. /*** IDirectSoundCaptureBuffer8 methods ***/
  735. STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
  736. STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
  737. };
  738. #undef INTERFACE
  739. #if !defined(__cplusplus) || defined(CINTERFACE)
  740. /*** IUnknown methods ***/
  741. #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  742. #define IDirectSoundCaptureBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
  743. #define IDirectSoundCaptureBuffer8_Release(p) (p)->lpVtbl->Release(p)
  744. /*** IDirectSoundCaptureBuffer methods ***/
  745. #define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  746. #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  747. #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  748. #define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  749. #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  750. #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  751. #define IDirectSoundCaptureBuffer8_Start(p,a) (p)->lpVtbl->Start(p,a)
  752. #define IDirectSoundCaptureBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
  753. #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  754. /*** IDirectSoundCaptureBuffer8 methods ***/
  755. #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
  756. #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b)
  757. #else
  758. /*** IUnknown methods ***/
  759. #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  760. #define IDirectSoundCaptureBuffer8_AddRef(p) (p)->AddRef()
  761. #define IDirectSoundCaptureBuffer8_Release(p) (p)->Release()
  762. /*** IDirectSoundCaptureBuffer methods ***/
  763. #define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->GetCaps(a)
  764. #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  765. #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  766. #define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->GetStatus(a)
  767. #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
  768. #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  769. #define IDirectSoundCaptureBuffer8_Start(p,a) (p)->Start(a)
  770. #define IDirectSoundCaptureBuffer8_Stop(p) (p)->Stop()
  771. #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  772. /*** IDirectSoundCaptureBuffer8 methods ***/
  773. #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
  774. #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b)
  775. #endif
  776. /*****************************************************************************
  777. * IDirectSoundNotify interface
  778. */
  779. #define WINE_NOBUFFER 0x80000000
  780. #define DSBPN_OFFSETSTOP -1
  781. #define INTERFACE IDirectSoundNotify
  782. DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)
  783. {
  784. /*** IUnknown methods ***/
  785. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  786. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  787. STDMETHOD_(ULONG,Release)(THIS) PURE;
  788. /*** IDirectSoundNotify methods ***/
  789. STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
  790. };
  791. #undef INTERFACE
  792. #if !defined(__cplusplus) || defined(CINTERFACE)
  793. /*** IUnknown methods ***/
  794. #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  795. #define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
  796. #define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p)
  797. /*** IDirectSoundNotify methods ***/
  798. #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
  799. #else
  800. /*** IUnknown methods ***/
  801. #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  802. #define IDirectSoundNotify_AddRef(p) (p)->AddRef()
  803. #define IDirectSoundNotify_Release(p) (p)->Release()
  804. /*** IDirectSoundNotify methods ***/
  805. #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
  806. #endif
  807. /*****************************************************************************
  808. * IDirectSound3DListener interface
  809. */
  810. #define DS3DMODE_NORMAL 0x00000000
  811. #define DS3DMODE_HEADRELATIVE 0x00000001
  812. #define DS3DMODE_DISABLE 0x00000002
  813. #define DS3D_IMMEDIATE 0x00000000
  814. #define DS3D_DEFERRED 0x00000001
  815. #define DS3D_MINDISTANCEFACTOR FLT_MIN
  816. #define DS3D_MAXDISTANCEFACTOR FLT_MAX
  817. #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
  818. #define DS3D_MINROLLOFFFACTOR 0.0f
  819. #define DS3D_MAXROLLOFFFACTOR 10.0f
  820. #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
  821. #define DS3D_MINDOPPLERFACTOR 0.0f
  822. #define DS3D_MAXDOPPLERFACTOR 10.0f
  823. #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
  824. #define DS3D_DEFAULTMINDISTANCE 1.0f
  825. #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
  826. #define DS3D_MINCONEANGLE 0
  827. #define DS3D_MAXCONEANGLE 360
  828. #define DS3D_DEFAULTCONEANGLE 360
  829. #define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
  830. typedef struct _DS3DLISTENER {
  831. DWORD dwSize;
  832. D3DVECTOR vPosition;
  833. D3DVECTOR vVelocity;
  834. D3DVECTOR vOrientFront;
  835. D3DVECTOR vOrientTop;
  836. D3DVALUE flDistanceFactor;
  837. D3DVALUE flRolloffFactor;
  838. D3DVALUE flDopplerFactor;
  839. } DS3DLISTENER, *LPDS3DLISTENER;
  840. typedef const DS3DLISTENER *LPCDS3DLISTENER;
  841. #define INTERFACE IDirectSound3DListener
  842. DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)
  843. {
  844. /*** IUnknown methods ***/
  845. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  846. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  847. STDMETHOD_(ULONG,Release)(THIS) PURE;
  848. /*** IDirectSound3DListener methods ***/
  849. STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE;
  850. STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE;
  851. STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE;
  852. STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE;
  853. STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
  854. STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE;
  855. STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
  856. STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE;
  857. STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
  858. STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
  859. STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
  860. STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  861. STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
  862. STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  863. STDMETHOD(CommitDeferredSettings)(THIS) PURE;
  864. };
  865. #undef INTERFACE
  866. #if !defined(__cplusplus) || defined(CINTERFACE)
  867. /*** IUnknown methods ***/
  868. #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  869. #define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p)
  870. #define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p)
  871. /*** IDirectSound3DListener methods ***/
  872. #define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  873. #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
  874. #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
  875. #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
  876. #define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
  877. #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
  878. #define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
  879. #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
  880. #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
  881. #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
  882. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
  883. #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
  884. #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
  885. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  886. #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
  887. #else
  888. /*** IUnknown methods ***/
  889. #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  890. #define IDirectSound3DListener_AddRef(p) (p)->AddRef()
  891. #define IDirectSound3DListener_Release(p) (p)->Release()
  892. /*** IDirectSound3DListener methods ***/
  893. #define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
  894. #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
  895. #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
  896. #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
  897. #define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
  898. #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
  899. #define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
  900. #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
  901. #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
  902. #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
  903. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
  904. #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
  905. #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
  906. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
  907. #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
  908. #endif
  909. /*****************************************************************************
  910. * IDirectSound3DBuffer interface
  911. */
  912. typedef struct _DS3DBUFFER {
  913. DWORD dwSize;
  914. D3DVECTOR vPosition;
  915. D3DVECTOR vVelocity;
  916. DWORD dwInsideConeAngle;
  917. DWORD dwOutsideConeAngle;
  918. D3DVECTOR vConeOrientation;
  919. LONG lConeOutsideVolume;
  920. D3DVALUE flMinDistance;
  921. D3DVALUE flMaxDistance;
  922. DWORD dwMode;
  923. } DS3DBUFFER, *LPDS3DBUFFER;
  924. typedef const DS3DBUFFER *LPCDS3DBUFFER;
  925. #define INTERFACE IDirectSound3DBuffer
  926. DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown)
  927. {
  928. /*** IUnknown methods ***/
  929. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  930. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  931. STDMETHOD_(ULONG,Release)(THIS) PURE;
  932. /*** IDirectSound3DBuffer methods ***/
  933. STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE;
  934. STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE;
  935. STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE;
  936. STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE;
  937. STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE;
  938. STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE;
  939. STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE;
  940. STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
  941. STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
  942. STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE;
  943. STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
  944. STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  945. STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
  946. STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
  947. STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
  948. STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE;
  949. STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  950. STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  951. };
  952. #undef INTERFACE
  953. #if !defined(__cplusplus) || defined(CINTERFACE)
  954. /*** IUnknown methods ***/
  955. #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  956. #define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  957. #define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p)
  958. /*** IDirectSound3DBuffer methods ***/
  959. #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  960. #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
  961. #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
  962. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
  963. #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
  964. #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
  965. #define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
  966. #define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
  967. #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
  968. #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
  969. #define IDirectSound3DBuffer_SetConeAngles(p,a,b) (p)->lpVtbl->SetConeAngles(p,a,b)
  970. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
  971. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
  972. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
  973. #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
  974. #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
  975. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
  976. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  977. #else
  978. /*** IUnknown methods ***/
  979. #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  980. #define IDirectSound3DBuffer_AddRef(p) (p)->AddRef()
  981. #define IDirectSound3DBuffer_Release(p) (p)->Release()
  982. /*** IDirectSound3DBuffer methods ***/
  983. #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
  984. #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
  985. #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
  986. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
  987. #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
  988. #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
  989. #define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
  990. #define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
  991. #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
  992. #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
  993. #define IDirectSound3DBuffer_SetConeAngles(p,a,b) (p)->SetConeAngles(a,b)
  994. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
  995. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b)
  996. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
  997. #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
  998. #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
  999. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
  1000. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
  1001. #endif
  1002. /*****************************************************************************
  1003. * IKsPropertySet interface
  1004. */
  1005. #ifndef _IKsPropertySet_
  1006. #define _IKsPropertySet_
  1007. typedef struct IKsPropertySet IKsPropertySet,*LPKSPROPERTYSET;
  1008. DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
  1009. #define KSPROPERTY_SUPPORT_GET 1
  1010. #define KSPROPERTY_SUPPORT_SET 2
  1011. #define INTERFACE IKsPropertySet
  1012. DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
  1013. {
  1014. /*** IUnknown methods ***/
  1015. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1016. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1017. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1018. /*** IKsPropertySet methods ***/
  1019. STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE;
  1020. STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE;
  1021. STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE;
  1022. };
  1023. #undef INTERFACE
  1024. #if !defined(__cplusplus) || defined(CINTERFACE)
  1025. /*** IUnknown methods ***/
  1026. #define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1027. #define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p)
  1028. #define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p)
  1029. /*** IKsPropertySet methods ***/
  1030. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
  1031. #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
  1032. #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
  1033. #else
  1034. /*** IUnknown methods ***/
  1035. #define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1036. #define IKsPropertySet_AddRef(p) (p)->AddRef()
  1037. #define IKsPropertySet_Release(p) (p)->Release()
  1038. /*** IKsPropertySet methods ***/
  1039. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
  1040. #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
  1041. #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
  1042. #endif
  1043. #endif /* _IKsPropertySet_ */
  1044. /*****************************************************************************
  1045. * IDirectSoundFullDuplex interface
  1046. */
  1047. #define INTERFACE IDirectSoundFullDuplex
  1048. DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown)
  1049. {
  1050. /*** IUnknown methods ***/
  1051. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1052. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1053. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1054. /*** IDirectSoundFullDuplex methods ***/
  1055. STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
  1056. };
  1057. #undef INTERFACE
  1058. #if !defined(__cplusplus) || defined(CINTERFACE)
  1059. /*** IUnknown methods ***/
  1060. #define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1061. #define IDirectSoundFullDuplex_AddRef(p) (p)->lpVtbl->AddRef(p)
  1062. #define IDirectSoundFullDuplex_Release(p) (p)->lpVtbl->Release(p)
  1063. /*** IDirectSoundFullDuplex methods ***/
  1064. #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
  1065. #else
  1066. /*** IUnknown methods ***/
  1067. #define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1068. #define IDirectSoundFullDuplex_AddRef(p) (p)->AddRef()
  1069. #define IDirectSoundFullDuplex_Release(p) (p)->Release()
  1070. /*** IDirectSoundFullDuplex methods ***/
  1071. #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h)
  1072. #endif
  1073. #ifdef __cplusplus
  1074. } /* extern "C" */
  1075. #endif /* defined(__cplusplus) */
  1076. #endif /* __WINE_DSOUND_H */