Home | History | Annotate | Download | only in dshow
      1 #include <dshow/_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(DSDEVID_WinePlayback,        0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
    114 
    115 #define	_FACDS		0x878
    116 #define	MAKE_DSHRESULT(code)		MAKE_HRESULT(1,_FACDS,code)
    117 
    118 #define DS_OK				0
    119 #define DS_NO_VIRTUALIZATION            MAKE_HRESULT(0, _FACDS, 10)
    120 #define DS_INCOMPLETE                   MAKE_HRESULT(0, _FACDS, 20)
    121 #define DSERR_ALLOCATED			MAKE_DSHRESULT(10)
    122 #define DSERR_CONTROLUNAVAIL		MAKE_DSHRESULT(30)
    123 #define DSERR_INVALIDPARAM		E_INVALIDARG
    124 #define DSERR_INVALIDCALL		MAKE_DSHRESULT(50)
    125 #define DSERR_GENERIC			E_FAIL
    126 #define DSERR_PRIOLEVELNEEDED		MAKE_DSHRESULT(70)
    127 #define DSERR_OUTOFMEMORY		E_OUTOFMEMORY
    128 #define DSERR_BADFORMAT			MAKE_DSHRESULT(100)
    129 #define DSERR_UNSUPPORTED		E_NOTIMPL
    130 #define DSERR_NODRIVER			MAKE_DSHRESULT(120)
    131 #define DSERR_ALREADYINITIALIZED	MAKE_DSHRESULT(130)
    132 #define DSERR_NOAGGREGATION		CLASS_E_NOAGGREGATION
    133 #define DSERR_BUFFERLOST		MAKE_DSHRESULT(150)
    134 #define DSERR_OTHERAPPHASPRIO		MAKE_DSHRESULT(160)
    135 #define DSERR_UNINITIALIZED		MAKE_DSHRESULT(170)
    136 #define DSERR_NOINTERFACE               E_NOINTERFACE
    137 #define DSERR_ACCESSDENIED              E_ACCESSDENIED
    138 #define DSERR_BUFFERTOOSMALL            MAKE_DSHRESULT(180)
    139 #define DSERR_DS8_REQUIRED              MAKE_DSHRESULT(190)
    140 #define DSERR_SENDLOOP                  MAKE_DSHRESULT(200)
    141 #define DSERR_BADSENDBUFFERGUID         MAKE_DSHRESULT(210)
    142 #define DSERR_FXUNAVAILABLE             MAKE_DSHRESULT(220)
    143 #define DSERR_OBJECTNOTFOUND            MAKE_DSHRESULT(4449)
    144 
    145 #define DSCAPS_PRIMARYMONO          0x00000001
    146 #define DSCAPS_PRIMARYSTEREO        0x00000002
    147 #define DSCAPS_PRIMARY8BIT          0x00000004
    148 #define DSCAPS_PRIMARY16BIT         0x00000008
    149 #define DSCAPS_CONTINUOUSRATE       0x00000010
    150 #define DSCAPS_EMULDRIVER           0x00000020
    151 #define DSCAPS_CERTIFIED            0x00000040
    152 #define DSCAPS_SECONDARYMONO        0x00000100
    153 #define DSCAPS_SECONDARYSTEREO      0x00000200
    154 #define DSCAPS_SECONDARY8BIT        0x00000400
    155 #define DSCAPS_SECONDARY16BIT       0x00000800
    156 
    157 #define	DSSCL_NORMAL		1
    158 #define	DSSCL_PRIORITY		2
    159 #define	DSSCL_EXCLUSIVE		3
    160 #define	DSSCL_WRITEPRIMARY	4
    161 
    162 typedef struct _DSCAPS
    163 {
    164     DWORD	dwSize;
    165     DWORD	dwFlags;
    166     DWORD	dwMinSecondarySampleRate;
    167     DWORD	dwMaxSecondarySampleRate;
    168     DWORD	dwPrimaryBuffers;
    169     DWORD	dwMaxHwMixingAllBuffers;
    170     DWORD	dwMaxHwMixingStaticBuffers;
    171     DWORD	dwMaxHwMixingStreamingBuffers;
    172     DWORD	dwFreeHwMixingAllBuffers;
    173     DWORD	dwFreeHwMixingStaticBuffers;
    174     DWORD	dwFreeHwMixingStreamingBuffers;
    175     DWORD	dwMaxHw3DAllBuffers;
    176     DWORD	dwMaxHw3DStaticBuffers;
    177     DWORD	dwMaxHw3DStreamingBuffers;
    178     DWORD	dwFreeHw3DAllBuffers;
    179     DWORD	dwFreeHw3DStaticBuffers;
    180     DWORD	dwFreeHw3DStreamingBuffers;
    181     DWORD	dwTotalHwMemBytes;
    182     DWORD	dwFreeHwMemBytes;
    183     DWORD	dwMaxContigFreeHwMemBytes;
    184     DWORD	dwUnlockTransferRateHwBuffers;
    185     DWORD	dwPlayCpuOverheadSwBuffers;
    186     DWORD	dwReserved1;
    187     DWORD	dwReserved2;
    188 } DSCAPS,*LPDSCAPS;
    189 typedef const DSCAPS *LPCDSCAPS;
    190 
    191 #define DSBPLAY_LOOPING             0x00000001
    192 #define DSBPLAY_LOCHARDWARE         0x00000002
    193 #define DSBPLAY_LOCSOFTWARE         0x00000004
    194 #define DSBPLAY_TERMINATEBY_TIME    0x00000008
    195 #define DSBPLAY_TERMINATEBY_DISTANCE    0x000000010
    196 #define DSBPLAY_TERMINATEBY_PRIORITY    0x000000020
    197 
    198 #define DSBSTATUS_PLAYING           0x00000001
    199 #define DSBSTATUS_BUFFERLOST        0x00000002
    200 #define DSBSTATUS_LOOPING           0x00000004
    201 #define DSBSTATUS_LOCHARDWARE       0x00000008
    202 #define DSBSTATUS_LOCSOFTWARE       0x00000010
    203 #define DSBSTATUS_TERMINATED        0x00000020
    204 
    205 #define DSBLOCK_FROMWRITECURSOR     0x00000001
    206 #define DSBLOCK_ENTIREBUFFER        0x00000002
    207 
    208 #define DSBCAPS_PRIMARYBUFFER       0x00000001
    209 #define DSBCAPS_STATIC              0x00000002
    210 #define DSBCAPS_LOCHARDWARE         0x00000004
    211 #define DSBCAPS_LOCSOFTWARE         0x00000008
    212 #define DSBCAPS_CTRL3D              0x00000010
    213 #define DSBCAPS_CTRLFREQUENCY       0x00000020
    214 #define DSBCAPS_CTRLPAN             0x00000040
    215 #define DSBCAPS_CTRLVOLUME          0x00000080
    216 #define DSBCAPS_CTRLDEFAULT         0x000000E0  /* Pan + volume + frequency. */
    217 #define DSBCAPS_CTRLPOSITIONNOTIFY  0x00000100
    218 #define DSBCAPS_CTRLFX              0x00000200
    219 #define DSBCAPS_CTRLALL             0x000001F0  /* All control capabilities */
    220 #define DSBCAPS_STICKYFOCUS         0x00004000
    221 #define DSBCAPS_GLOBALFOCUS         0x00008000
    222 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000  /* More accurate play cursor under emulation*/
    223 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
    224 #define DSBCAPS_LOCDEFER            0x00040000
    225 
    226 #define DSBSIZE_MIN                 4
    227 #define DSBSIZE_MAX                 0xFFFFFFF
    228 #define DSBPAN_LEFT                 -10000
    229 #define DSBPAN_CENTER               0
    230 #define DSBPAN_RIGHT                 10000
    231 #define DSBVOLUME_MAX                    0
    232 #define DSBVOLUME_MIN               -10000
    233 #define DSBFREQUENCY_MIN            100
    234 #define DSBFREQUENCY_MAX            200000
    235 #define DSBFREQUENCY_ORIGINAL       0
    236 
    237 #define DSBNOTIFICATIONS_MAX        100000U
    238 
    239 typedef struct _DSBCAPS
    240 {
    241     DWORD	dwSize;
    242     DWORD	dwFlags;
    243     DWORD	dwBufferBytes;
    244     DWORD	dwUnlockTransferRate;
    245     DWORD	dwPlayCpuOverhead;
    246 } DSBCAPS,*LPDSBCAPS;
    247 typedef const DSBCAPS *LPCDSBCAPS;
    248 
    249 #define DSSCL_NORMAL                1
    250 #define DSSCL_PRIORITY              2
    251 #define DSSCL_EXCLUSIVE             3
    252 #define DSSCL_WRITEPRIMARY          4
    253 
    254 typedef struct _DSEFFECTDESC
    255 {
    256     DWORD	dwSize;
    257     DWORD	dwFlags;
    258     GUID	guidDSFXClass;
    259     DWORD_PTR	dwReserved1;
    260     DWORD_PTR	dwReserved2;
    261 } DSEFFECTDESC,*LPDSEFFECTDESC;
    262 typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
    263 
    264 #define DSFX_LOCHARDWARE    0x00000001
    265 #define DSFX_LOCSOFTWARE    0x00000002
    266 
    267 enum
    268 {
    269     DSFXR_PRESENT,
    270     DSFXR_LOCHARDWARE,
    271     DSFXR_LOCSOFTWARE,
    272     DSFXR_UNALLOCATED,
    273     DSFXR_FAILED,
    274     DSFXR_UNKNOWN,
    275     DSFXR_SENDLOOP
    276 };
    277 
    278 typedef struct _DSBUFFERDESC1
    279 {
    280     DWORD		dwSize;
    281     DWORD		dwFlags;
    282     DWORD		dwBufferBytes;
    283     DWORD		dwReserved;
    284     LPWAVEFORMATEX	lpwfxFormat;
    285 } DSBUFFERDESC1,*LPDSBUFFERDESC1;
    286 typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
    287 
    288 typedef struct _DSBUFFERDESC
    289 {
    290     DWORD		dwSize;
    291     DWORD		dwFlags;
    292     DWORD		dwBufferBytes;
    293     DWORD		dwReserved;
    294     LPWAVEFORMATEX	lpwfxFormat;
    295     GUID		guid3DAlgorithm;
    296 } DSBUFFERDESC,*LPDSBUFFERDESC;
    297 typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
    298 
    299 typedef struct _DSBPOSITIONNOTIFY
    300 {
    301     DWORD	dwOffset;
    302     HANDLE	hEventNotify;
    303 } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
    304 typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
    305 
    306 #define DSSPEAKER_HEADPHONE     1
    307 #define DSSPEAKER_MONO          2
    308 #define DSSPEAKER_QUAD          3
    309 #define DSSPEAKER_STEREO        4
    310 #define DSSPEAKER_SURROUND      5
    311 #define DSSPEAKER_5POINT1       6
    312 #define DSSPEAKER_7POINT1       7
    313 
    314 #define DSSPEAKER_GEOMETRY_MIN      0x00000005  /* 5 degrees */
    315 #define DSSPEAKER_GEOMETRY_NARROW   0x0000000A  /* 10 degrees */
    316 #define DSSPEAKER_GEOMETRY_WIDE     0x00000014  /* 20 degrees */
    317 #define DSSPEAKER_GEOMETRY_MAX      0x000000B4  /* 180 degrees */
    318 
    319 #define DSSPEAKER_COMBINED(c, g)    ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
    320 #define DSSPEAKER_CONFIG(a)         ((BYTE)(a))
    321 #define DSSPEAKER_GEOMETRY(a)       ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
    322 
    323 #define DS_CERTIFIED                0x00000000
    324 #define DS_UNCERTIFIED              0x00000001
    325 
    326 typedef struct _DSCEFFECTDESC
    327 {
    328     DWORD       dwSize;
    329     DWORD       dwFlags;
    330     GUID        guidDSCFXClass;
    331     GUID        guidDSCFXInstance;
    332     DWORD       dwReserved1;
    333     DWORD       dwReserved2;
    334 } DSCEFFECTDESC, *LPDSCEFFECTDESC;
    335 typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
    336 
    337 #define DSCFX_LOCHARDWARE   0x00000001
    338 #define DSCFX_LOCSOFTWARE   0x00000002
    339 
    340 #define DSCFXR_LOCHARDWARE  0x00000010
    341 #define DSCFXR_LOCSOFTWARE  0x00000020
    342 
    343 typedef struct _DSCBUFFERDESC1
    344 {
    345   DWORD           dwSize;
    346   DWORD           dwFlags;
    347   DWORD           dwBufferBytes;
    348   DWORD           dwReserved;
    349   LPWAVEFORMATEX  lpwfxFormat;
    350 } DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
    351 
    352 typedef struct _DSCBUFFERDESC
    353 {
    354   DWORD           dwSize;
    355   DWORD           dwFlags;
    356   DWORD           dwBufferBytes;
    357   DWORD           dwReserved;
    358   LPWAVEFORMATEX  lpwfxFormat;
    359   DWORD           dwFXCount;
    360   LPDSCEFFECTDESC lpDSCFXDesc;
    361 } DSCBUFFERDESC, *LPDSCBUFFERDESC;
    362 typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
    363 
    364 typedef struct _DSCCAPS
    365 {
    366   DWORD dwSize;
    367   DWORD dwFlags;
    368   DWORD dwFormats;
    369   DWORD dwChannels;
    370 } DSCCAPS, *LPDSCCAPS;
    371 typedef const DSCCAPS *LPCDSCCAPS;
    372 
    373 typedef struct _DSCBCAPS
    374 {
    375   DWORD dwSize;
    376   DWORD dwFlags;
    377   DWORD dwBufferBytes;
    378   DWORD dwReserved;
    379 } DSCBCAPS, *LPDSCBCAPS;
    380 typedef const DSCBCAPS *LPCDSCBCAPS;
    381 
    382 #define DSCCAPS_EMULDRIVER          DSCAPS_EMULDRIVER
    383 #define DSCCAPS_CERTIFIED           DSCAPS_CERTIFIED
    384 #define DSCCAPS_MULTIPLECAPTURE     0x00000001
    385 
    386 #define DSCBCAPS_WAVEMAPPED         0x80000000
    387 #define DSCBCAPS_CTRLFX             0x00000200
    388 
    389 #define DSCBLOCK_ENTIREBUFFER       0x00000001
    390 #define DSCBSTART_LOOPING           0x00000001
    391 #define DSCBPN_OFFSET_STOP          0xffffffff
    392 
    393 #define DSCBSTATUS_CAPTURING        0x00000001
    394 #define DSCBSTATUS_LOOPING          0x00000002
    395 
    396 #ifndef __LPCGUID_DEFINED__
    397 #define __LPCGUID_DEFINED__
    398 typedef const GUID *LPCGUID;
    399 #endif
    400 
    401 typedef WINBOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
    402 typedef WINBOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
    403 __MINGW_TYPEDEF_AW(LPDSENUMCALLBACK)
    404 
    405 extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter);
    406 extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
    407 extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
    408 #define DirectSoundEnumerate __MINGW_NAME_AW(DirectSoundEnumerate)
    409 extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
    410 extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
    411 extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
    412 #define DirectSoundCaptureEnumerate __MINGW_NAME_AW(DirectSoundCaptureEnumerate)
    413 
    414 extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter);
    415 extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
    416 extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
    417     LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel,
    418     LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
    419 #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
    420 extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest);
    421 
    422 
    423 /*****************************************************************************
    424  * IDirectSound interface
    425  */
    426 #define INTERFACE IDirectSound
    427 DECLARE_INTERFACE_(IDirectSound,IUnknown)
    428 {
    429     /*** IUnknown methods ***/
    430     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    431     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    432     STDMETHOD_(ULONG,Release)(THIS) PURE;
    433     /*** IDirectSound methods ***/
    434     STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
    435     STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
    436     STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
    437     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
    438     STDMETHOD(Compact)(THIS) PURE;
    439     STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
    440     STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
    441     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
    442 };
    443 #undef INTERFACE
    444 
    445 #if !defined(__cplusplus) || defined(CINTERFACE)
    446 /*** IUnknown methods ***/
    447 #define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    448 #define IDirectSound_AddRef(p)             (p)->lpVtbl->AddRef(p)
    449 #define IDirectSound_Release(p)            (p)->lpVtbl->Release(p)
    450 /*** IDirectSound methods ***/
    451 #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
    452 #define IDirectSound_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    453 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
    454 #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
    455 #define IDirectSound_Compact(p)                  (p)->lpVtbl->Compact(p)
    456 #define IDirectSound_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
    457 #define IDirectSound_SetSpeakerConfig(p,a)       (p)->lpVtbl->SetSpeakerConfig(p,a)
    458 #define IDirectSound_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
    459 #else
    460 /*** IUnknown methods ***/
    461 #define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    462 #define IDirectSound_AddRef(p)             (p)->AddRef()
    463 #define IDirectSound_Release(p)            (p)->Release()
    464 /*** IDirectSound methods ***/
    465 #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->CreateSoundBuffer(a,b,c)
    466 #define IDirectSound_GetCaps(p,a)                (p)->GetCaps(a)
    467 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
    468 #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->SetCooperativeLevel(a,b)
    469 #define IDirectSound_Compact(p)                  (p)->Compact()
    470 #define IDirectSound_GetSpeakerConfig(p,a)       (p)->GetSpeakerConfig(a)
    471 #define IDirectSound_SetSpeakerConfig(p,a)       (p)->SetSpeakerConfig(a)
    472 #define IDirectSound_Initialize(p,a)             (p)->Initialize(a)
    473 #endif
    474 
    475 
    476 /*****************************************************************************
    477  * IDirectSound8 interface
    478  */
    479 #define INTERFACE IDirectSound8
    480 DECLARE_INTERFACE_(IDirectSound8,IUnknown)
    481 {
    482     /*** IUnknown methods ***/
    483     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    484     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    485     STDMETHOD_(ULONG,Release)(THIS) PURE;
    486     /*** IDirectSound8 methods ***/
    487     STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
    488     STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
    489     STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
    490     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
    491     STDMETHOD(Compact)(THIS) PURE;
    492     STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
    493     STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
    494     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
    495     STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE;
    496 };
    497 #undef INTERFACE
    498 
    499 #if !defined(__cplusplus) || defined(CINTERFACE)
    500 /*** IUnknown methods ***/
    501 #define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    502 #define IDirectSound8_AddRef(p)             (p)->lpVtbl->AddRef(p)
    503 #define IDirectSound8_Release(p)            (p)->lpVtbl->Release(p)
    504 /*** IDirectSound methods ***/
    505 #define IDirectSound8_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
    506 #define IDirectSound8_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    507 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
    508 #define IDirectSound8_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
    509 #define IDirectSound8_Compact(p)                  (p)->lpVtbl->Compact(p)
    510 #define IDirectSound8_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
    511 #define IDirectSound8_SetSpeakerConfig(p,a)       (p)->lpVtbl->SetSpeakerConfig(p,a)
    512 #define IDirectSound8_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
    513 /*** IDirectSound8 methods ***/
    514 #define IDirectSound8_VerifyCertification(p,a)    (p)->lpVtbl->VerifyCertification(p,a)
    515 #else
    516 /*** IUnknown methods ***/
    517 #define IDirectSound8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    518 #define IDirectSound8_AddRef(p)             (p)->AddRef()
    519 #define IDirectSound8_Release(p)            (p)->Release()
    520 /*** IDirectSound methods ***/
    521 #define IDirectSound8_CreateSoundBuffer(p,a,b,c)  (p)->CreateSoundBuffer(a,b,c)
    522 #define IDirectSound8_GetCaps(p,a)                (p)->GetCaps(a)
    523 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
    524 #define IDirectSound8_SetCooperativeLevel(p,a,b)  (p)->SetCooperativeLevel(a,b)
    525 #define IDirectSound8_Compact(p)                  (p)->Compact()
    526 #define IDirectSound8_GetSpeakerConfig(p,a)       (p)->GetSpeakerConfig(a)
    527 #define IDirectSound8_SetSpeakerConfig(p,a)       (p)->SetSpeakerConfig(a)
    528 #define IDirectSound8_Initialize(p,a)             (p)->Initialize(a)
    529 /*** IDirectSound8 methods ***/
    530 #define IDirectSound8_VerifyCertification(p,a)    (p)->VerifyCertification(a)
    531 #endif
    532 
    533 
    534 /*****************************************************************************
    535  * IDirectSoundBuffer interface
    536  */
    537 #define INTERFACE IDirectSoundBuffer
    538 DECLARE_INTERFACE_(IDirectSoundBuffer,IUnknown)
    539 {
    540     /*** IUnknown methods ***/
    541     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    542     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    543     STDMETHOD_(ULONG,Release)(THIS) PURE;
    544     /*** IDirectSoundBuffer methods ***/
    545     STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
    546     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
    547     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    548     STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
    549     STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
    550     STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
    551     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    552     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
    553     STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
    554     STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
    555     STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
    556     STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
    557     STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
    558     STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
    559     STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
    560     STDMETHOD(Stop)(THIS) PURE;
    561     STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
    562     STDMETHOD(Restore)(THIS) PURE;
    563 };
    564 #undef INTERFACE
    565 
    566 #if !defined(__cplusplus) || defined(CINTERFACE)
    567 /*** IUnknown methods ***/
    568 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    569 #define IDirectSoundBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
    570 #define IDirectSoundBuffer_Release(p)            (p)->lpVtbl->Release(p)
    571 /*** IDirectSoundBuffer methods ***/
    572 #define IDirectSoundBuffer_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    573 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)   (p)->lpVtbl->GetCurrentPosition(p,a,b)
    574 #define IDirectSoundBuffer_GetFormat(p,a,b,c)          (p)->lpVtbl->GetFormat(p,a,b,c)
    575 #define IDirectSoundBuffer_GetVolume(p,a)              (p)->lpVtbl->GetVolume(p,a)
    576 #define IDirectSoundBuffer_GetPan(p,a)                 (p)->lpVtbl->GetPan(p,a)
    577 #define IDirectSoundBuffer_GetFrequency(p,a)           (p)->lpVtbl->GetFrequency(p,a)
    578 #define IDirectSoundBuffer_GetStatus(p,a)              (p)->lpVtbl->GetStatus(p,a)
    579 #define IDirectSoundBuffer_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
    580 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)       (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    581 #define IDirectSoundBuffer_Play(p,a,b,c)               (p)->lpVtbl->Play(p,a,b,c)
    582 #define IDirectSoundBuffer_SetCurrentPosition(p,a)     (p)->lpVtbl->SetCurrentPosition(p,a)
    583 #define IDirectSoundBuffer_SetFormat(p,a)              (p)->lpVtbl->SetFormat(p,a)
    584 #define IDirectSoundBuffer_SetVolume(p,a)              (p)->lpVtbl->SetVolume(p,a)
    585 #define IDirectSoundBuffer_SetPan(p,a)                 (p)->lpVtbl->SetPan(p,a)
    586 #define IDirectSoundBuffer_SetFrequency(p,a)           (p)->lpVtbl->SetFrequency(p,a)
    587 #define IDirectSoundBuffer_Stop(p)                     (p)->lpVtbl->Stop(p)
    588 #define IDirectSoundBuffer_Unlock(p,a,b,c,d)           (p)->lpVtbl->Unlock(p,a,b,c,d)
    589 #define IDirectSoundBuffer_Restore(p)                  (p)->lpVtbl->Restore(p)
    590 #else
    591 /*** IUnknown methods ***/
    592 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    593 #define IDirectSoundBuffer_AddRef(p)             (p)->AddRef()
    594 #define IDirectSoundBuffer_Release(p)            (p)->Release()
    595 /*** IDirectSoundBuffer methods ***/
    596 #define IDirectSoundBuffer_GetCaps(p,a)                (p)->GetCaps(a)
    597 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)   (p)->GetCurrentPosition(a,b)
    598 #define IDirectSoundBuffer_GetFormat(p,a,b,c)          (p)->GetFormat(a,b,c)
    599 #define IDirectSoundBuffer_GetVolume(p,a)              (p)->GetVolume(a)
    600 #define IDirectSoundBuffer_GetPan(p,a)                 (p)->GetPan(a)
    601 #define IDirectSoundBuffer_GetFrequency(p,a)           (p)->GetFrequency(a)
    602 #define IDirectSoundBuffer_GetStatus(p,a)              (p)->GetStatus(a)
    603 #define IDirectSoundBuffer_Initialize(p,a,b)           (p)->Initialize(a,b)
    604 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)       (p)->Lock(a,b,c,d,e,f,g)
    605 #define IDirectSoundBuffer_Play(p,a,b,c)               (p)->Play(a,b,c)
    606 #define IDirectSoundBuffer_SetCurrentPosition(p,a)     (p)->SetCurrentPosition(a)
    607 #define IDirectSoundBuffer_SetFormat(p,a)              (p)->SetFormat(a)
    608 #define IDirectSoundBuffer_SetVolume(p,a)              (p)->SetVolume(a)
    609 #define IDirectSoundBuffer_SetPan(p,a)                 (p)->SetPan(a)
    610 #define IDirectSoundBuffer_SetFrequency(p,a)           (p)->SetFrequency(a)
    611 #define IDirectSoundBuffer_Stop(p)                     (p)->Stop()
    612 #define IDirectSoundBuffer_Unlock(p,a,b,c,d)           (p)->Unlock(a,b,c,d)
    613 #define IDirectSoundBuffer_Restore(p)                  (p)->Restore()
    614 #endif
    615 
    616 
    617 /*****************************************************************************
    618  * IDirectSoundBuffer8 interface
    619  */
    620 #define INTERFACE IDirectSoundBuffer8
    621 DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown)
    622 {
    623     /*** IUnknown methods ***/
    624     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    625     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    626     STDMETHOD_(ULONG,Release)(THIS) PURE;
    627     /*** IDirectSoundBuffer8 methods ***/
    628     STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
    629     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
    630     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    631     STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
    632     STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
    633     STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
    634     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    635     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
    636     STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
    637     STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
    638     STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
    639     STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
    640     STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
    641     STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
    642     STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
    643     STDMETHOD(Stop)(THIS) PURE;
    644     STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
    645     STDMETHOD(Restore)(THIS) PURE;
    646     STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
    647     STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
    648     STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
    649 };
    650 #undef INTERFACE
    651 
    652 #if !defined(__cplusplus) || defined(CINTERFACE)
    653 /*** IUnknown methods ***/
    654 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    655 #define IDirectSoundBuffer8_AddRef(p)             (p)->lpVtbl->AddRef(p)
    656 #define IDirectSoundBuffer8_Release(p)            (p)->lpVtbl->Release(p)
    657 /*** IDirectSoundBuffer methods ***/
    658 #define IDirectSoundBuffer8_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    659 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b)   (p)->lpVtbl->GetCurrentPosition(p,a,b)
    660 #define IDirectSoundBuffer8_GetFormat(p,a,b,c)          (p)->lpVtbl->GetFormat(p,a,b,c)
    661 #define IDirectSoundBuffer8_GetVolume(p,a)              (p)->lpVtbl->GetVolume(p,a)
    662 #define IDirectSoundBuffer8_GetPan(p,a)                 (p)->lpVtbl->GetPan(p,a)
    663 #define IDirectSoundBuffer8_GetFrequency(p,a)           (p)->lpVtbl->GetFrequency(p,a)
    664 #define IDirectSoundBuffer8_GetStatus(p,a)              (p)->lpVtbl->GetStatus(p,a)
    665 #define IDirectSoundBuffer8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
    666 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g)       (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    667 #define IDirectSoundBuffer8_Play(p,a,b,c)               (p)->lpVtbl->Play(p,a,b,c)
    668 #define IDirectSoundBuffer8_SetCurrentPosition(p,a)     (p)->lpVtbl->SetCurrentPosition(p,a)
    669 #define IDirectSoundBuffer8_SetFormat(p,a)              (p)->lpVtbl->SetFormat(p,a)
    670 #define IDirectSoundBuffer8_SetVolume(p,a)              (p)->lpVtbl->SetVolume(p,a)
    671 #define IDirectSoundBuffer8_SetPan(p,a)                 (p)->lpVtbl->SetPan(p,a)
    672 #define IDirectSoundBuffer8_SetFrequency(p,a)           (p)->lpVtbl->SetFrequency(p,a)
    673 #define IDirectSoundBuffer8_Stop(p)                     (p)->lpVtbl->Stop(p)
    674 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d)           (p)->lpVtbl->Unlock(p,a,b,c,d)
    675 #define IDirectSoundBuffer8_Restore(p)                  (p)->lpVtbl->Restore(p)
    676 /*** IDirectSoundBuffer8 methods ***/
    677 #define IDirectSoundBuffer8_SetFX(p,a,b,c)              (p)->lpVtbl->SetFX(p,a,b,c)
    678 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c)   (p)->lpVtbl->AcquireResources(p,a,b,c)
    679 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d)  (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
    680 #else
    681 /*** IUnknown methods ***/
    682 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    683 #define IDirectSoundBuffer8_AddRef(p)             (p)->AddRef()
    684 #define IDirectSoundBuffer8_Release(p)            (p)->Release()
    685 /*** IDirectSoundBuffer methods ***/
    686 #define IDirectSoundBuffer8_GetCaps(p,a)                (p)->GetCaps(a)
    687 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b)   (p)->GetCurrentPosition(a,b)
    688 #define IDirectSoundBuffer8_GetFormat(p,a,b,c)          (p)->GetFormat(a,b,c)
    689 #define IDirectSoundBuffer8_GetVolume(p,a)              (p)->GetVolume(a)
    690 #define IDirectSoundBuffer8_GetPan(p,a)                 (p)->GetPan(a)
    691 #define IDirectSoundBuffer8_GetFrequency(p,a)           (p)->GetFrequency(a)
    692 #define IDirectSoundBuffer8_GetStatus(p,a)              (p)->GetStatus(a)
    693 #define IDirectSoundBuffer8_Initialize(p,a,b)           (p)->Initialize(a,b)
    694 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g)       (p)->Lock(a,b,c,d,e,f,g)
    695 #define IDirectSoundBuffer8_Play(p,a,b,c)               (p)->Play(a,b,c)
    696 #define IDirectSoundBuffer8_SetCurrentPosition(p,a)     (p)->SetCurrentPosition(a)
    697 #define IDirectSoundBuffer8_SetFormat(p,a)              (p)->SetFormat(a)
    698 #define IDirectSoundBuffer8_SetVolume(p,a)              (p)->SetVolume(a)
    699 #define IDirectSoundBuffer8_SetPan(p,a)                 (p)->SetPan(a)
    700 #define IDirectSoundBuffer8_SetFrequency(p,a)           (p)->SetFrequency(a)
    701 #define IDirectSoundBuffer8_Stop(p)                     (p)->Stop()
    702 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d)           (p)->Unlock(a,b,c,d)
    703 #define IDirectSoundBuffer8_Restore(p)                  (p)->Restore()
    704 /*** IDirectSoundBuffer8 methods ***/
    705 #define IDirectSoundBuffer8_SetFX(p,a,b,c)              (p)->SetFX(a,b,c)
    706 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c)   (p)->AcquireResources(a,b,c)
    707 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d)  (p)->GetObjectInPath(a,b,c,d)
    708 #endif
    709 
    710 
    711 /*****************************************************************************
    712  * IDirectSoundCapture interface
    713  */
    714 #define INTERFACE IDirectSoundCapture
    715 DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown)
    716 {
    717     /*** IUnknown methods ***/
    718     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    719     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    720     STDMETHOD_(ULONG,Release)(THIS) PURE;
    721     /*** IDirectSoundCapture methods ***/
    722     STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE;
    723     STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE;
    724     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE;
    725 };
    726 #undef INTERFACE
    727 
    728 #if !defined(__cplusplus) || defined(CINTERFACE)
    729 /*** IUnknown methods ***/
    730 #define IDirectSoundCapture_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
    731 #define IDirectSoundCapture_AddRef(p)                    (p)->lpVtbl->AddRef(p)
    732 #define IDirectSoundCapture_Release(p)                   (p)->lpVtbl->Release(p)
    733 /*** IDirectSoundCapture methods ***/
    734 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
    735 #define IDirectSoundCapture_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
    736 #define IDirectSoundCapture_Initialize(p,a)              (p)->lpVtbl->Initialize(p,a)
    737 #else
    738 /*** IUnknown methods ***/
    739 #define IDirectSoundCapture_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
    740 #define IDirectSoundCapture_AddRef(p)                    (p)->AddRef()
    741 #define IDirectSoundCapture_Release(p)                   (p)->Release()
    742 /*** IDirectSoundCapture methods ***/
    743 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
    744 #define IDirectSoundCapture_GetCaps(p,a)                 (p)->GetCaps(a)
    745 #define IDirectSoundCapture_Initialize(p,a)              (p)->Initialize(a)
    746 #endif
    747 
    748 /*****************************************************************************
    749  * IDirectSoundCaptureBuffer interface
    750  */
    751 #define INTERFACE IDirectSoundCaptureBuffer
    752 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,IUnknown)
    753 {
    754     /*** IUnknown methods ***/
    755     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    756     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    757     STDMETHOD_(ULONG,Release)(THIS) PURE;
    758     /*** IDirectSoundCaptureBuffer methods ***/
    759     STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
    760     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
    761     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    762     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    763     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
    764     STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
    765     STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
    766     STDMETHOD(Stop)(THIS) PURE;
    767     STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
    768 };
    769 #undef INTERFACE
    770 
    771 #if !defined(__cplusplus) || defined(CINTERFACE)
    772 /*** IUnknown methods ***/
    773 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)     (p)->lpVtbl->QueryInterface(p,a,b)
    774 #define IDirectSoundCaptureBuffer_AddRef(p)                 (p)->lpVtbl->AddRef(p)
    775 #define IDirectSoundCaptureBuffer_Release(p)                (p)->lpVtbl->Release(p)
    776 /*** IDirectSoundCaptureBuffer methods ***/
    777 #define IDirectSoundCaptureBuffer_GetCaps(p,a)              (p)->lpVtbl->GetCaps(p,a)
    778 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
    779 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)        (p)->lpVtbl->GetFormat(p,a,b,c)
    780 #define IDirectSoundCaptureBuffer_GetStatus(p,a)            (p)->lpVtbl->GetStatus(p,a)
    781 #define IDirectSoundCaptureBuffer_Initialize(p,a,b)         (p)->lpVtbl->Initialize(p,a,b)
    782 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)     (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    783 #define IDirectSoundCaptureBuffer_Start(p,a)                (p)->lpVtbl->Start(p,a)
    784 #define IDirectSoundCaptureBuffer_Stop(p)                   (p)->lpVtbl->Stop(p)
    785 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)         (p)->lpVtbl->Unlock(p,a,b,c,d)
    786 #else
    787 /*** IUnknown methods ***/
    788 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)     (p)->QueryInterface(a,b)
    789 #define IDirectSoundCaptureBuffer_AddRef(p)                 (p)->AddRef()
    790 #define IDirectSoundCaptureBuffer_Release(p)                (p)->Release()
    791 /*** IDirectSoundCaptureBuffer methods ***/
    792 #define IDirectSoundCaptureBuffer_GetCaps(p,a)              (p)->GetCaps(a)
    793 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
    794 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)        (p)->GetFormat(a,b,c)
    795 #define IDirectSoundCaptureBuffer_GetStatus(p,a)            (p)->GetStatus(a)
    796 #define IDirectSoundCaptureBuffer_Initialize(p,a,b)         (p)->Initialize(a,b)
    797 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)     (p)->Lock(a,b,c,d,e,f,g)
    798 #define IDirectSoundCaptureBuffer_Start(p,a)                (p)->Start(a)
    799 #define IDirectSoundCaptureBuffer_Stop(p)                   (p)->Stop()
    800 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)         (p)->Unlock(a,b,c,d)
    801 #endif
    802 
    803 /*****************************************************************************
    804  * IDirectSoundCaptureBuffer8 interface
    805  */
    806 #define INTERFACE IDirectSoundCaptureBuffer8
    807 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)
    808 {
    809     /*** IUnknown methods ***/
    810     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    811     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    812     STDMETHOD_(ULONG,Release)(THIS) PURE;
    813     /*** IDirectSoundCaptureBuffer methods ***/
    814     STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
    815     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
    816     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    817     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    818     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
    819     STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
    820     STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
    821     STDMETHOD(Stop)(THIS) PURE;
    822     STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
    823     /*** IDirectSoundCaptureBuffer8 methods ***/
    824     STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
    825     STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
    826 };
    827 #undef INTERFACE
    828 
    829 #if !defined(__cplusplus) || defined(CINTERFACE)
    830 /*** IUnknown methods ***/
    831 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
    832 #define IDirectSoundCaptureBuffer8_AddRef(p)                  (p)->lpVtbl->AddRef(p)
    833 #define IDirectSoundCaptureBuffer8_Release(p)                 (p)->lpVtbl->Release(p)
    834 /*** IDirectSoundCaptureBuffer methods ***/
    835 #define IDirectSoundCaptureBuffer8_GetCaps(p,a)               (p)->lpVtbl->GetCaps(p,a)
    836 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b)  (p)->lpVtbl->GetCurrentPosition(p,a,b)
    837 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c)         (p)->lpVtbl->GetFormat(p,a,b,c)
    838 #define IDirectSoundCaptureBuffer8_GetStatus(p,a)             (p)->lpVtbl->GetStatus(p,a)
    839 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b)          (p)->lpVtbl->Initialize(p,a,b)
    840 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g)      (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    841 #define IDirectSoundCaptureBuffer8_Start(p,a)                 (p)->lpVtbl->Start(p,a)
    842 #define IDirectSoundCaptureBuffer8_Stop(p)                    (p)->lpVtbl->Stop(p)
    843 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d)          (p)->lpVtbl->Unlock(p,a,b,c,d)
    844 /*** IDirectSoundCaptureBuffer8 methods ***/
    845 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
    846 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b)         (p)->lpVtbl->GetFXStatus(p,a,b)
    847 #else
    848 /*** IUnknown methods ***/
    849 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b)      (p)->QueryInterface(a,b)
    850 #define IDirectSoundCaptureBuffer8_AddRef(p)                  (p)->AddRef()
    851 #define IDirectSoundCaptureBuffer8_Release(p)                 (p)->Release()
    852 /*** IDirectSoundCaptureBuffer methods ***/
    853 #define IDirectSoundCaptureBuffer8_GetCaps(p,a)               (p)->GetCaps(a)
    854 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b)  (p)->GetCurrentPosition(a,b)
    855 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c)         (p)->GetFormat(a,b,c)
    856 #define IDirectSoundCaptureBuffer8_GetStatus(p,a)             (p)->GetStatus(a)
    857 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b)          (p)->Initialize(a,b)
    858 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g)      (p)->Lock(a,b,c,d,e,f,g)
    859 #define IDirectSoundCaptureBuffer8_Start(p,a)                 (p)->Start(a)
    860 #define IDirectSoundCaptureBuffer8_Stop(p)                    (p)->Stop()
    861 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d)          (p)->Unlock(a,b,c,d)
    862 /*** IDirectSoundCaptureBuffer8 methods ***/
    863 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
    864 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b)         (p)->GetFXStatus(a,b)
    865 #endif
    866 
    867 /*****************************************************************************
    868  * IDirectSoundNotify interface
    869  */
    870 #define WINE_NOBUFFER                   0x80000000
    871 
    872 #define DSBPN_OFFSETSTOP		-1
    873 
    874 #define INTERFACE IDirectSoundNotify
    875 DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)
    876 {
    877     /*** IUnknown methods ***/
    878     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    879     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    880     STDMETHOD_(ULONG,Release)(THIS) PURE;
    881     /*** IDirectSoundNotify methods ***/
    882     STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
    883 };
    884 #undef INTERFACE
    885 
    886 #if !defined(__cplusplus) || defined(CINTERFACE)
    887 /*** IUnknown methods ***/
    888 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    889 #define IDirectSoundNotify_AddRef(p)             (p)->lpVtbl->AddRef(p)
    890 #define IDirectSoundNotify_Release(p)            (p)->lpVtbl->Release(p)
    891 /*** IDirectSoundNotify methods ***/
    892 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
    893 #else
    894 /*** IUnknown methods ***/
    895 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    896 #define IDirectSoundNotify_AddRef(p)             (p)->AddRef()
    897 #define IDirectSoundNotify_Release(p)            (p)->Release()
    898 /*** IDirectSoundNotify methods ***/
    899 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
    900 #endif
    901 
    902 
    903 /*****************************************************************************
    904  * IDirectSound3DListener interface
    905  */
    906 #define DS3DMODE_NORMAL             0x00000000
    907 #define DS3DMODE_HEADRELATIVE       0x00000001
    908 #define DS3DMODE_DISABLE            0x00000002
    909 
    910 #define DS3D_IMMEDIATE              0x00000000
    911 #define DS3D_DEFERRED               0x00000001
    912 
    913 #define DS3D_MINDISTANCEFACTOR      FLT_MIN
    914 #define DS3D_MAXDISTANCEFACTOR      FLT_MAX
    915 #define DS3D_DEFAULTDISTANCEFACTOR  1.0f
    916 
    917 #define DS3D_MINROLLOFFFACTOR       0.0f
    918 #define DS3D_MAXROLLOFFFACTOR       10.0f
    919 #define DS3D_DEFAULTROLLOFFFACTOR   1.0f
    920 
    921 #define DS3D_MINDOPPLERFACTOR       0.0f
    922 #define DS3D_MAXDOPPLERFACTOR       10.0f
    923 #define DS3D_DEFAULTDOPPLERFACTOR   1.0f
    924 
    925 #define DS3D_DEFAULTMINDISTANCE     1.0f
    926 #define DS3D_DEFAULTMAXDISTANCE     1000000000.0f
    927 
    928 #define DS3D_MINCONEANGLE           0
    929 #define DS3D_MAXCONEANGLE           360
    930 #define DS3D_DEFAULTCONEANGLE       360
    931 
    932 #define DS3D_DEFAULTCONEOUTSIDEVOLUME   DSBVOLUME_MAX
    933 
    934 typedef struct _DS3DLISTENER {
    935     DWORD				dwSize;
    936     D3DVECTOR			vPosition;
    937     D3DVECTOR			vVelocity;
    938     D3DVECTOR			vOrientFront;
    939     D3DVECTOR			vOrientTop;
    940     D3DVALUE			flDistanceFactor;
    941     D3DVALUE			flRolloffFactor;
    942     D3DVALUE			flDopplerFactor;
    943 } DS3DLISTENER, *LPDS3DLISTENER;
    944 
    945 typedef const DS3DLISTENER *LPCDS3DLISTENER;
    946 
    947 #define INTERFACE IDirectSound3DListener
    948 DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)
    949 {
    950     /*** IUnknown methods ***/
    951     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    952     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    953     STDMETHOD_(ULONG,Release)(THIS) PURE;
    954     /*** IDirectSound3DListener methods ***/
    955     STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE;
    956     STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE;
    957     STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE;
    958     STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE;
    959     STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
    960     STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE;
    961     STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
    962     STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE;
    963     STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
    964     STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
    965     STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
    966     STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
    967     STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
    968     STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
    969     STDMETHOD(CommitDeferredSettings)(THIS) PURE;
    970 };
    971 #undef INTERFACE
    972 
    973 #if !defined(__cplusplus) || defined(CINTERFACE)
    974 /*** IUnknown methods ***/
    975 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    976 #define IDirectSound3DListener_AddRef(p)             (p)->lpVtbl->AddRef(p)
    977 #define IDirectSound3DListener_Release(p)            (p)->lpVtbl->Release(p)
    978 /*** IDirectSound3DListener methods ***/
    979 #define IDirectSound3DListener_GetAllParameters(p,a)           (p)->lpVtbl->GetAllParameters(p,a)
    980 #define IDirectSound3DListener_GetDistanceFactor(p,a)          (p)->lpVtbl->GetDistanceFactor(p,a)
    981 #define IDirectSound3DListener_GetDopplerFactor(p,a)           (p)->lpVtbl->GetDopplerFactor(p,a)
    982 #define IDirectSound3DListener_GetOrientation(p,a,b)           (p)->lpVtbl->GetOrientation(p,a,b)
    983 #define IDirectSound3DListener_GetPosition(p,a)                (p)->lpVtbl->GetPosition(p,a)
    984 #define IDirectSound3DListener_GetRolloffFactor(p,a)           (p)->lpVtbl->GetRolloffFactor(p,a)
    985 #define IDirectSound3DListener_GetVelocity(p,a)                (p)->lpVtbl->GetVelocity(p,a)
    986 #define IDirectSound3DListener_SetAllParameters(p,a,b)         (p)->lpVtbl->SetAllParameters(p,a,b)
    987 #define IDirectSound3DListener_SetDistanceFactor(p,a,b)        (p)->lpVtbl->SetDistanceFactor(p,a,b)
    988 #define IDirectSound3DListener_SetDopplerFactor(p,a,b)         (p)->lpVtbl->SetDopplerFactor(p,a,b)
    989 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
    990 #define IDirectSound3DListener_SetPosition(p,a,b,c,d)          (p)->lpVtbl->SetPosition(p,a,b,c,d)
    991 #define IDirectSound3DListener_SetRolloffFactor(p,a,b)         (p)->lpVtbl->SetRolloffFactor(p,a,b)
    992 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)          (p)->lpVtbl->SetVelocity(p,a,b,c,d)
    993 #define IDirectSound3DListener_CommitDeferredSettings(p)       (p)->lpVtbl->CommitDeferredSettings(p)
    994 #else
    995 /*** IUnknown methods ***/
    996 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    997 #define IDirectSound3DListener_AddRef(p)             (p)->AddRef()
    998 #define IDirectSound3DListener_Release(p)            (p)->Release()
    999 /*** IDirectSound3DListener methods ***/
   1000 #define IDirectSound3DListener_GetAllParameters(p,a)           (p)->GetAllParameters(a)
   1001 #define IDirectSound3DListener_GetDistanceFactor(p,a)          (p)->GetDistanceFactor(a)
   1002 #define IDirectSound3DListener_GetDopplerFactor(p,a)           (p)->GetDopplerFactor(a)
   1003 #define IDirectSound3DListener_GetOrientation(p,a,b)           (p)->GetOrientation(a,b)
   1004 #define IDirectSound3DListener_GetPosition(p,a)                (p)->GetPosition(a)
   1005 #define IDirectSound3DListener_GetRolloffFactor(p,a)           (p)->GetRolloffFactor(a)
   1006 #define IDirectSound3DListener_GetVelocity(p,a)                (p)->GetVelocity(a)
   1007 #define IDirectSound3DListener_SetAllParameters(p,a,b)         (p)->SetAllParameters(a,b)
   1008 #define IDirectSound3DListener_SetDistanceFactor(p,a,b)        (p)->SetDistanceFactor(a,b)
   1009 #define IDirectSound3DListener_SetDopplerFactor(p,a,b)         (p)->SetDopplerFactor(a,b)
   1010 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
   1011 #define IDirectSound3DListener_SetPosition(p,a,b,c,d)          (p)->SetPosition(a,b,c,d)
   1012 #define IDirectSound3DListener_SetRolloffFactor(p,a,b)         (p)->SetRolloffFactor(a,b)
   1013 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)          (p)->SetVelocity(a,b,c,d)
   1014 #define IDirectSound3DListener_CommitDeferredSettings(p)       (p)->CommitDeferredSettings()
   1015 #endif
   1016 
   1017 
   1018 /*****************************************************************************
   1019  * IDirectSound3DBuffer interface
   1020  */
   1021 typedef struct  _DS3DBUFFER {
   1022     DWORD				dwSize;
   1023     D3DVECTOR			vPosition;
   1024     D3DVECTOR			vVelocity;
   1025     DWORD				dwInsideConeAngle;
   1026     DWORD				dwOutsideConeAngle;
   1027     D3DVECTOR			vConeOrientation;
   1028     LONG				lConeOutsideVolume;
   1029     D3DVALUE			flMinDistance;
   1030     D3DVALUE			flMaxDistance;
   1031     DWORD				dwMode;
   1032 } DS3DBUFFER, *LPDS3DBUFFER;
   1033 
   1034 typedef const DS3DBUFFER *LPCDS3DBUFFER;
   1035 
   1036 #define INTERFACE IDirectSound3DBuffer
   1037 DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown)
   1038 {
   1039     /*** IUnknown methods ***/
   1040     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1041     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1042     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1043     /*** IDirectSound3DBuffer methods ***/
   1044     STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE;
   1045     STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE;
   1046     STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE;
   1047     STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE;
   1048     STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE;
   1049     STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE;
   1050     STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE;
   1051     STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
   1052     STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
   1053     STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE;
   1054     STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
   1055     STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1056     STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
   1057     STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
   1058     STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
   1059     STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE;
   1060     STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1061     STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1062 };
   1063 #undef INTERFACE
   1064 
   1065 #if !defined(__cplusplus) || defined(CINTERFACE)
   1066 /*** IUnknown methods ***/
   1067 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1068 #define IDirectSound3DBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1069 #define IDirectSound3DBuffer_Release(p)            (p)->lpVtbl->Release(p)
   1070 /*** IDirectSound3DBuffer methods ***/
   1071 #define IDirectSound3DBuffer_GetAllParameters(p,a)         (p)->lpVtbl->GetAllParameters(p,a)
   1072 #define IDirectSound3DBuffer_GetConeAngles(p,a,b)          (p)->lpVtbl->GetConeAngles(p,a,b)
   1073 #define IDirectSound3DBuffer_GetConeOrientation(p,a)       (p)->lpVtbl->GetConeOrientation(p,a)
   1074 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)     (p)->lpVtbl->GetConeOutsideVolume(p,a)
   1075 #define IDirectSound3DBuffer_GetMaxDistance(p,a)           (p)->lpVtbl->GetMaxDistance(p,a)
   1076 #define IDirectSound3DBuffer_GetMinDistance(p,a)           (p)->lpVtbl->GetMinDistance(p,a)
   1077 #define IDirectSound3DBuffer_GetMode(p,a)                  (p)->lpVtbl->GetMode(p,a)
   1078 #define IDirectSound3DBuffer_GetPosition(p,a)              (p)->lpVtbl->GetPosition(p,a)
   1079 #define IDirectSound3DBuffer_GetVelocity(p,a)              (p)->lpVtbl->GetVelocity(p,a)
   1080 #define IDirectSound3DBuffer_SetAllParameters(p,a,b)       (p)->lpVtbl->SetAllParameters(p,a,b)
   1081 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)        (p)->lpVtbl->SetConeAngles(p,a,b,c)
   1082 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
   1083 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)   (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
   1084 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)         (p)->lpVtbl->SetMaxDistance(p,a,b)
   1085 #define IDirectSound3DBuffer_SetMinDistance(p,a,b)         (p)->lpVtbl->SetMinDistance(p,a,b)
   1086 #define IDirectSound3DBuffer_SetMode(p,a,b)                (p)->lpVtbl->SetMode(p,a,b)
   1087 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)        (p)->lpVtbl->SetPosition(p,a,b,c,d)
   1088 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)        (p)->lpVtbl->SetVelocity(p,a,b,c,d)
   1089 #else
   1090 /*** IUnknown methods ***/
   1091 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
   1092 #define IDirectSound3DBuffer_AddRef(p)             (p)->AddRef()
   1093 #define IDirectSound3DBuffer_Release(p)            (p)->Release()
   1094 /*** IDirectSound3DBuffer methods ***/
   1095 #define IDirectSound3DBuffer_GetAllParameters(p,a)         (p)->GetAllParameters(a)
   1096 #define IDirectSound3DBuffer_GetConeAngles(p,a,b)          (p)->GetConeAngles(a,b)
   1097 #define IDirectSound3DBuffer_GetConeOrientation(p,a)       (p)->GetConeOrientation(a)
   1098 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)     (p)->GetConeOutsideVolume(a)
   1099 #define IDirectSound3DBuffer_GetMaxDistance(p,a)           (p)->GetMaxDistance(a)
   1100 #define IDirectSound3DBuffer_GetMinDistance(p,a)           (p)->GetMinDistance(a)
   1101 #define IDirectSound3DBuffer_GetMode(p,a)                  (p)->GetMode(a)
   1102 #define IDirectSound3DBuffer_GetPosition(p,a)              (p)->GetPosition(a)
   1103 #define IDirectSound3DBuffer_GetVelocity(p,a)              (p)->GetVelocity(a)
   1104 #define IDirectSound3DBuffer_SetAllParameters(p,a,b)       (p)->SetAllParameters(a,b)
   1105 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)        (p)->SetConeAngles(a,b,c)
   1106 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
   1107 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)   (p)->SetConeOutsideVolume(a,b)
   1108 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)         (p)->SetMaxDistance(a,b)
   1109 #define IDirectSound3DBuffer_SetMinDistance(p,a,b)         (p)->SetMinDistance(a,b)
   1110 #define IDirectSound3DBuffer_SetMode(p,a,b)                (p)->SetMode(a,b)
   1111 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)        (p)->SetPosition(a,b,c,d)
   1112 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)        (p)->SetVelocity(a,b,c,d)
   1113 #endif
   1114 
   1115 /*****************************************************************************
   1116  * IKsPropertySet interface
   1117  */
   1118 #ifndef _IKsPropertySet_
   1119 #define _IKsPropertySet_
   1120 
   1121 typedef struct IKsPropertySet *LPKSPROPERTYSET;
   1122 
   1123 DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
   1124 
   1125 #define KSPROPERTY_SUPPORT_GET	1
   1126 #define KSPROPERTY_SUPPORT_SET	2
   1127 
   1128 #define INTERFACE IKsPropertySet
   1129 DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
   1130 {
   1131     /*** IUnknown methods ***/
   1132     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1133     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1134     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1135     /*** IKsPropertySet methods ***/
   1136     STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE;
   1137     STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE;
   1138     STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE;
   1139 };
   1140 #undef INTERFACE
   1141 
   1142 #if !defined(__cplusplus) || defined(CINTERFACE)
   1143 /*** IUnknown methods ***/
   1144 #define IKsPropertySet_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
   1145 #define IKsPropertySet_AddRef(p)                (p)->lpVtbl->AddRef(p)
   1146 #define IKsPropertySet_Release(p)               (p)->lpVtbl->Release(p)
   1147 /*** IKsPropertySet methods ***/
   1148 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)     (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
   1149 #define IKsPropertySet_Set(p,a,b,c,d,e,f)       (p)->lpVtbl->Set(p,a,b,c,d,e,f)
   1150 #define IKsPropertySet_QuerySupport(p,a,b,c)    (p)->lpVtbl->QuerySupport(p,a,b,c)
   1151 #else
   1152 /*** IUnknown methods ***/
   1153 #define IKsPropertySet_QueryInterface(p,a,b)    (p)->QueryInterface(a,b)
   1154 #define IKsPropertySet_AddRef(p)                (p)->AddRef()
   1155 #define IKsPropertySet_Release(p)               (p)->Release()
   1156 /*** IKsPropertySet methods ***/
   1157 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)     (p)->Get(a,b,c,d,e,f,g)
   1158 #define IKsPropertySet_Set(p,a,b,c,d,e,f)       (p)->Set(a,b,c,d,e,f)
   1159 #define IKsPropertySet_QuerySupport(p,a,b,c)    (p)->QuerySupport(a,b,c)
   1160 #endif
   1161 
   1162 #endif /* _IKsPropertySet_ */
   1163 
   1164 /*****************************************************************************
   1165  * IDirectSoundFullDuplex interface
   1166  */
   1167 #define INTERFACE IDirectSoundFullDuplex
   1168 DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown)
   1169 {
   1170     /*** IUnknown methods ***/
   1171     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1172     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1173     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1174     /*** IDirectSoundFullDuplex methods ***/
   1175     STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
   1176 };
   1177 #undef INTERFACE
   1178 
   1179 #if !defined(__cplusplus) || defined(CINTERFACE)
   1180 /*** IUnknown methods ***/
   1181 #define IDirectSoundFullDuplex_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
   1182 #define IDirectSoundFullDuplex_AddRef(p)                (p)->lpVtbl->AddRef(p)
   1183 #define IDirectSoundFullDuplex_Release(p)               (p)->lpVtbl->Release(p)
   1184 /*** IDirectSoundFullDuplex methods ***/
   1185 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h)    (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
   1186 #else
   1187 /*** IUnknown methods ***/
   1188 #define IDirectSoundFullDuplex_QueryInterface(p,a,b)    (p)->QueryInterface(a,b)
   1189 #define IDirectSoundFullDuplex_AddRef(p)                (p)->AddRef()
   1190 #define IDirectSoundFullDuplex_Release(p)               (p)->Release()
   1191 /*** IDirectSoundFullDuplex methods ***/
   1192 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h)    (p)->Initialize(a,b,c,d,e,f,g,h)
   1193 #endif
   1194 
   1195 #ifdef __cplusplus
   1196 } /* extern "C" */
   1197 #endif /* defined(__cplusplus) */
   1198 
   1199 #endif /* __DSOUND_INCLUDED__ */
   1200