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