Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

863 lines
39 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995,1996 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dsound.h
  6. * Content: DirectSound include file
  7. *
  8. **************************************************************************/
  9. #ifndef __DSOUND_INCLUDED__
  10. #define __DSOUND_INCLUDED__
  11. #include <d3dtypes.h>
  12. #define COM_NO_WINDOWS_H
  13. #include <objbase.h>
  14. #define _FACDS 0x878
  15. #define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code)
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif // __cplusplus
  19. // Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000}
  20. DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  21. // DirectSound Capture Component GUID {B0210780-89CD-11d0-AF08-00A0C925CD16}
  22. DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  23. //
  24. // Structures
  25. //
  26. #ifdef __cplusplus
  27. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  28. struct IDirectSound;
  29. struct IDirectSoundBuffer;
  30. struct IDirectSound3DListener;
  31. struct IDirectSound3DBuffer;
  32. struct IDirectSoundCapture;
  33. struct IDirectSoundCaptureBuffer;
  34. struct IDirectSoundNotify;
  35. #endif // __cplusplus
  36. typedef struct IDirectSound *LPDIRECTSOUND;
  37. typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER;
  38. typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER;
  39. typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER;
  40. typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE;
  41. typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER;
  42. typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY;
  43. typedef struct _DSCAPS
  44. {
  45. DWORD dwSize;
  46. DWORD dwFlags;
  47. DWORD dwMinSecondarySampleRate;
  48. DWORD dwMaxSecondarySampleRate;
  49. DWORD dwPrimaryBuffers;
  50. DWORD dwMaxHwMixingAllBuffers;
  51. DWORD dwMaxHwMixingStaticBuffers;
  52. DWORD dwMaxHwMixingStreamingBuffers;
  53. DWORD dwFreeHwMixingAllBuffers;
  54. DWORD dwFreeHwMixingStaticBuffers;
  55. DWORD dwFreeHwMixingStreamingBuffers;
  56. DWORD dwMaxHw3DAllBuffers;
  57. DWORD dwMaxHw3DStaticBuffers;
  58. DWORD dwMaxHw3DStreamingBuffers;
  59. DWORD dwFreeHw3DAllBuffers;
  60. DWORD dwFreeHw3DStaticBuffers;
  61. DWORD dwFreeHw3DStreamingBuffers;
  62. DWORD dwTotalHwMemBytes;
  63. DWORD dwFreeHwMemBytes;
  64. DWORD dwMaxContigFreeHwMemBytes;
  65. DWORD dwUnlockTransferRateHwBuffers;
  66. DWORD dwPlayCpuOverheadSwBuffers;
  67. DWORD dwReserved1;
  68. DWORD dwReserved2;
  69. } DSCAPS, *LPDSCAPS;
  70. typedef const DSCAPS *LPCDSCAPS;
  71. typedef struct _DSBCAPS
  72. {
  73. DWORD dwSize;
  74. DWORD dwFlags;
  75. DWORD dwBufferBytes;
  76. DWORD dwUnlockTransferRate;
  77. DWORD dwPlayCpuOverhead;
  78. } DSBCAPS, *LPDSBCAPS;
  79. typedef const DSBCAPS *LPCDSBCAPS;
  80. typedef struct _DSBUFFERDESC
  81. {
  82. DWORD dwSize;
  83. DWORD dwFlags;
  84. DWORD dwBufferBytes;
  85. DWORD dwReserved;
  86. LPWAVEFORMATEX lpwfxFormat;
  87. } DSBUFFERDESC, *LPDSBUFFERDESC;
  88. typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
  89. typedef struct _DS3DBUFFER
  90. {
  91. DWORD dwSize;
  92. D3DVECTOR vPosition;
  93. D3DVECTOR vVelocity;
  94. DWORD dwInsideConeAngle;
  95. DWORD dwOutsideConeAngle;
  96. D3DVECTOR vConeOrientation;
  97. LONG lConeOutsideVolume;
  98. D3DVALUE flMinDistance;
  99. D3DVALUE flMaxDistance;
  100. DWORD dwMode;
  101. } DS3DBUFFER, *LPDS3DBUFFER;
  102. typedef const DS3DBUFFER *LPCDS3DBUFFER;
  103. typedef struct _DS3DLISTENER
  104. {
  105. DWORD dwSize;
  106. D3DVECTOR vPosition;
  107. D3DVECTOR vVelocity;
  108. D3DVECTOR vOrientFront;
  109. D3DVECTOR vOrientTop;
  110. D3DVALUE flDistanceFactor;
  111. D3DVALUE flRolloffFactor;
  112. D3DVALUE flDopplerFactor;
  113. } DS3DLISTENER, *LPDS3DLISTENER;
  114. typedef const DS3DLISTENER *LPCDS3DLISTENER;
  115. typedef struct _DSCCAPS
  116. {
  117. DWORD dwSize;
  118. DWORD dwFlags;
  119. DWORD dwFormats;
  120. DWORD dwChannels;
  121. } DSCCAPS, *LPDSCCAPS;
  122. typedef const DSCCAPS *LPCDSCCAPS;
  123. typedef struct _DSCBUFFERDESC
  124. {
  125. DWORD dwSize;
  126. DWORD dwFlags;
  127. DWORD dwBufferBytes;
  128. DWORD dwReserved;
  129. LPWAVEFORMATEX lpwfxFormat;
  130. } DSCBUFFERDESC, *LPDSCBUFFERDESC;
  131. typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
  132. typedef struct _DSCBCAPS
  133. {
  134. DWORD dwSize;
  135. DWORD dwFlags;
  136. DWORD dwBufferBytes;
  137. DWORD dwReserved;
  138. } DSCBCAPS, *LPDSCBCAPS;
  139. typedef const DSCBCAPS *LPCDSCBCAPS;
  140. typedef struct _DSBPOSITIONNOTIFY
  141. {
  142. DWORD dwOffset;
  143. HANDLE hEventNotify;
  144. } DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY;
  145. typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
  146. //
  147. // Compatibility typedefs
  148. //
  149. typedef LPDIRECTSOUND *LPLPDIRECTSOUND;
  150. typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER;
  151. typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER;
  152. typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER;
  153. typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE;
  154. typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER;
  155. typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY;
  156. typedef LPVOID *LPLPVOID;
  157. typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
  158. //
  159. // DirectSound API
  160. //
  161. typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID);
  162. typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID);
  163. extern HRESULT WINAPI DirectSoundCreate(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
  164. extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
  165. extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
  166. extern HRESULT WINAPI DirectSoundCaptureCreate(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
  167. extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
  168. extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
  169. #ifdef UNICODE
  170. #define LPDSENUMCALLBACK LPDSENUMCALLBACKW
  171. #define DirectSoundEnumerate DirectSoundEnumerateW
  172. #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW
  173. #else // UNICODE
  174. #define LPDSENUMCALLBACK LPDSENUMCALLBACKA
  175. #define DirectSoundEnumerate DirectSoundEnumerateA
  176. #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA
  177. #endif // UNICODE
  178. //
  179. // IDirectSound
  180. //
  181. DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  182. #undef INTERFACE
  183. #define INTERFACE IDirectSound
  184. DECLARE_INTERFACE_(IDirectSound, IUnknown)
  185. {
  186. // IUnknown methods
  187. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  188. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  189. STDMETHOD_(ULONG,Release) (THIS) PURE;
  190. // IDirectSound methods
  191. STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC, LPDIRECTSOUNDBUFFER *, LPUNKNOWN) PURE;
  192. STDMETHOD(GetCaps) (THIS_ LPDSCAPS) PURE;
  193. STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER, LPDIRECTSOUNDBUFFER *) PURE;
  194. STDMETHOD(SetCooperativeLevel) (THIS_ HWND, DWORD) PURE;
  195. STDMETHOD(Compact) (THIS) PURE;
  196. STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD) PURE;
  197. STDMETHOD(SetSpeakerConfig) (THIS_ DWORD) PURE;
  198. STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
  199. };
  200. #if !defined(__cplusplus) || defined(CINTERFACE)
  201. #define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  202. #define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
  203. #define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
  204. #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
  205. #define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  206. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
  207. #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  208. #define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
  209. #define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
  210. #define IDirectSound_SetSpeakerConfig(p,b) (p)->lpVtbl->SetSpeakerConfig(p,b)
  211. #define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  212. #else // !defined(__cplusplus) || defined(CINTERFACE)
  213. #define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  214. #define IDirectSound_AddRef(p) (p)->AddRef()
  215. #define IDirectSound_Release(p) (p)->Release()
  216. #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
  217. #define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
  218. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
  219. #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  220. #define IDirectSound_Compact(p) (p)->Compact()
  221. #define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
  222. #define IDirectSound_SetSpeakerConfig(p,b) (p)->SetSpeakerConfig(b)
  223. #define IDirectSound_Initialize(p,a) (p)->Initialize(a)
  224. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  225. //
  226. // IDirectSoundBuffer
  227. //
  228. DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  229. #undef INTERFACE
  230. #define INTERFACE IDirectSoundBuffer
  231. DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
  232. {
  233. // IUnknown methods
  234. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  235. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  236. STDMETHOD_(ULONG,Release) (THIS) PURE;
  237. // IDirectSoundBuffer methods
  238. STDMETHOD(GetCaps) (THIS_ LPDSBCAPS) PURE;
  239. STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE;
  240. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
  241. STDMETHOD(GetVolume) (THIS_ LPLONG) PURE;
  242. STDMETHOD(GetPan) (THIS_ LPLONG) PURE;
  243. STDMETHOD(GetFrequency) (THIS_ LPDWORD) PURE;
  244. STDMETHOD(GetStatus) (THIS_ LPDWORD) PURE;
  245. STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND, LPCDSBUFFERDESC) PURE;
  246. STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
  247. STDMETHOD(Play) (THIS_ DWORD, DWORD, DWORD) PURE;
  248. STDMETHOD(SetCurrentPosition) (THIS_ DWORD) PURE;
  249. STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX) PURE;
  250. STDMETHOD(SetVolume) (THIS_ LONG) PURE;
  251. STDMETHOD(SetPan) (THIS_ LONG) PURE;
  252. STDMETHOD(SetFrequency) (THIS_ DWORD) PURE;
  253. STDMETHOD(Stop) (THIS) PURE;
  254. STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
  255. STDMETHOD(Restore) (THIS) PURE;
  256. };
  257. #if !defined(__cplusplus) || defined(CINTERFACE)
  258. #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  259. #define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  260. #define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
  261. #define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  262. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  263. #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  264. #define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
  265. #define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
  266. #define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
  267. #define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  268. #define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  269. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  270. #define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
  271. #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
  272. #define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
  273. #define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
  274. #define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
  275. #define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
  276. #define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
  277. #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  278. #define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
  279. #else // !defined(__cplusplus) || defined(CINTERFACE)
  280. #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  281. #define IDirectSoundBuffer_AddRef(p) (p)->AddRef()
  282. #define IDirectSoundBuffer_Release(p) (p)->Release()
  283. #define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
  284. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  285. #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  286. #define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
  287. #define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
  288. #define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
  289. #define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
  290. #define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  291. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  292. #define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
  293. #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
  294. #define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
  295. #define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
  296. #define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
  297. #define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
  298. #define IDirectSoundBuffer_Stop(p) (p)->Stop()
  299. #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  300. #define IDirectSoundBuffer_Restore(p) (p)->Restore()
  301. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  302. //
  303. // IDirectSound3DListener
  304. //
  305. DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  306. #undef INTERFACE
  307. #define INTERFACE IDirectSound3DListener
  308. DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown)
  309. {
  310. // IUnknown methods
  311. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  312. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  313. STDMETHOD_(ULONG,Release) (THIS) PURE;
  314. // IDirectSound3D methods
  315. STDMETHOD(GetAllParameters) (THIS_ LPDS3DLISTENER) PURE;
  316. STDMETHOD(GetDistanceFactor) (THIS_ LPD3DVALUE) PURE;
  317. STDMETHOD(GetDopplerFactor) (THIS_ LPD3DVALUE) PURE;
  318. STDMETHOD(GetOrientation) (THIS_ LPD3DVECTOR, LPD3DVECTOR) PURE;
  319. STDMETHOD(GetPosition) (THIS_ LPD3DVECTOR) PURE;
  320. STDMETHOD(GetRolloffFactor) (THIS_ LPD3DVALUE) PURE;
  321. STDMETHOD(GetVelocity) (THIS_ LPD3DVECTOR) PURE;
  322. STDMETHOD(SetAllParameters) (THIS_ LPCDS3DLISTENER, DWORD) PURE;
  323. STDMETHOD(SetDistanceFactor) (THIS_ D3DVALUE, DWORD) PURE;
  324. STDMETHOD(SetDopplerFactor) (THIS_ D3DVALUE, DWORD) PURE;
  325. STDMETHOD(SetOrientation) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
  326. STDMETHOD(SetPosition) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
  327. STDMETHOD(SetRolloffFactor) (THIS_ D3DVALUE, DWORD) PURE;
  328. STDMETHOD(SetVelocity) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
  329. STDMETHOD(CommitDeferredSettings) (THIS) PURE;
  330. };
  331. #if !defined(__cplusplus) || defined(CINTERFACE)
  332. #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  333. #define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p)
  334. #define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p)
  335. #define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  336. #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
  337. #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
  338. #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
  339. #define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
  340. #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
  341. #define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
  342. #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
  343. #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
  344. #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
  345. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
  346. #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
  347. #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
  348. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  349. #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
  350. #else // !defined(__cplusplus) || defined(CINTERFACE)
  351. #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  352. #define IDirectSound3DListener_AddRef(p) (p)->AddRef()
  353. #define IDirectSound3DListener_Release(p) (p)->Release()
  354. #define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
  355. #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
  356. #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
  357. #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
  358. #define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
  359. #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
  360. #define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
  361. #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
  362. #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
  363. #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
  364. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
  365. #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
  366. #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
  367. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
  368. #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
  369. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  370. //
  371. // IDirectSound3DBuffer
  372. //
  373. DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  374. #undef INTERFACE
  375. #define INTERFACE IDirectSound3DBuffer
  376. DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown)
  377. {
  378. // IUnknown methods
  379. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  380. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  381. STDMETHOD_(ULONG,Release) (THIS) PURE;
  382. // IDirectSoundBuffer3D methods
  383. STDMETHOD(GetAllParameters) (THIS_ LPDS3DBUFFER) PURE;
  384. STDMETHOD(GetConeAngles) (THIS_ LPDWORD, LPDWORD) PURE;
  385. STDMETHOD(GetConeOrientation) (THIS_ LPD3DVECTOR) PURE;
  386. STDMETHOD(GetConeOutsideVolume) (THIS_ LPLONG) PURE;
  387. STDMETHOD(GetMaxDistance) (THIS_ LPD3DVALUE) PURE;
  388. STDMETHOD(GetMinDistance) (THIS_ LPD3DVALUE) PURE;
  389. STDMETHOD(GetMode) (THIS_ LPDWORD) PURE;
  390. STDMETHOD(GetPosition) (THIS_ LPD3DVECTOR) PURE;
  391. STDMETHOD(GetVelocity) (THIS_ LPD3DVECTOR) PURE;
  392. STDMETHOD(SetAllParameters) (THIS_ LPCDS3DBUFFER, DWORD) PURE;
  393. STDMETHOD(SetConeAngles) (THIS_ DWORD, DWORD, DWORD) PURE;
  394. STDMETHOD(SetConeOrientation) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
  395. STDMETHOD(SetConeOutsideVolume) (THIS_ LONG, DWORD) PURE;
  396. STDMETHOD(SetMaxDistance) (THIS_ D3DVALUE, DWORD) PURE;
  397. STDMETHOD(SetMinDistance) (THIS_ D3DVALUE, DWORD) PURE;
  398. STDMETHOD(SetMode) (THIS_ DWORD, DWORD) PURE;
  399. STDMETHOD(SetPosition) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
  400. STDMETHOD(SetVelocity) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
  401. };
  402. #if !defined(__cplusplus) || defined(CINTERFACE)
  403. #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  404. #define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  405. #define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p)
  406. #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  407. #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
  408. #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
  409. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
  410. #define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
  411. #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
  412. #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
  413. #define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
  414. #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
  415. #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
  416. #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c)
  417. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
  418. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->lpVtbl->SetConeOutsideVolume(p,a,b)
  419. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
  420. #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
  421. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
  422. #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
  423. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  424. #else // !defined(__cplusplus) || defined(CINTERFACE)
  425. #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  426. #define IDirectSound3DBuffer_AddRef(p) (p)->AddRef()
  427. #define IDirectSound3DBuffer_Release(p) (p)->Release()
  428. #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
  429. #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
  430. #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
  431. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
  432. #define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
  433. #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
  434. #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
  435. #define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
  436. #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
  437. #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
  438. #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c)
  439. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
  440. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->SetConeOutsideVolume(a,b)
  441. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
  442. #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
  443. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
  444. #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
  445. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
  446. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  447. //
  448. // IDirectSoundCapture
  449. //
  450. DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  451. #undef INTERFACE
  452. #define INTERFACE IDirectSoundCapture
  453. DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
  454. {
  455. // IUnknown methods
  456. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  457. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  458. STDMETHOD_(ULONG,Release) (THIS) PURE;
  459. // IDirectSoundCapture methods
  460. STDMETHOD(CreateCaptureBuffer) (THIS_ LPCDSCBUFFERDESC, LPDIRECTSOUNDCAPTUREBUFFER *, LPUNKNOWN) PURE;
  461. STDMETHOD(GetCaps) (THIS_ LPDSCCAPS ) PURE;
  462. STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
  463. };
  464. #if !defined(__cplusplus) || defined(CINTERFACE)
  465. #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  466. #define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p)
  467. #define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p)
  468. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
  469. #define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  470. #define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  471. #else // !defined(__cplusplus) || defined(CINTERFACE)
  472. #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  473. #define IDirectSoundCapture_AddRef(p) (p)->AddRef()
  474. #define IDirectSoundCapture_Release(p) (p)->Release()
  475. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
  476. #define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
  477. #define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
  478. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  479. //
  480. // IDirectSoundCaptureBuffer
  481. //
  482. DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  483. #undef INTERFACE
  484. #define INTERFACE IDirectSoundCaptureBuffer
  485. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
  486. {
  487. // IUnknown methods
  488. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  489. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  490. STDMETHOD_(ULONG,Release) (THIS) PURE;
  491. // IDirectSoundCaptureBuffer methods
  492. STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS ) PURE;
  493. STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD ) PURE;
  494. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) PURE;
  495. STDMETHOD(GetStatus) (THIS_ LPDWORD ) PURE;
  496. STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE, LPCDSCBUFFERDESC) PURE;
  497. STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
  498. STDMETHOD(Start) (THIS_ DWORD) PURE;
  499. STDMETHOD(Stop) (THIS) PURE;
  500. STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
  501. };
  502. #if !defined(__cplusplus) || defined(CINTERFACE)
  503. #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  504. #define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  505. #define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p)
  506. #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  507. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  508. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  509. #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  510. #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  511. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  512. #define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
  513. #define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
  514. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  515. #else // !defined(__cplusplus) || defined(CINTERFACE)
  516. #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  517. #define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef()
  518. #define IDirectSoundCaptureBuffer_Release(p) (p)->Release()
  519. #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
  520. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  521. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  522. #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
  523. #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  524. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  525. #define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
  526. #define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
  527. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  528. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  529. //
  530. // IDirectSoundNotify
  531. //
  532. DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  533. #undef INTERFACE
  534. #define INTERFACE IDirectSoundNotify
  535. DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown)
  536. {
  537. // IUnknown methods
  538. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  539. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  540. STDMETHOD_(ULONG,Release) (THIS) PURE;
  541. // IDirectSoundNotify methods
  542. STDMETHOD(SetNotificationPositions) (THIS_ DWORD, LPCDSBPOSITIONNOTIFY) PURE;
  543. };
  544. #if !defined(__cplusplus) || defined(CINTERFACE)
  545. #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  546. #define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
  547. #define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p)
  548. #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
  549. #else // !defined(__cplusplus) || defined(CINTERFACE)
  550. #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  551. #define IDirectSoundNotify_AddRef(p) (p)->AddRef()
  552. #define IDirectSoundNotify_Release(p) (p)->Release()
  553. #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
  554. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  555. //
  556. // IKsPropertySet
  557. //
  558. #ifndef _IKsPropertySet_
  559. #define _IKsPropertySet_
  560. #ifdef __cplusplus
  561. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  562. struct IKsPropertySet;
  563. #endif // __cplusplus
  564. typedef struct IKsPropertySet *LPKSPROPERTYSET;
  565. #define KSPROPERTY_SUPPORT_GET 0x00000001
  566. #define KSPROPERTY_SUPPORT_SET 0x00000002
  567. DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93);
  568. #undef INTERFACE
  569. #define INTERFACE IKsPropertySet
  570. DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
  571. {
  572. // IUnknown methods
  573. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  574. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  575. STDMETHOD_(ULONG,Release) (THIS) PURE;
  576. // IKsPropertySet methods
  577. STDMETHOD(Get) (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG, PULONG) PURE;
  578. STDMETHOD(Set) (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG) PURE;
  579. STDMETHOD(QuerySupport) (THIS_ REFGUID, ULONG, PULONG) PURE;
  580. };
  581. #if !defined(__cplusplus) || defined(CINTERFACE)
  582. #define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  583. #define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p)
  584. #define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p)
  585. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
  586. #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
  587. #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
  588. #else // !defined(__cplusplus) || defined(CINTERFACE)
  589. #define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  590. #define IKsPropertySet_AddRef(p) (p)->AddRef()
  591. #define IKsPropertySet_Release(p) (p)->Release()
  592. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
  593. #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
  594. #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
  595. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  596. #endif // _IKsPropertySet_
  597. //
  598. // Return Codes
  599. //
  600. #define DS_OK 0
  601. // The call failed because resources (such as a priority level)
  602. // were already being used by another caller.
  603. #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
  604. // The control (vol,pan,etc.) requested by the caller is not available.
  605. #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
  606. // An invalid parameter was passed to the returning function
  607. #define DSERR_INVALIDPARAM E_INVALIDARG
  608. // This call is not valid for the current state of this object
  609. #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
  610. // An undetermined error occured inside the DirectSound subsystem
  611. #define DSERR_GENERIC E_FAIL
  612. // The caller does not have the priority level required for the function to
  613. // succeed.
  614. #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
  615. // Not enough free memory is available to complete the operation
  616. #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
  617. // The specified WAVE format is not supported
  618. #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
  619. // The function called is not supported at this time
  620. #define DSERR_UNSUPPORTED E_NOTIMPL
  621. // No sound driver is available for use
  622. #define DSERR_NODRIVER MAKE_DSHRESULT(120)
  623. // This object is already initialized
  624. #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
  625. // This object does not support aggregation
  626. #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
  627. // The buffer memory has been lost, and must be restored.
  628. #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
  629. // Another app has a higher priority level, preventing this call from
  630. // succeeding.
  631. #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
  632. // This object has not been initialized
  633. #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
  634. // The requested COM interface is not available
  635. #define DSERR_NOINTERFACE E_NOINTERFACE
  636. //
  637. // Flags
  638. //
  639. #define DSCAPS_PRIMARYMONO 0x00000001
  640. #define DSCAPS_PRIMARYSTEREO 0x00000002
  641. #define DSCAPS_PRIMARY8BIT 0x00000004
  642. #define DSCAPS_PRIMARY16BIT 0x00000008
  643. #define DSCAPS_CONTINUOUSRATE 0x00000010
  644. #define DSCAPS_EMULDRIVER 0x00000020
  645. #define DSCAPS_CERTIFIED 0x00000040
  646. #define DSCAPS_SECONDARYMONO 0x00000100
  647. #define DSCAPS_SECONDARYSTEREO 0x00000200
  648. #define DSCAPS_SECONDARY8BIT 0x00000400
  649. #define DSCAPS_SECONDARY16BIT 0x00000800
  650. #define DSBPLAY_LOOPING 0x00000001
  651. #define DSBSTATUS_PLAYING 0x00000001
  652. #define DSBSTATUS_BUFFERLOST 0x00000002
  653. #define DSBSTATUS_LOOPING 0x00000004
  654. #define DSBLOCK_FROMWRITECURSOR 0x00000001
  655. #define DSBLOCK_ENTIREBUFFER 0x00000002
  656. #define DSSCL_NORMAL 0x00000001
  657. #define DSSCL_PRIORITY 0x00000002
  658. #define DSSCL_EXCLUSIVE 0x00000003
  659. #define DSSCL_WRITEPRIMARY 0x00000004
  660. #define DS3DMODE_NORMAL 0x00000000
  661. #define DS3DMODE_HEADRELATIVE 0x00000001
  662. #define DS3DMODE_DISABLE 0x00000002
  663. #define DS3D_IMMEDIATE 0x00000000
  664. #define DS3D_DEFERRED 0x00000001
  665. #define DS3D_MINDISTANCEFACTOR 0.0f
  666. #define DS3D_MAXDISTANCEFACTOR 10.0f
  667. #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
  668. #define DS3D_MINROLLOFFFACTOR 0.0f
  669. #define DS3D_MAXROLLOFFFACTOR 10.0f
  670. #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
  671. #define DS3D_MINDOPPLERFACTOR 0.0f
  672. #define DS3D_MAXDOPPLERFACTOR 10.0f
  673. #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
  674. #define DS3D_DEFAULTMINDISTANCE 1.0f
  675. #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
  676. #define DS3D_MINCONEANGLE 0
  677. #define DS3D_MAXCONEANGLE 360
  678. #define DS3D_DEFAULTCONEANGLE 360
  679. #define DS3D_DEFAULTCONEOUTSIDEVOLUME 0
  680. #define DSBCAPS_PRIMARYBUFFER 0x00000001
  681. #define DSBCAPS_STATIC 0x00000002
  682. #define DSBCAPS_LOCHARDWARE 0x00000004
  683. #define DSBCAPS_LOCSOFTWARE 0x00000008
  684. #define DSBCAPS_CTRL3D 0x00000010
  685. #define DSBCAPS_CTRLFREQUENCY 0x00000020
  686. #define DSBCAPS_CTRLPAN 0x00000040
  687. #define DSBCAPS_CTRLVOLUME 0x00000080
  688. #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
  689. #define DSBCAPS_CTRLDEFAULT 0x000000E0
  690. #define DSBCAPS_CTRLALL 0x000001F0
  691. #define DSBCAPS_STICKYFOCUS 0x00004000
  692. #define DSBCAPS_GLOBALFOCUS 0x00008000
  693. #define DSBCAPS_GETCURRENTPOSITION2 0x00010000
  694. #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
  695. #define DSCBCAPS_WAVEMAPPED 0x80000000
  696. #define DSSPEAKER_HEADPHONE 0x00000001
  697. #define DSSPEAKER_MONO 0x00000002
  698. #define DSSPEAKER_QUAD 0x00000003
  699. #define DSSPEAKER_STEREO 0x00000004
  700. #define DSSPEAKER_SURROUND 0x00000005
  701. #define DSSPEAKER_GEOMETRY_MIN 0x00000005 // 5 degrees
  702. #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A // 10 degrees
  703. #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 // 20 degrees
  704. #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 // 180 degrees
  705. #define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
  706. #define DSSPEAKER_CONFIG(a) ((BYTE)(a))
  707. #define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
  708. #define DSCCAPS_EMULDRIVER 0x00000020
  709. #define DSCBLOCK_ENTIREBUFFER 0x00000001
  710. #define DSCBSTATUS_CAPTURING 0x00000001
  711. #define DSCBSTATUS_LOOPING 0x00000002
  712. #define DSCBSTART_LOOPING 0x00000001
  713. #define DSBFREQUENCY_MIN 100
  714. #define DSBFREQUENCY_MAX 100000
  715. #define DSBFREQUENCY_ORIGINAL 0
  716. #define DSBPAN_LEFT -10000
  717. #define DSBPAN_CENTER 0
  718. #define DSBPAN_RIGHT 10000
  719. #define DSBVOLUME_MIN -10000
  720. #define DSBVOLUME_MAX 0
  721. #define DSBSIZE_MIN 4
  722. #define DSBSIZE_MAX 0x0FFFFFFF
  723. #define DSBPN_OFFSETSTOP 0xFFFFFFFF
  724. #ifdef __cplusplus
  725. };
  726. #endif // __cplusplus
  727. #endif // __DSOUND_INCLUDED__