zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

dsound.h (93896B) - Raw


      1 /*
      2  * Copyright (C) the Wine project
      3  *
      4  * This library is free software; you can redistribute it and/or
      5  * modify it under the terms of the GNU Lesser General Public
      6  * License as published by the Free Software Foundation; either
      7  * version 2.1 of the License, or (at your option) any later version.
      8  *
      9  * This library is distributed in the hope that it will be useful,
     10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12  * Lesser General Public License for more details.
     13  *
     14  * You should have received a copy of the GNU Lesser General Public
     15  * License along with this library; if not, write to the Free Software
     16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
     17  */
     18 
     19 #include <_mingw_unicode.h>
     20 #undef INTERFACE
     21 
     22 #ifndef __DSOUND_INCLUDED__
     23 #define __DSOUND_INCLUDED__
     24 
     25 #ifndef DIRECTSOUND_VERSION
     26 #define DIRECTSOUND_VERSION 0x0900
     27 #endif
     28 
     29 #define COM_NO_WINDOWS_H
     30 #include <objbase.h>
     31 #include <float.h>
     32 
     33 #ifdef __cplusplus
     34 extern "C" {
     35 #endif /* defined(__cplusplus) */
     36 
     37 #ifndef DX_SHARED_DEFINES
     38 
     39 typedef float D3DVALUE, *LPD3DVALUE;
     40 
     41 #ifndef D3DCOLOR_DEFINED
     42 typedef DWORD D3DCOLOR, *LPD3DCOLOR;
     43 #define D3DCOLOR_DEFINED
     44 #endif
     45 
     46 #ifndef D3DVECTOR_DEFINED
     47 typedef struct _D3DVECTOR {
     48     float x;
     49     float y;
     50     float z;
     51 } D3DVECTOR;
     52 #define D3DVECTOR_DEFINED
     53 #endif
     54 
     55 #ifndef LPD3DVECTOR_DEFINED
     56 typedef D3DVECTOR *LPD3DVECTOR;
     57 #define LPD3DVECTOR_DEFINED
     58 #endif
     59 
     60 #define DX_SHARED_DEFINES
     61 #endif /* DX_SHARED_DEFINES */
     62 
     63 /*****************************************************************************
     64  * Predeclare the interfaces
     65  */
     66 DEFINE_GUID(CLSID_DirectSound,		0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
     67 DEFINE_GUID(CLSID_DirectSound8,		0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
     68 DEFINE_GUID(CLSID_DirectSoundCapture,	0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
     69 DEFINE_GUID(CLSID_DirectSoundCapture8,	0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
     70 DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
     71 
     72 DEFINE_GUID(IID_IDirectSound,		0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
     73 typedef struct IDirectSound *LPDIRECTSOUND,**LPLPDIRECTSOUND;
     74 
     75 DEFINE_GUID(IID_IDirectSound8,		0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66);
     76 typedef struct IDirectSound8 *LPDIRECTSOUND8,**LPLPDIRECTSOUND8;
     77 
     78 DEFINE_GUID(IID_IDirectSoundBuffer,	0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
     79 typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
     80 
     81 DEFINE_GUID(IID_IDirectSoundBuffer8,	0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
     82 typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8,**LPLPDIRECTSOUNDBUFFER8;
     83 
     84 DEFINE_GUID(IID_IDirectSoundNotify,	0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
     85 typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY,**LPLPDIRECTSOUNDNOTIFY;
     86 #define IDirectSoundNotify8 IDirectSoundNotify
     87 typedef struct IDirectSoundNotify8 *LPDIRECTSOUNDNOTIFY8;
     88 #define	IID_IDirectSoundNotify8		IID_IDirectSoundNotify
     89 
     90 DEFINE_GUID(IID_IDirectSound3DListener,	0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
     91 typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER,**LPLPDIRECTSOUND3DLISTENER;
     92 #define IDirectSound3DListener8 IDirectSound3DListener
     93 typedef struct IDirectSound3DListener8 *LPDIRECTSOUND3DLISTENER8;
     94 #define IID_IDirectSound3DListener8 IID_IDirectSound3DListener
     95 
     96 DEFINE_GUID(IID_IDirectSound3DBuffer,	0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
     97 typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER,**LPLPDIRECTSOUND3DBUFFER;
     98 #define IDirectSound3DBuffer8 IDirectSound3DBuffer
     99 typedef struct IDirectSound3DBuffer8 *LPDIRECTSOUND3DBUFFER8;
    100 #define IID_IDirectSound3DBuffer8 IID_IDirectSound3DBuffer
    101 
    102 DEFINE_GUID(IID_IDirectSoundCapture,	0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
    103 typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE,**LPLPDIRECTSOUNDCAPTURE;
    104 #define	IID_IDirectSoundCapture8	IID_IDirectSoundCapture
    105 typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8,**LPLPDIRECTSOUNDCAPTURE8;
    106 
    107 DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
    108 typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER,**LPLPDIRECTSOUNDCAPTUREBUFFER;
    109 
    110 DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
    111 typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8;
    112 
    113 DEFINE_GUID(IID_IDirectSoundFullDuplex,	0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
    114 typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX,**LPLPDIRECTSOUNDFULLDUPLEX;
    115 #define IDirectSoundFullDuplex8 IDirectSoundFullDuplex
    116 typedef struct IDirectSoundFullDuplex8 *LPDIRECTSOUNDFULLDUPLEX8;
    117 #define	IID_IDirectSoundFullDuplex8	IID_IDirectSoundFullDuplex
    118 
    119 DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4);
    120 typedef struct IDirectSoundFXI3DL2Reverb  *LPDIRECTSOUNDFXI3DL2REVERB;
    121 #define IDirectSoundFXI3DL2Reverb8        IDirectSoundFXI3DL2Reverb
    122 #define IID_IDirectSoundFXI3DL2Reverb8    IID_IDirectSoundFXI3DL2Reverb
    123 typedef struct IDirectSoundFXI3DL2Reverb8 *LPDIRECTSOUNDFXI3DL2REVERB8;
    124 
    125 DEFINE_GUID(DSDEVID_DefaultPlayback,     0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
    126 DEFINE_GUID(DSDEVID_DefaultCapture,      0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
    127 DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
    128 DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
    129 
    130 #define DS3DALG_DEFAULT GUID_NULL
    131 DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION,      0xc241333f,0x1c1b,0x11d2,0x94,0xf5,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
    132 DEFINE_GUID(DS3DALG_HRTF_FULL,              0xc2413340,0x1c1b,0x11d2,0x94,0xf5,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
    133 DEFINE_GUID(DS3DALG_HRTF_LIGHT,             0xc2413342,0x1c1b,0x11d2,0x94,0xf5,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
    134 
    135 DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE,      0xDAFD8210,0x5711,0x4B91,0x9F,0xE3,0xF7,0x5B,0x7A,0xE2,0x79,0xBF);
    136 DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS,      0xEFE6629C,0x81F7,0x4281,0xBD,0x91,0xC9,0xD6,0x04,0xA9,0x5A,0xF6);
    137 DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER,     0xEFCA3D92,0xDFD8,0x4672,0xA6,0x03,0x74,0x20,0x89,0x4B,0xAD,0x98);
    138 DEFINE_GUID(GUID_DSFX_STANDARD_ECHO,        0xEF3E932C,0xD40B,0x4F51,0x8C,0xCF,0x3F,0x98,0xF1,0xB2,0x9D,0x5D);
    139 DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION,  0xEF114C90,0xCD1D,0x484E,0x96,0xE5,0x09,0xCF,0xAF,0x91,0x2A,0x21);
    140 DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR,  0xEF011F79,0x4000,0x406D,0x87,0xAF,0xBF,0xFB,0x3F,0xC3,0x9D,0x57);
    141 DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ,     0x120CED89,0x3BF4,0x4173,0xA1,0x32,0x3C,0xB4,0x06,0xCF,0x32,0x31);
    142 DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB, 0xEF985E71,0xD5C7,0x42D4,0xBA,0x4D,0x2D,0x07,0x3E,0x2E,0x96,0xF4);
    143 DEFINE_GUID(GUID_DSFX_WAVES_REVERB,         0x87FC0268,0x9A55,0x4360,0x95,0xAA,0x00,0x4A,0x1D,0x9D,0xE2,0x6C);
    144 DEFINE_GUID(GUID_DSCFX_CLASS_AEC,           0xBF963D80,0xC559,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1);
    145 DEFINE_GUID(GUID_DSCFX_MS_AEC,              0xCDEBB919,0x379A,0x488A,0x87,0x65,0xF5,0x3C,0xFD,0x36,0xDE,0x40);
    146 DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC,          0x1C22C56D,0x9879,0x4F5B,0xA3,0x89,0x27,0x99,0x6D,0xDC,0x28,0x10);
    147 DEFINE_GUID(GUID_DSCFX_CLASS_NS,            0xE07F903F,0x62FD,0x4E60,0x8C,0xDD,0xDE,0xA7,0x23,0x66,0x65,0xB5);
    148 DEFINE_GUID(GUID_DSCFX_MS_NS,               0x11C5C73B,0x66E9,0x4BA1,0xA0,0xBA,0xE8,0x14,0xC6,0xEE,0xD9,0x2D);
    149 DEFINE_GUID(GUID_DSCFX_SYSTEM_NS,           0x5AB0882E,0x7274,0x4516,0x87,0x7D,0x4E,0xEE,0x99,0xBA,0x4F,0xD0);
    150 
    151 DEFINE_GUID(IID_IDirectSoundFXGargle,       0xd616f352,0xd622,0x11ce,0xaa,0xc5,0x00,0x20,0xaf,0x0b,0x99,0xa3);
    152 #define IDirectSoundFXGargle8               IDirectSoundFXGargle
    153 typedef struct IDirectSoundFXGargle8        *LPDIRECTSOUNDFXGARGLE8;
    154 #define IID_IDirectSoundFXGargle8           IID_IDirectSoundFXGargle
    155 
    156 DEFINE_GUID(IID_IDirectSoundFXChorus,       0x880842e3,0x145f,0x43e6,0xa9,0x34,0xa7,0x18,0x06,0xe5,0x05,0x47);
    157 #define IDirectSoundFXChorus8               IDirectSoundFXChorus
    158 typedef struct IDirectSoundFXChorus8        *LPDIRECTSOUNDFXCHORUS8;
    159 #define IID_IDirectSoundFXChorus8           IID_IDirectSoundFXChorus
    160 
    161 DEFINE_GUID(IID_IDirectSoundFXFlanger,      0x903e9878,0x2c92,0x4072,0x9b,0x2c,0xea,0x68,0xf5,0x39,0x67,0x83);
    162 #define IDirectSoundFXFlanger8              IDirectSoundFXFlanger
    163 typedef struct IDirectSoundFXFlanger8       *LPDIRECTSOUNDFXFLANGER8;
    164 #define IID_IDirectSoundFXFlanger8          IID_IDirectSoundFXFlanger
    165 
    166 DEFINE_GUID(IID_IDirectSoundFXEcho,         0x8bd28edf,0x50db,0x4e92,0xa2,0xbd,0x44,0x54,0x88, 0xd1,0xed,0x42);
    167 #define IDirectSoundFXEcho8                 IDirectSoundFXEcho
    168 typedef struct IDirectSoundFXEcho8          *LPDIRECTSOUNDFXECHO8;
    169 #define IID_IDirectSoundFXEcho8             IID_IDirectSoundFXEcho
    170 
    171 DEFINE_GUID(IID_IDirectSoundFXDistortion,   0x8ecf4326,0x455f,0x4d8b,0xbd,0xa9,0x8d,0x5d,0x3e,0x9e,0x3e,0x0b);
    172 #define IDirectSoundFXDistortion8           IDirectSoundFXDistortion
    173 typedef struct IDirectSoundFXDistortion8    *LPDIRECTSOUNDFXDISTORTION8;
    174 #define IID_IDirectSoundFXDistortion8       IID_IDirectSoundFXDistortion
    175 
    176 DEFINE_GUID(IID_IDirectSoundFXCompressor,   0x4bbd1154,0x62f6,0x4e2c,0xa1,0x5c,0xd3,0xb6,0xc4,0x17,0xf7,0xa0);
    177 #define IDirectSoundFXCompressor8           IDirectSoundFXCompressor
    178 typedef struct IDirectSoundFXCompressor8    *LPDIRECTSOUNDFXCOMPRESSOR8;
    179 #define IID_IDirectSoundFXCompressor8       IID_IDirectSoundFXCompressor
    180 
    181 DEFINE_GUID(IID_IDirectSoundFXParamEq,      0xc03ca9fe,0xfe90,0x4204,0x80,0x78,0x82,0x33,0x4c,0xd1,0x77,0xda);
    182 #define IDirectSoundFXParamEq8              IDirectSoundFXParamEq
    183 typedef struct IDirectSoundFXParamEq8       *LPDIRECTSOUNDFXPARAMEQ8;
    184 #define IID_IDirectSoundFXParamEq8          IID_IDirectSoundFXParamEq
    185 
    186 DEFINE_GUID(IID_IDirectSoundFXWavesReverb,  0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25);
    187 #define IDirectSoundFXWavesReverb8          IDirectSoundFXWavesReverb
    188 typedef struct IDirectSoundFXWavesReverb8   *LPDIRECTSOUNDFXWAVESREVERB8;
    189 #define IID_IDirectSoundFXWavesReverb8      IID_IDirectSoundFXWavesReverb
    190 
    191 #define	_FACDS		0x878
    192 #define	MAKE_DSHRESULT(code)		MAKE_HRESULT(1,_FACDS,code)
    193 
    194 #define DS_OK				0
    195 #define DS_NO_VIRTUALIZATION            MAKE_HRESULT(0, _FACDS, 10)
    196 #define DS_INCOMPLETE                   MAKE_HRESULT(0, _FACDS, 20)
    197 #define DSERR_ALLOCATED			MAKE_DSHRESULT(10)
    198 #define DSERR_CONTROLUNAVAIL		MAKE_DSHRESULT(30)
    199 #define DSERR_INVALIDPARAM		E_INVALIDARG
    200 #define DSERR_INVALIDCALL		MAKE_DSHRESULT(50)
    201 #define DSERR_GENERIC			E_FAIL
    202 #define DSERR_PRIOLEVELNEEDED		MAKE_DSHRESULT(70)
    203 #define DSERR_OUTOFMEMORY		E_OUTOFMEMORY
    204 #define DSERR_BADFORMAT			MAKE_DSHRESULT(100)
    205 #define DSERR_UNSUPPORTED		E_NOTIMPL
    206 #define DSERR_NODRIVER			MAKE_DSHRESULT(120)
    207 #define DSERR_ALREADYINITIALIZED	MAKE_DSHRESULT(130)
    208 #define DSERR_NOAGGREGATION		CLASS_E_NOAGGREGATION
    209 #define DSERR_BUFFERLOST		MAKE_DSHRESULT(150)
    210 #define DSERR_OTHERAPPHASPRIO		MAKE_DSHRESULT(160)
    211 #define DSERR_UNINITIALIZED		MAKE_DSHRESULT(170)
    212 #define DSERR_NOINTERFACE               E_NOINTERFACE
    213 #define DSERR_ACCESSDENIED              E_ACCESSDENIED
    214 #define DSERR_BUFFERTOOSMALL            MAKE_DSHRESULT(180)
    215 #define DSERR_DS8_REQUIRED              MAKE_DSHRESULT(190)
    216 #define DSERR_SENDLOOP                  MAKE_DSHRESULT(200)
    217 #define DSERR_BADSENDBUFFERGUID         MAKE_DSHRESULT(210)
    218 #define DSERR_FXUNAVAILABLE             MAKE_DSHRESULT(220)
    219 #define DSERR_OBJECTNOTFOUND            MAKE_DSHRESULT(4449)
    220 
    221 #define DSCAPS_PRIMARYMONO          0x00000001
    222 #define DSCAPS_PRIMARYSTEREO        0x00000002
    223 #define DSCAPS_PRIMARY8BIT          0x00000004
    224 #define DSCAPS_PRIMARY16BIT         0x00000008
    225 #define DSCAPS_CONTINUOUSRATE       0x00000010
    226 #define DSCAPS_EMULDRIVER           0x00000020
    227 #define DSCAPS_CERTIFIED            0x00000040
    228 #define DSCAPS_SECONDARYMONO        0x00000100
    229 #define DSCAPS_SECONDARYSTEREO      0x00000200
    230 #define DSCAPS_SECONDARY8BIT        0x00000400
    231 #define DSCAPS_SECONDARY16BIT       0x00000800
    232 
    233 #define	DSSCL_NORMAL		1
    234 #define	DSSCL_PRIORITY		2
    235 #define	DSSCL_EXCLUSIVE		3
    236 #define	DSSCL_WRITEPRIMARY	4
    237 
    238 typedef struct _DSCAPS
    239 {
    240     DWORD	dwSize;
    241     DWORD	dwFlags;
    242     DWORD	dwMinSecondarySampleRate;
    243     DWORD	dwMaxSecondarySampleRate;
    244     DWORD	dwPrimaryBuffers;
    245     DWORD	dwMaxHwMixingAllBuffers;
    246     DWORD	dwMaxHwMixingStaticBuffers;
    247     DWORD	dwMaxHwMixingStreamingBuffers;
    248     DWORD	dwFreeHwMixingAllBuffers;
    249     DWORD	dwFreeHwMixingStaticBuffers;
    250     DWORD	dwFreeHwMixingStreamingBuffers;
    251     DWORD	dwMaxHw3DAllBuffers;
    252     DWORD	dwMaxHw3DStaticBuffers;
    253     DWORD	dwMaxHw3DStreamingBuffers;
    254     DWORD	dwFreeHw3DAllBuffers;
    255     DWORD	dwFreeHw3DStaticBuffers;
    256     DWORD	dwFreeHw3DStreamingBuffers;
    257     DWORD	dwTotalHwMemBytes;
    258     DWORD	dwFreeHwMemBytes;
    259     DWORD	dwMaxContigFreeHwMemBytes;
    260     DWORD	dwUnlockTransferRateHwBuffers;
    261     DWORD	dwPlayCpuOverheadSwBuffers;
    262     DWORD	dwReserved1;
    263     DWORD	dwReserved2;
    264 } DSCAPS,*LPDSCAPS;
    265 typedef const DSCAPS *LPCDSCAPS;
    266 
    267 #define DSBPLAY_LOOPING             0x00000001
    268 #define DSBPLAY_LOCHARDWARE         0x00000002
    269 #define DSBPLAY_LOCSOFTWARE         0x00000004
    270 #define DSBPLAY_TERMINATEBY_TIME    0x00000008
    271 #define DSBPLAY_TERMINATEBY_DISTANCE    0x000000010
    272 #define DSBPLAY_TERMINATEBY_PRIORITY    0x000000020
    273 
    274 #define DSBSTATUS_PLAYING           0x00000001
    275 #define DSBSTATUS_BUFFERLOST        0x00000002
    276 #define DSBSTATUS_LOOPING           0x00000004
    277 #define DSBSTATUS_LOCHARDWARE       0x00000008
    278 #define DSBSTATUS_LOCSOFTWARE       0x00000010
    279 #define DSBSTATUS_TERMINATED        0x00000020
    280 
    281 #define DSBLOCK_FROMWRITECURSOR     0x00000001
    282 #define DSBLOCK_ENTIREBUFFER        0x00000002
    283 
    284 #define DSBCAPS_PRIMARYBUFFER       0x00000001
    285 #define DSBCAPS_STATIC              0x00000002
    286 #define DSBCAPS_LOCHARDWARE         0x00000004
    287 #define DSBCAPS_LOCSOFTWARE         0x00000008
    288 #define DSBCAPS_CTRL3D              0x00000010
    289 #define DSBCAPS_CTRLFREQUENCY       0x00000020
    290 #define DSBCAPS_CTRLPAN             0x00000040
    291 #define DSBCAPS_CTRLVOLUME          0x00000080
    292 #define DSBCAPS_CTRLDEFAULT         0x000000E0  /* Pan + volume + frequency. */
    293 #define DSBCAPS_CTRLPOSITIONNOTIFY  0x00000100
    294 #define DSBCAPS_CTRLFX              0x00000200
    295 #define DSBCAPS_CTRLALL             0x000001F0  /* All control capabilities */
    296 #define DSBCAPS_STICKYFOCUS         0x00004000
    297 #define DSBCAPS_GLOBALFOCUS         0x00008000
    298 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000  /* More accurate play cursor under emulation*/
    299 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
    300 #define DSBCAPS_LOCDEFER            0x00040000
    301 
    302 #define DSBSIZE_MIN                 4
    303 #define DSBSIZE_MAX                 0xFFFFFFF
    304 #define DSBSIZE_FX_MIN		    150
    305 #define DSBPAN_LEFT                 -10000
    306 #define DSBPAN_CENTER               0
    307 #define DSBPAN_RIGHT                 10000
    308 #define DSBVOLUME_MAX                    0
    309 #define DSBVOLUME_MIN               -10000
    310 #define DSBFREQUENCY_MIN            100
    311 #if (DIRECTSOUND_VERSION >= 0x0900)
    312 #define DSBFREQUENCY_MAX            200000
    313 #else
    314 #define DSBFREQUENCY_MAX            100000
    315 #endif
    316 #define DSBFREQUENCY_ORIGINAL       0
    317 
    318 #define DSBNOTIFICATIONS_MAX        100000U
    319 
    320 typedef struct _DSBCAPS
    321 {
    322     DWORD	dwSize;
    323     DWORD	dwFlags;
    324     DWORD	dwBufferBytes;
    325     DWORD	dwUnlockTransferRate;
    326     DWORD	dwPlayCpuOverhead;
    327 } DSBCAPS,*LPDSBCAPS;
    328 typedef const DSBCAPS *LPCDSBCAPS;
    329 
    330 #define DSSCL_NORMAL                1
    331 #define DSSCL_PRIORITY              2
    332 #define DSSCL_EXCLUSIVE             3
    333 #define DSSCL_WRITEPRIMARY          4
    334 
    335 typedef struct _DSEFFECTDESC
    336 {
    337     DWORD	dwSize;
    338     DWORD	dwFlags;
    339     GUID	guidDSFXClass;
    340     DWORD_PTR	dwReserved1;
    341     DWORD_PTR	dwReserved2;
    342 } DSEFFECTDESC,*LPDSEFFECTDESC;
    343 typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
    344 
    345 #define DSFX_LOCHARDWARE    0x00000001
    346 #define DSFX_LOCSOFTWARE    0x00000002
    347 
    348 enum
    349 {
    350     DSFXR_PRESENT,
    351     DSFXR_LOCHARDWARE,
    352     DSFXR_LOCSOFTWARE,
    353     DSFXR_UNALLOCATED,
    354     DSFXR_FAILED,
    355     DSFXR_UNKNOWN,
    356     DSFXR_SENDLOOP
    357 };
    358 
    359 typedef struct _DSBUFFERDESC1
    360 {
    361     DWORD		dwSize;
    362     DWORD		dwFlags;
    363     DWORD		dwBufferBytes;
    364     DWORD		dwReserved;
    365     LPWAVEFORMATEX	lpwfxFormat;
    366 } DSBUFFERDESC1,*LPDSBUFFERDESC1;
    367 typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
    368 
    369 typedef struct _DSBUFFERDESC
    370 {
    371     DWORD		dwSize;
    372     DWORD		dwFlags;
    373     DWORD		dwBufferBytes;
    374     DWORD		dwReserved;
    375     LPWAVEFORMATEX	lpwfxFormat;
    376 #if (DIRECTSOUND_VERSION >= 0x0700)
    377     GUID		guid3DAlgorithm;
    378 #endif /* DS7 */
    379 } DSBUFFERDESC,*LPDSBUFFERDESC;
    380 typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
    381 
    382 typedef struct _DSBPOSITIONNOTIFY
    383 {
    384     DWORD	dwOffset;
    385     HANDLE	hEventNotify;
    386 } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
    387 typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
    388 
    389 #define DSSPEAKER_DIRECTOUT     0
    390 #define DSSPEAKER_HEADPHONE     1
    391 #define DSSPEAKER_MONO          2
    392 #define DSSPEAKER_QUAD          3
    393 #define DSSPEAKER_STEREO        4
    394 #define DSSPEAKER_SURROUND      5
    395 #define DSSPEAKER_5POINT1       6
    396 #define DSSPEAKER_5POINT1_BACK  6
    397 #define DSSPEAKER_7POINT1       7
    398 #define DSSPEAKER_7POINT1_WIDE  7
    399 #define DSSPEAKER_7POINT1_SURROUND  8
    400 #define DSSPEAKER_5POINT1_SURROUND  9
    401 
    402 #define DSSPEAKER_GEOMETRY_MIN      0x00000005  /* 5 degrees */
    403 #define DSSPEAKER_GEOMETRY_NARROW   0x0000000A  /* 10 degrees */
    404 #define DSSPEAKER_GEOMETRY_WIDE     0x00000014  /* 20 degrees */
    405 #define DSSPEAKER_GEOMETRY_MAX      0x000000B4  /* 180 degrees */
    406 
    407 #define DSSPEAKER_COMBINED(c, g)    ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
    408 #define DSSPEAKER_CONFIG(a)         ((BYTE)(a))
    409 #define DSSPEAKER_GEOMETRY(a)       ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
    410 
    411 #define DS_CERTIFIED                0x00000000
    412 #define DS_UNCERTIFIED              0x00000001
    413 
    414 typedef struct _DSCEFFECTDESC
    415 {
    416     DWORD       dwSize;
    417     DWORD       dwFlags;
    418     GUID        guidDSCFXClass;
    419     GUID        guidDSCFXInstance;
    420     DWORD       dwReserved1;
    421     DWORD       dwReserved2;
    422 } DSCEFFECTDESC, *LPDSCEFFECTDESC;
    423 typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
    424 
    425 #define DSCFX_LOCHARDWARE   0x00000001
    426 #define DSCFX_LOCSOFTWARE   0x00000002
    427 
    428 #define DSCFXR_LOCHARDWARE  0x00000010
    429 #define DSCFXR_LOCSOFTWARE  0x00000020
    430 
    431 typedef struct _DSCBUFFERDESC1
    432 {
    433   DWORD           dwSize;
    434   DWORD           dwFlags;
    435   DWORD           dwBufferBytes;
    436   DWORD           dwReserved;
    437   LPWAVEFORMATEX  lpwfxFormat;
    438 } DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
    439 
    440 typedef struct _DSCBUFFERDESC
    441 {
    442   DWORD           dwSize;
    443   DWORD           dwFlags;
    444   DWORD           dwBufferBytes;
    445   DWORD           dwReserved;
    446   LPWAVEFORMATEX  lpwfxFormat;
    447 #if (DIRECTSOUND_VERSION >= 0x0800)
    448   DWORD           dwFXCount;
    449   LPDSCEFFECTDESC lpDSCFXDesc;
    450 #endif /* DS8 */
    451 } DSCBUFFERDESC, *LPDSCBUFFERDESC;
    452 typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
    453 
    454 typedef struct _DSCCAPS
    455 {
    456   DWORD dwSize;
    457   DWORD dwFlags;
    458   DWORD dwFormats;
    459   DWORD dwChannels;
    460 } DSCCAPS, *LPDSCCAPS;
    461 typedef const DSCCAPS *LPCDSCCAPS;
    462 
    463 typedef struct _DSCBCAPS
    464 {
    465   DWORD dwSize;
    466   DWORD dwFlags;
    467   DWORD dwBufferBytes;
    468   DWORD dwReserved;
    469 } DSCBCAPS, *LPDSCBCAPS;
    470 typedef const DSCBCAPS *LPCDSCBCAPS;
    471 
    472 typedef struct _DSFXI3DL2Reverb
    473 {
    474   LONG  lRoom;
    475   LONG  lRoomHF;
    476   FLOAT flRoomRolloffFactor;
    477   FLOAT flDecayTime;
    478   FLOAT flDecayHFRatio;
    479   LONG  lReflections;
    480   FLOAT flReflectionsDelay;
    481   LONG  lReverb;
    482   FLOAT flReverbDelay;
    483   FLOAT flDiffusion;
    484   FLOAT flDensity;
    485   FLOAT flHFReference;
    486 } DSFXI3DL2Reverb, *LPDSFXI3DL2Reverb;
    487 
    488 #define DSFX_I3DL2REVERB_DECAYTIME_DEFAULT              1.49f
    489 #define DSFX_I3DL2REVERB_DECAYTIME_MIN                  0.1f
    490 #define DSFX_I3DL2REVERB_DECAYTIME_MAX                 20.0f
    491 #define DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT           0.83f
    492 #define DSFX_I3DL2REVERB_DECAYHFRATIO_MIN               0.1f
    493 #define DSFX_I3DL2REVERB_DECAYHFRATIO_MAX               2.0f
    494 #define DSFX_I3DL2REVERB_DENSITY_DEFAULT             100.0f
    495 #define DSFX_I3DL2REVERB_DENSITY_MIN                   0.0f
    496 #define DSFX_I3DL2REVERB_DENSITY_MAX                 100.0f
    497 #define DSFX_I3DL2REVERB_DIFFUSION_DEFAULT           100.0f
    498 #define DSFX_I3DL2REVERB_DIFFUSION_MIN                 0.0f
    499 #define DSFX_I3DL2REVERB_DIFFUSION_MAX               100.0f
    500 #define DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT        5000.0f
    501 #define DSFX_I3DL2REVERB_HFREFERENCE_MIN              20.0f
    502 #define DSFX_I3DL2REVERB_HFREFERENCE_MAX           20000.0f
    503 #define DSFX_I3DL2REVERB_QUALITY_DEFAULT               2
    504 #define DSFX_I3DL2REVERB_QUALITY_MIN                   0
    505 #define DSFX_I3DL2REVERB_QUALITY_MAX                   3
    506 #define DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT     (-2602)
    507 #define DSFX_I3DL2REVERB_REFLECTIONS_MIN        (-10000)
    508 #define DSFX_I3DL2REVERB_REFLECTIONS_MAX            1000
    509 #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT      0.007f
    510 #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN          0.0f
    511 #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX          0.3f
    512 #define DSFX_I3DL2REVERB_REVERB_MIN             (-10000)
    513 #define DSFX_I3DL2REVERB_REVERB_MAX                 2000
    514 #define DSFX_I3DL2REVERB_REVERB_DEFAULT              200
    515 #define DSFX_I3DL2REVERB_REVERBDELAY_MIN               0.0f
    516 #define DSFX_I3DL2REVERB_REVERBDELAY_MAX               0.1f
    517 #define DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT           0.011f
    518 #define DSFX_I3DL2REVERB_ROOM_DEFAULT            (-1000)
    519 #define DSFX_I3DL2REVERB_ROOM_MIN               (-10000)
    520 #define DSFX_I3DL2REVERB_ROOM_MAX                      0
    521 #define DSFX_I3DL2REVERB_ROOMHF_MIN             (-10000)
    522 #define DSFX_I3DL2REVERB_ROOMHF_MAX                    0
    523 #define DSFX_I3DL2REVERB_ROOMHF_DEFAULT           (-100)
    524 #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN         0.0f
    525 #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX        10.0f
    526 #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT     0.0f
    527 
    528 typedef const DSFXI3DL2Reverb *LPCDSFXI3DL2Reverb;
    529 
    530 #define DSCCAPS_EMULDRIVER          DSCAPS_EMULDRIVER
    531 #define DSCCAPS_CERTIFIED           DSCAPS_CERTIFIED
    532 #define DSCCAPS_MULTIPLECAPTURE     0x00000001
    533 
    534 #define DSCBCAPS_WAVEMAPPED         0x80000000
    535 #define DSCBCAPS_CTRLFX             0x00000200
    536 
    537 #define DSCBLOCK_ENTIREBUFFER       0x00000001
    538 #define DSCBSTART_LOOPING           0x00000001
    539 #define DSCBPN_OFFSET_STOP          0xffffffff
    540 
    541 #define DSCBSTATUS_CAPTURING        0x00000001
    542 #define DSCBSTATUS_LOOPING          0x00000002
    543 
    544 #ifndef _LPCWAVEFORMATEX_DEFINED
    545 #define _LPCWAVEFORMATEX_DEFINED
    546 typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
    547 #endif /* _LPCWAVEFORMATEX_DEFINED */
    548 
    549 #ifndef __LPCGUID_DEFINED__
    550 #define __LPCGUID_DEFINED__
    551 typedef const GUID *LPCGUID;
    552 #endif
    553 
    554 typedef WINBOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
    555 typedef WINBOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
    556 __MINGW_TYPEDEF_AW(LPDSENUMCALLBACK)
    557 
    558 extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter);
    559 extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
    560 extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
    561 #define DirectSoundEnumerate __MINGW_NAME_AW(DirectSoundEnumerate)
    562 extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
    563 extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
    564 extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
    565 #define DirectSoundCaptureEnumerate __MINGW_NAME_AW(DirectSoundCaptureEnumerate)
    566 
    567 extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter);
    568 extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
    569 extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
    570     LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel,
    571     LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
    572 #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
    573 extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest);
    574 
    575 
    576 /*****************************************************************************
    577  * IDirectSound interface
    578  */
    579 #define INTERFACE IDirectSound
    580 DECLARE_INTERFACE_(IDirectSound,IUnknown)
    581 {
    582     /*** IUnknown methods ***/
    583     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    584     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    585     STDMETHOD_(ULONG,Release)(THIS) PURE;
    586     /*** IDirectSound methods ***/
    587     STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
    588     STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
    589     STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
    590     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
    591     STDMETHOD(Compact)(THIS) PURE;
    592     STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
    593     STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
    594     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
    595 };
    596 #undef INTERFACE
    597 
    598 #if !defined(__cplusplus) || defined(CINTERFACE)
    599 /*** IUnknown methods ***/
    600 #define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    601 #define IDirectSound_AddRef(p)             (p)->lpVtbl->AddRef(p)
    602 #define IDirectSound_Release(p)            (p)->lpVtbl->Release(p)
    603 /*** IDirectSound methods ***/
    604 #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
    605 #define IDirectSound_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    606 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
    607 #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
    608 #define IDirectSound_Compact(p)                  (p)->lpVtbl->Compact(p)
    609 #define IDirectSound_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
    610 #define IDirectSound_SetSpeakerConfig(p,a)       (p)->lpVtbl->SetSpeakerConfig(p,a)
    611 #define IDirectSound_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
    612 #else
    613 /*** IUnknown methods ***/
    614 #define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    615 #define IDirectSound_AddRef(p)             (p)->AddRef()
    616 #define IDirectSound_Release(p)            (p)->Release()
    617 /*** IDirectSound methods ***/
    618 #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->CreateSoundBuffer(a,b,c)
    619 #define IDirectSound_GetCaps(p,a)                (p)->GetCaps(a)
    620 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
    621 #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->SetCooperativeLevel(a,b)
    622 #define IDirectSound_Compact(p)                  (p)->Compact()
    623 #define IDirectSound_GetSpeakerConfig(p,a)       (p)->GetSpeakerConfig(a)
    624 #define IDirectSound_SetSpeakerConfig(p,a)       (p)->SetSpeakerConfig(a)
    625 #define IDirectSound_Initialize(p,a)             (p)->Initialize(a)
    626 #endif
    627 
    628 
    629 /*****************************************************************************
    630  * IDirectSound8 interface
    631  */
    632 #define INTERFACE IDirectSound8
    633 DECLARE_INTERFACE_(IDirectSound8,IUnknown)
    634 {
    635     /*** IUnknown methods ***/
    636     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    637     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    638     STDMETHOD_(ULONG,Release)(THIS) PURE;
    639     /*** IDirectSound8 methods ***/
    640     STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
    641     STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
    642     STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
    643     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
    644     STDMETHOD(Compact)(THIS) PURE;
    645     STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
    646     STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
    647     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
    648     STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE;
    649 };
    650 #undef INTERFACE
    651 
    652 #if !defined(__cplusplus) || defined(CINTERFACE)
    653 /*** IUnknown methods ***/
    654 #define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    655 #define IDirectSound8_AddRef(p)             (p)->lpVtbl->AddRef(p)
    656 #define IDirectSound8_Release(p)            (p)->lpVtbl->Release(p)
    657 /*** IDirectSound methods ***/
    658 #define IDirectSound8_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
    659 #define IDirectSound8_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    660 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
    661 #define IDirectSound8_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
    662 #define IDirectSound8_Compact(p)                  (p)->lpVtbl->Compact(p)
    663 #define IDirectSound8_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
    664 #define IDirectSound8_SetSpeakerConfig(p,a)       (p)->lpVtbl->SetSpeakerConfig(p,a)
    665 #define IDirectSound8_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
    666 /*** IDirectSound8 methods ***/
    667 #define IDirectSound8_VerifyCertification(p,a)    (p)->lpVtbl->VerifyCertification(p,a)
    668 #else
    669 /*** IUnknown methods ***/
    670 #define IDirectSound8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    671 #define IDirectSound8_AddRef(p)             (p)->AddRef()
    672 #define IDirectSound8_Release(p)            (p)->Release()
    673 /*** IDirectSound methods ***/
    674 #define IDirectSound8_CreateSoundBuffer(p,a,b,c)  (p)->CreateSoundBuffer(a,b,c)
    675 #define IDirectSound8_GetCaps(p,a)                (p)->GetCaps(a)
    676 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
    677 #define IDirectSound8_SetCooperativeLevel(p,a,b)  (p)->SetCooperativeLevel(a,b)
    678 #define IDirectSound8_Compact(p)                  (p)->Compact()
    679 #define IDirectSound8_GetSpeakerConfig(p,a)       (p)->GetSpeakerConfig(a)
    680 #define IDirectSound8_SetSpeakerConfig(p,a)       (p)->SetSpeakerConfig(a)
    681 #define IDirectSound8_Initialize(p,a)             (p)->Initialize(a)
    682 /*** IDirectSound8 methods ***/
    683 #define IDirectSound8_VerifyCertification(p,a)    (p)->VerifyCertification(a)
    684 #endif
    685 
    686 
    687 /*****************************************************************************
    688  * IDirectSoundBuffer interface
    689  */
    690 #define INTERFACE IDirectSoundBuffer
    691 DECLARE_INTERFACE_(IDirectSoundBuffer,IUnknown)
    692 {
    693     /*** IUnknown methods ***/
    694     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    695     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    696     STDMETHOD_(ULONG,Release)(THIS) PURE;
    697     /*** IDirectSoundBuffer methods ***/
    698     STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
    699     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
    700     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    701     STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
    702     STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
    703     STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
    704     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    705     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
    706     STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
    707     STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
    708     STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
    709     STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
    710     STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
    711     STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
    712     STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
    713     STDMETHOD(Stop)(THIS) PURE;
    714     STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
    715     STDMETHOD(Restore)(THIS) PURE;
    716 };
    717 #undef INTERFACE
    718 
    719 #if !defined(__cplusplus) || defined(CINTERFACE)
    720 /*** IUnknown methods ***/
    721 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    722 #define IDirectSoundBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
    723 #define IDirectSoundBuffer_Release(p)            (p)->lpVtbl->Release(p)
    724 /*** IDirectSoundBuffer methods ***/
    725 #define IDirectSoundBuffer_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    726 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)   (p)->lpVtbl->GetCurrentPosition(p,a,b)
    727 #define IDirectSoundBuffer_GetFormat(p,a,b,c)          (p)->lpVtbl->GetFormat(p,a,b,c)
    728 #define IDirectSoundBuffer_GetVolume(p,a)              (p)->lpVtbl->GetVolume(p,a)
    729 #define IDirectSoundBuffer_GetPan(p,a)                 (p)->lpVtbl->GetPan(p,a)
    730 #define IDirectSoundBuffer_GetFrequency(p,a)           (p)->lpVtbl->GetFrequency(p,a)
    731 #define IDirectSoundBuffer_GetStatus(p,a)              (p)->lpVtbl->GetStatus(p,a)
    732 #define IDirectSoundBuffer_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
    733 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)       (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    734 #define IDirectSoundBuffer_Play(p,a,b,c)               (p)->lpVtbl->Play(p,a,b,c)
    735 #define IDirectSoundBuffer_SetCurrentPosition(p,a)     (p)->lpVtbl->SetCurrentPosition(p,a)
    736 #define IDirectSoundBuffer_SetFormat(p,a)              (p)->lpVtbl->SetFormat(p,a)
    737 #define IDirectSoundBuffer_SetVolume(p,a)              (p)->lpVtbl->SetVolume(p,a)
    738 #define IDirectSoundBuffer_SetPan(p,a)                 (p)->lpVtbl->SetPan(p,a)
    739 #define IDirectSoundBuffer_SetFrequency(p,a)           (p)->lpVtbl->SetFrequency(p,a)
    740 #define IDirectSoundBuffer_Stop(p)                     (p)->lpVtbl->Stop(p)
    741 #define IDirectSoundBuffer_Unlock(p,a,b,c,d)           (p)->lpVtbl->Unlock(p,a,b,c,d)
    742 #define IDirectSoundBuffer_Restore(p)                  (p)->lpVtbl->Restore(p)
    743 #else
    744 /*** IUnknown methods ***/
    745 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    746 #define IDirectSoundBuffer_AddRef(p)             (p)->AddRef()
    747 #define IDirectSoundBuffer_Release(p)            (p)->Release()
    748 /*** IDirectSoundBuffer methods ***/
    749 #define IDirectSoundBuffer_GetCaps(p,a)                (p)->GetCaps(a)
    750 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)   (p)->GetCurrentPosition(a,b)
    751 #define IDirectSoundBuffer_GetFormat(p,a,b,c)          (p)->GetFormat(a,b,c)
    752 #define IDirectSoundBuffer_GetVolume(p,a)              (p)->GetVolume(a)
    753 #define IDirectSoundBuffer_GetPan(p,a)                 (p)->GetPan(a)
    754 #define IDirectSoundBuffer_GetFrequency(p,a)           (p)->GetFrequency(a)
    755 #define IDirectSoundBuffer_GetStatus(p,a)              (p)->GetStatus(a)
    756 #define IDirectSoundBuffer_Initialize(p,a,b)           (p)->Initialize(a,b)
    757 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)       (p)->Lock(a,b,c,d,e,f,g)
    758 #define IDirectSoundBuffer_Play(p,a,b,c)               (p)->Play(a,b,c)
    759 #define IDirectSoundBuffer_SetCurrentPosition(p,a)     (p)->SetCurrentPosition(a)
    760 #define IDirectSoundBuffer_SetFormat(p,a)              (p)->SetFormat(a)
    761 #define IDirectSoundBuffer_SetVolume(p,a)              (p)->SetVolume(a)
    762 #define IDirectSoundBuffer_SetPan(p,a)                 (p)->SetPan(a)
    763 #define IDirectSoundBuffer_SetFrequency(p,a)           (p)->SetFrequency(a)
    764 #define IDirectSoundBuffer_Stop(p)                     (p)->Stop()
    765 #define IDirectSoundBuffer_Unlock(p,a,b,c,d)           (p)->Unlock(a,b,c,d)
    766 #define IDirectSoundBuffer_Restore(p)                  (p)->Restore()
    767 #endif
    768 
    769 
    770 /*****************************************************************************
    771  * IDirectSoundBuffer8 interface
    772  */
    773 #define INTERFACE IDirectSoundBuffer8
    774 DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown)
    775 {
    776     /*** IUnknown methods ***/
    777     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    778     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    779     STDMETHOD_(ULONG,Release)(THIS) PURE;
    780     /*** IDirectSoundBuffer8 methods ***/
    781     STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
    782     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
    783     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    784     STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
    785     STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
    786     STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
    787     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    788     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
    789     STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
    790     STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
    791     STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
    792     STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
    793     STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
    794     STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
    795     STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
    796     STDMETHOD(Stop)(THIS) PURE;
    797     STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
    798     STDMETHOD(Restore)(THIS) PURE;
    799     STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
    800     STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
    801     STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
    802 };
    803 #undef INTERFACE
    804 
    805 DEFINE_GUID(GUID_All_Objects, 0xaa114de5, 0xc262, 0x4169, 0xa1, 0xc8, 0x23, 0xd6, 0x98, 0xcc, 0x73, 0xb5);
    806 
    807 #if !defined(__cplusplus) || defined(CINTERFACE)
    808 /*** IUnknown methods ***/
    809 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
    810 #define IDirectSoundBuffer8_AddRef(p)             (p)->lpVtbl->AddRef(p)
    811 #define IDirectSoundBuffer8_Release(p)            (p)->lpVtbl->Release(p)
    812 /*** IDirectSoundBuffer methods ***/
    813 #define IDirectSoundBuffer8_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
    814 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b)   (p)->lpVtbl->GetCurrentPosition(p,a,b)
    815 #define IDirectSoundBuffer8_GetFormat(p,a,b,c)          (p)->lpVtbl->GetFormat(p,a,b,c)
    816 #define IDirectSoundBuffer8_GetVolume(p,a)              (p)->lpVtbl->GetVolume(p,a)
    817 #define IDirectSoundBuffer8_GetPan(p,a)                 (p)->lpVtbl->GetPan(p,a)
    818 #define IDirectSoundBuffer8_GetFrequency(p,a)           (p)->lpVtbl->GetFrequency(p,a)
    819 #define IDirectSoundBuffer8_GetStatus(p,a)              (p)->lpVtbl->GetStatus(p,a)
    820 #define IDirectSoundBuffer8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
    821 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g)       (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    822 #define IDirectSoundBuffer8_Play(p,a,b,c)               (p)->lpVtbl->Play(p,a,b,c)
    823 #define IDirectSoundBuffer8_SetCurrentPosition(p,a)     (p)->lpVtbl->SetCurrentPosition(p,a)
    824 #define IDirectSoundBuffer8_SetFormat(p,a)              (p)->lpVtbl->SetFormat(p,a)
    825 #define IDirectSoundBuffer8_SetVolume(p,a)              (p)->lpVtbl->SetVolume(p,a)
    826 #define IDirectSoundBuffer8_SetPan(p,a)                 (p)->lpVtbl->SetPan(p,a)
    827 #define IDirectSoundBuffer8_SetFrequency(p,a)           (p)->lpVtbl->SetFrequency(p,a)
    828 #define IDirectSoundBuffer8_Stop(p)                     (p)->lpVtbl->Stop(p)
    829 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d)           (p)->lpVtbl->Unlock(p,a,b,c,d)
    830 #define IDirectSoundBuffer8_Restore(p)                  (p)->lpVtbl->Restore(p)
    831 /*** IDirectSoundBuffer8 methods ***/
    832 #define IDirectSoundBuffer8_SetFX(p,a,b,c)              (p)->lpVtbl->SetFX(p,a,b,c)
    833 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c)   (p)->lpVtbl->AcquireResources(p,a,b,c)
    834 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d)  (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
    835 #else
    836 /*** IUnknown methods ***/
    837 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
    838 #define IDirectSoundBuffer8_AddRef(p)             (p)->AddRef()
    839 #define IDirectSoundBuffer8_Release(p)            (p)->Release()
    840 /*** IDirectSoundBuffer methods ***/
    841 #define IDirectSoundBuffer8_GetCaps(p,a)                (p)->GetCaps(a)
    842 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b)   (p)->GetCurrentPosition(a,b)
    843 #define IDirectSoundBuffer8_GetFormat(p,a,b,c)          (p)->GetFormat(a,b,c)
    844 #define IDirectSoundBuffer8_GetVolume(p,a)              (p)->GetVolume(a)
    845 #define IDirectSoundBuffer8_GetPan(p,a)                 (p)->GetPan(a)
    846 #define IDirectSoundBuffer8_GetFrequency(p,a)           (p)->GetFrequency(a)
    847 #define IDirectSoundBuffer8_GetStatus(p,a)              (p)->GetStatus(a)
    848 #define IDirectSoundBuffer8_Initialize(p,a,b)           (p)->Initialize(a,b)
    849 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g)       (p)->Lock(a,b,c,d,e,f,g)
    850 #define IDirectSoundBuffer8_Play(p,a,b,c)               (p)->Play(a,b,c)
    851 #define IDirectSoundBuffer8_SetCurrentPosition(p,a)     (p)->SetCurrentPosition(a)
    852 #define IDirectSoundBuffer8_SetFormat(p,a)              (p)->SetFormat(a)
    853 #define IDirectSoundBuffer8_SetVolume(p,a)              (p)->SetVolume(a)
    854 #define IDirectSoundBuffer8_SetPan(p,a)                 (p)->SetPan(a)
    855 #define IDirectSoundBuffer8_SetFrequency(p,a)           (p)->SetFrequency(a)
    856 #define IDirectSoundBuffer8_Stop(p)                     (p)->Stop()
    857 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d)           (p)->Unlock(a,b,c,d)
    858 #define IDirectSoundBuffer8_Restore(p)                  (p)->Restore()
    859 /*** IDirectSoundBuffer8 methods ***/
    860 #define IDirectSoundBuffer8_SetFX(p,a,b,c)              (p)->SetFX(a,b,c)
    861 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c)   (p)->AcquireResources(a,b,c)
    862 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d)  (p)->GetObjectInPath(a,b,c,d)
    863 #endif
    864 
    865 
    866 /*****************************************************************************
    867  * IDirectSoundCapture interface
    868  */
    869 #define INTERFACE IDirectSoundCapture
    870 DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown)
    871 {
    872     /*** IUnknown methods ***/
    873     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    874     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    875     STDMETHOD_(ULONG,Release)(THIS) PURE;
    876     /*** IDirectSoundCapture methods ***/
    877     STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE;
    878     STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE;
    879     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE;
    880 };
    881 #undef INTERFACE
    882 
    883 #if !defined(__cplusplus) || defined(CINTERFACE)
    884 /*** IUnknown methods ***/
    885 #define IDirectSoundCapture_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
    886 #define IDirectSoundCapture_AddRef(p)                    (p)->lpVtbl->AddRef(p)
    887 #define IDirectSoundCapture_Release(p)                   (p)->lpVtbl->Release(p)
    888 /*** IDirectSoundCapture methods ***/
    889 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
    890 #define IDirectSoundCapture_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
    891 #define IDirectSoundCapture_Initialize(p,a)              (p)->lpVtbl->Initialize(p,a)
    892 #else
    893 /*** IUnknown methods ***/
    894 #define IDirectSoundCapture_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
    895 #define IDirectSoundCapture_AddRef(p)                    (p)->AddRef()
    896 #define IDirectSoundCapture_Release(p)                   (p)->Release()
    897 /*** IDirectSoundCapture methods ***/
    898 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
    899 #define IDirectSoundCapture_GetCaps(p,a)                 (p)->GetCaps(a)
    900 #define IDirectSoundCapture_Initialize(p,a)              (p)->Initialize(a)
    901 #endif
    902 
    903 /*****************************************************************************
    904  * IDirectSoundCaptureBuffer interface
    905  */
    906 #define INTERFACE IDirectSoundCaptureBuffer
    907 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,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     /*** IDirectSoundCaptureBuffer methods ***/
    914     STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
    915     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
    916     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    917     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    918     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
    919     STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
    920     STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
    921     STDMETHOD(Stop)(THIS) PURE;
    922     STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
    923 };
    924 #undef INTERFACE
    925 
    926 #if !defined(__cplusplus) || defined(CINTERFACE)
    927 /*** IUnknown methods ***/
    928 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)     (p)->lpVtbl->QueryInterface(p,a,b)
    929 #define IDirectSoundCaptureBuffer_AddRef(p)                 (p)->lpVtbl->AddRef(p)
    930 #define IDirectSoundCaptureBuffer_Release(p)                (p)->lpVtbl->Release(p)
    931 /*** IDirectSoundCaptureBuffer methods ***/
    932 #define IDirectSoundCaptureBuffer_GetCaps(p,a)              (p)->lpVtbl->GetCaps(p,a)
    933 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
    934 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)        (p)->lpVtbl->GetFormat(p,a,b,c)
    935 #define IDirectSoundCaptureBuffer_GetStatus(p,a)            (p)->lpVtbl->GetStatus(p,a)
    936 #define IDirectSoundCaptureBuffer_Initialize(p,a,b)         (p)->lpVtbl->Initialize(p,a,b)
    937 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)     (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    938 #define IDirectSoundCaptureBuffer_Start(p,a)                (p)->lpVtbl->Start(p,a)
    939 #define IDirectSoundCaptureBuffer_Stop(p)                   (p)->lpVtbl->Stop(p)
    940 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)         (p)->lpVtbl->Unlock(p,a,b,c,d)
    941 #else
    942 /*** IUnknown methods ***/
    943 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)     (p)->QueryInterface(a,b)
    944 #define IDirectSoundCaptureBuffer_AddRef(p)                 (p)->AddRef()
    945 #define IDirectSoundCaptureBuffer_Release(p)                (p)->Release()
    946 /*** IDirectSoundCaptureBuffer methods ***/
    947 #define IDirectSoundCaptureBuffer_GetCaps(p,a)              (p)->GetCaps(a)
    948 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
    949 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)        (p)->GetFormat(a,b,c)
    950 #define IDirectSoundCaptureBuffer_GetStatus(p,a)            (p)->GetStatus(a)
    951 #define IDirectSoundCaptureBuffer_Initialize(p,a,b)         (p)->Initialize(a,b)
    952 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)     (p)->Lock(a,b,c,d,e,f,g)
    953 #define IDirectSoundCaptureBuffer_Start(p,a)                (p)->Start(a)
    954 #define IDirectSoundCaptureBuffer_Stop(p)                   (p)->Stop()
    955 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)         (p)->Unlock(a,b,c,d)
    956 #endif
    957 
    958 /*****************************************************************************
    959  * IDirectSoundCaptureBuffer8 interface
    960  */
    961 #define INTERFACE IDirectSoundCaptureBuffer8
    962 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)
    963 {
    964     /*** IUnknown methods ***/
    965     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
    966     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    967     STDMETHOD_(ULONG,Release)(THIS) PURE;
    968     /*** IDirectSoundCaptureBuffer methods ***/
    969     STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
    970     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
    971     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
    972     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
    973     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
    974     STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
    975     STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
    976     STDMETHOD(Stop)(THIS) PURE;
    977     STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
    978     /*** IDirectSoundCaptureBuffer8 methods ***/
    979     STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
    980     STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
    981 };
    982 #undef INTERFACE
    983 
    984 #if !defined(__cplusplus) || defined(CINTERFACE)
    985 /*** IUnknown methods ***/
    986 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
    987 #define IDirectSoundCaptureBuffer8_AddRef(p)                  (p)->lpVtbl->AddRef(p)
    988 #define IDirectSoundCaptureBuffer8_Release(p)                 (p)->lpVtbl->Release(p)
    989 /*** IDirectSoundCaptureBuffer methods ***/
    990 #define IDirectSoundCaptureBuffer8_GetCaps(p,a)               (p)->lpVtbl->GetCaps(p,a)
    991 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b)  (p)->lpVtbl->GetCurrentPosition(p,a,b)
    992 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c)         (p)->lpVtbl->GetFormat(p,a,b,c)
    993 #define IDirectSoundCaptureBuffer8_GetStatus(p,a)             (p)->lpVtbl->GetStatus(p,a)
    994 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b)          (p)->lpVtbl->Initialize(p,a,b)
    995 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g)      (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
    996 #define IDirectSoundCaptureBuffer8_Start(p,a)                 (p)->lpVtbl->Start(p,a)
    997 #define IDirectSoundCaptureBuffer8_Stop(p)                    (p)->lpVtbl->Stop(p)
    998 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d)          (p)->lpVtbl->Unlock(p,a,b,c,d)
    999 /*** IDirectSoundCaptureBuffer8 methods ***/
   1000 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
   1001 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b)         (p)->lpVtbl->GetFXStatus(p,a,b)
   1002 #else
   1003 /*** IUnknown methods ***/
   1004 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b)      (p)->QueryInterface(a,b)
   1005 #define IDirectSoundCaptureBuffer8_AddRef(p)                  (p)->AddRef()
   1006 #define IDirectSoundCaptureBuffer8_Release(p)                 (p)->Release()
   1007 /*** IDirectSoundCaptureBuffer methods ***/
   1008 #define IDirectSoundCaptureBuffer8_GetCaps(p,a)               (p)->GetCaps(a)
   1009 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b)  (p)->GetCurrentPosition(a,b)
   1010 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c)         (p)->GetFormat(a,b,c)
   1011 #define IDirectSoundCaptureBuffer8_GetStatus(p,a)             (p)->GetStatus(a)
   1012 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b)          (p)->Initialize(a,b)
   1013 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g)      (p)->Lock(a,b,c,d,e,f,g)
   1014 #define IDirectSoundCaptureBuffer8_Start(p,a)                 (p)->Start(a)
   1015 #define IDirectSoundCaptureBuffer8_Stop(p)                    (p)->Stop()
   1016 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d)          (p)->Unlock(a,b,c,d)
   1017 /*** IDirectSoundCaptureBuffer8 methods ***/
   1018 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
   1019 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b)         (p)->GetFXStatus(a,b)
   1020 #endif
   1021 
   1022 /*****************************************************************************
   1023  * IDirectSoundNotify interface
   1024  */
   1025 #define WINE_NOBUFFER                   0x80000000
   1026 
   1027 #define DSBPN_OFFSETSTOP		-1
   1028 
   1029 #define INTERFACE IDirectSoundNotify
   1030 DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)
   1031 {
   1032     /*** IUnknown methods ***/
   1033     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1034     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1035     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1036     /*** IDirectSoundNotify methods ***/
   1037     STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
   1038 };
   1039 #undef INTERFACE
   1040 
   1041 #if !defined(__cplusplus) || defined(CINTERFACE)
   1042 /*** IUnknown methods ***/
   1043 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1044 #define IDirectSoundNotify_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1045 #define IDirectSoundNotify_Release(p)            (p)->lpVtbl->Release(p)
   1046 /*** IDirectSoundNotify methods ***/
   1047 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
   1048 #else
   1049 /*** IUnknown methods ***/
   1050 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
   1051 #define IDirectSoundNotify_AddRef(p)             (p)->AddRef()
   1052 #define IDirectSoundNotify_Release(p)            (p)->Release()
   1053 /*** IDirectSoundNotify methods ***/
   1054 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
   1055 #endif
   1056 
   1057 
   1058 /*****************************************************************************
   1059  * IDirectSound3DListener interface
   1060  */
   1061 #define DS3DMODE_NORMAL             0x00000000
   1062 #define DS3DMODE_HEADRELATIVE       0x00000001
   1063 #define DS3DMODE_DISABLE            0x00000002
   1064 
   1065 #define DS3D_IMMEDIATE              0x00000000
   1066 #define DS3D_DEFERRED               0x00000001
   1067 
   1068 #define DS3D_MINDISTANCEFACTOR      FLT_MIN
   1069 #define DS3D_MAXDISTANCEFACTOR      FLT_MAX
   1070 #define DS3D_DEFAULTDISTANCEFACTOR  1.0f
   1071 
   1072 #define DS3D_MINROLLOFFFACTOR       0.0f
   1073 #define DS3D_MAXROLLOFFFACTOR       10.0f
   1074 #define DS3D_DEFAULTROLLOFFFACTOR   1.0f
   1075 
   1076 #define DS3D_MINDOPPLERFACTOR       0.0f
   1077 #define DS3D_MAXDOPPLERFACTOR       10.0f
   1078 #define DS3D_DEFAULTDOPPLERFACTOR   1.0f
   1079 
   1080 #define DS3D_DEFAULTMINDISTANCE     1.0f
   1081 #define DS3D_DEFAULTMAXDISTANCE     1000000000.0f
   1082 
   1083 #define DS3D_MINCONEANGLE           0
   1084 #define DS3D_MAXCONEANGLE           360
   1085 #define DS3D_DEFAULTCONEANGLE       360
   1086 
   1087 #define DS3D_DEFAULTCONEOUTSIDEVOLUME   DSBVOLUME_MAX
   1088 
   1089 typedef struct _DS3DLISTENER {
   1090 	DWORD				dwSize;
   1091 	D3DVECTOR			vPosition;
   1092 	D3DVECTOR			vVelocity;
   1093 	D3DVECTOR			vOrientFront;
   1094 	D3DVECTOR			vOrientTop;
   1095 	D3DVALUE			flDistanceFactor;
   1096 	D3DVALUE			flRolloffFactor;
   1097 	D3DVALUE			flDopplerFactor;
   1098 } DS3DLISTENER, *LPDS3DLISTENER;
   1099 
   1100 typedef const DS3DLISTENER *LPCDS3DLISTENER;
   1101 
   1102 #define INTERFACE IDirectSound3DListener
   1103 DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)
   1104 {
   1105     /*** IUnknown methods ***/
   1106     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1107     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1108     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1109     /*** IDirectSound3DListener methods ***/
   1110     STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE;
   1111     STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE;
   1112     STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE;
   1113     STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE;
   1114     STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
   1115     STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE;
   1116     STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
   1117     STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE;
   1118     STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
   1119     STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
   1120     STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
   1121     STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1122     STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
   1123     STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1124     STDMETHOD(CommitDeferredSettings)(THIS) PURE;
   1125 };
   1126 #undef INTERFACE
   1127 
   1128 #if !defined(__cplusplus) || defined(CINTERFACE)
   1129 /*** IUnknown methods ***/
   1130 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1131 #define IDirectSound3DListener_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1132 #define IDirectSound3DListener_Release(p)            (p)->lpVtbl->Release(p)
   1133 /*** IDirectSound3DListener methods ***/
   1134 #define IDirectSound3DListener_GetAllParameters(p,a)           (p)->lpVtbl->GetAllParameters(p,a)
   1135 #define IDirectSound3DListener_GetDistanceFactor(p,a)          (p)->lpVtbl->GetDistanceFactor(p,a)
   1136 #define IDirectSound3DListener_GetDopplerFactor(p,a)           (p)->lpVtbl->GetDopplerFactor(p,a)
   1137 #define IDirectSound3DListener_GetOrientation(p,a,b)           (p)->lpVtbl->GetOrientation(p,a,b)
   1138 #define IDirectSound3DListener_GetPosition(p,a)                (p)->lpVtbl->GetPosition(p,a)
   1139 #define IDirectSound3DListener_GetRolloffFactor(p,a)           (p)->lpVtbl->GetRolloffFactor(p,a)
   1140 #define IDirectSound3DListener_GetVelocity(p,a)                (p)->lpVtbl->GetVelocity(p,a)
   1141 #define IDirectSound3DListener_SetAllParameters(p,a,b)         (p)->lpVtbl->SetAllParameters(p,a,b)
   1142 #define IDirectSound3DListener_SetDistanceFactor(p,a,b)        (p)->lpVtbl->SetDistanceFactor(p,a,b)
   1143 #define IDirectSound3DListener_SetDopplerFactor(p,a,b)         (p)->lpVtbl->SetDopplerFactor(p,a,b)
   1144 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
   1145 #define IDirectSound3DListener_SetPosition(p,a,b,c,d)          (p)->lpVtbl->SetPosition(p,a,b,c,d)
   1146 #define IDirectSound3DListener_SetRolloffFactor(p,a,b)         (p)->lpVtbl->SetRolloffFactor(p,a,b)
   1147 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)          (p)->lpVtbl->SetVelocity(p,a,b,c,d)
   1148 #define IDirectSound3DListener_CommitDeferredSettings(p)       (p)->lpVtbl->CommitDeferredSettings(p)
   1149 #else
   1150 /*** IUnknown methods ***/
   1151 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
   1152 #define IDirectSound3DListener_AddRef(p)             (p)->AddRef()
   1153 #define IDirectSound3DListener_Release(p)            (p)->Release()
   1154 /*** IDirectSound3DListener methods ***/
   1155 #define IDirectSound3DListener_GetAllParameters(p,a)           (p)->GetAllParameters(a)
   1156 #define IDirectSound3DListener_GetDistanceFactor(p,a)          (p)->GetDistanceFactor(a)
   1157 #define IDirectSound3DListener_GetDopplerFactor(p,a)           (p)->GetDopplerFactor(a)
   1158 #define IDirectSound3DListener_GetOrientation(p,a,b)           (p)->GetOrientation(a,b)
   1159 #define IDirectSound3DListener_GetPosition(p,a)                (p)->GetPosition(a)
   1160 #define IDirectSound3DListener_GetRolloffFactor(p,a)           (p)->GetRolloffFactor(a)
   1161 #define IDirectSound3DListener_GetVelocity(p,a)                (p)->GetVelocity(a)
   1162 #define IDirectSound3DListener_SetAllParameters(p,a,b)         (p)->SetAllParameters(a,b)
   1163 #define IDirectSound3DListener_SetDistanceFactor(p,a,b)        (p)->SetDistanceFactor(a,b)
   1164 #define IDirectSound3DListener_SetDopplerFactor(p,a,b)         (p)->SetDopplerFactor(a,b)
   1165 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
   1166 #define IDirectSound3DListener_SetPosition(p,a,b,c,d)          (p)->SetPosition(a,b,c,d)
   1167 #define IDirectSound3DListener_SetRolloffFactor(p,a,b)         (p)->SetRolloffFactor(a,b)
   1168 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)          (p)->SetVelocity(a,b,c,d)
   1169 #define IDirectSound3DListener_CommitDeferredSettings(p)       (p)->CommitDeferredSettings()
   1170 #endif
   1171 
   1172 /*****************************************************************************
   1173  * IDirectSound3DBuffer interface
   1174  */
   1175 typedef struct  _DS3DBUFFER {
   1176 	DWORD				dwSize;
   1177 	D3DVECTOR			vPosition;
   1178 	D3DVECTOR			vVelocity;
   1179 	DWORD				dwInsideConeAngle;
   1180 	DWORD				dwOutsideConeAngle;
   1181 	D3DVECTOR			vConeOrientation;
   1182 	LONG				lConeOutsideVolume;
   1183 	D3DVALUE			flMinDistance;
   1184 	D3DVALUE			flMaxDistance;
   1185 	DWORD				dwMode;
   1186 } DS3DBUFFER, *LPDS3DBUFFER;
   1187 
   1188 typedef const DS3DBUFFER *LPCDS3DBUFFER;
   1189 
   1190 #define INTERFACE IDirectSound3DBuffer
   1191 DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown)
   1192 {
   1193     /*** IUnknown methods ***/
   1194     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1195     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1196     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1197     /*** IDirectSound3DBuffer methods ***/
   1198     STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE;
   1199     STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE;
   1200     STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE;
   1201     STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE;
   1202     STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE;
   1203     STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE;
   1204     STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE;
   1205     STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
   1206     STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
   1207     STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE;
   1208     STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
   1209     STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1210     STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
   1211     STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
   1212     STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
   1213     STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE;
   1214     STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1215     STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
   1216 };
   1217 #undef INTERFACE
   1218 
   1219 #if !defined(__cplusplus) || defined(CINTERFACE)
   1220 /*** IUnknown methods ***/
   1221 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1222 #define IDirectSound3DBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1223 #define IDirectSound3DBuffer_Release(p)            (p)->lpVtbl->Release(p)
   1224 /*** IDirectSound3DBuffer methods ***/
   1225 #define IDirectSound3DBuffer_GetAllParameters(p,a)         (p)->lpVtbl->GetAllParameters(p,a)
   1226 #define IDirectSound3DBuffer_GetConeAngles(p,a,b)          (p)->lpVtbl->GetConeAngles(p,a,b)
   1227 #define IDirectSound3DBuffer_GetConeOrientation(p,a)       (p)->lpVtbl->GetConeOrientation(p,a)
   1228 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)     (p)->lpVtbl->GetConeOutsideVolume(p,a)
   1229 #define IDirectSound3DBuffer_GetMaxDistance(p,a)           (p)->lpVtbl->GetMaxDistance(p,a)
   1230 #define IDirectSound3DBuffer_GetMinDistance(p,a)           (p)->lpVtbl->GetMinDistance(p,a)
   1231 #define IDirectSound3DBuffer_GetMode(p,a)                  (p)->lpVtbl->GetMode(p,a)
   1232 #define IDirectSound3DBuffer_GetPosition(p,a)              (p)->lpVtbl->GetPosition(p,a)
   1233 #define IDirectSound3DBuffer_GetVelocity(p,a)              (p)->lpVtbl->GetVelocity(p,a)
   1234 #define IDirectSound3DBuffer_SetAllParameters(p,a,b)       (p)->lpVtbl->SetAllParameters(p,a,b)
   1235 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)        (p)->lpVtbl->SetConeAngles(p,a,b,c)
   1236 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
   1237 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)   (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
   1238 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)         (p)->lpVtbl->SetMaxDistance(p,a,b)
   1239 #define IDirectSound3DBuffer_SetMinDistance(p,a,b)         (p)->lpVtbl->SetMinDistance(p,a,b)
   1240 #define IDirectSound3DBuffer_SetMode(p,a,b)                (p)->lpVtbl->SetMode(p,a,b)
   1241 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)        (p)->lpVtbl->SetPosition(p,a,b,c,d)
   1242 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)        (p)->lpVtbl->SetVelocity(p,a,b,c,d)
   1243 #else
   1244 /*** IUnknown methods ***/
   1245 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
   1246 #define IDirectSound3DBuffer_AddRef(p)             (p)->AddRef()
   1247 #define IDirectSound3DBuffer_Release(p)            (p)->Release()
   1248 /*** IDirectSound3DBuffer methods ***/
   1249 #define IDirectSound3DBuffer_GetAllParameters(p,a)         (p)->GetAllParameters(a)
   1250 #define IDirectSound3DBuffer_GetConeAngles(p,a,b)          (p)->GetConeAngles(a,b)
   1251 #define IDirectSound3DBuffer_GetConeOrientation(p,a)       (p)->GetConeOrientation(a)
   1252 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)     (p)->GetConeOutsideVolume(a)
   1253 #define IDirectSound3DBuffer_GetMaxDistance(p,a)           (p)->GetMaxDistance(a)
   1254 #define IDirectSound3DBuffer_GetMinDistance(p,a)           (p)->GetMinDistance(a)
   1255 #define IDirectSound3DBuffer_GetMode(p,a)                  (p)->GetMode(a)
   1256 #define IDirectSound3DBuffer_GetPosition(p,a)              (p)->GetPosition(a)
   1257 #define IDirectSound3DBuffer_GetVelocity(p,a)              (p)->GetVelocity(a)
   1258 #define IDirectSound3DBuffer_SetAllParameters(p,a,b)       (p)->SetAllParameters(a,b)
   1259 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)        (p)->SetConeAngles(a,b,c)
   1260 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
   1261 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)   (p)->SetConeOutsideVolume(a,b)
   1262 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)         (p)->SetMaxDistance(a,b)
   1263 #define IDirectSound3DBuffer_SetMinDistance(p,a,b)         (p)->SetMinDistance(a,b)
   1264 #define IDirectSound3DBuffer_SetMode(p,a,b)                (p)->SetMode(a,b)
   1265 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)        (p)->SetPosition(a,b,c,d)
   1266 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)        (p)->SetVelocity(a,b,c,d)
   1267 #endif
   1268 
   1269 /*****************************************************************************
   1270  * IKsPropertySet interface
   1271  */
   1272 #ifndef _IKsPropertySet_
   1273 #define _IKsPropertySet_
   1274 
   1275 typedef struct IKsPropertySet *LPKSPROPERTYSET;
   1276 
   1277 DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
   1278 
   1279 #define KSPROPERTY_SUPPORT_GET	1
   1280 #define KSPROPERTY_SUPPORT_SET	2
   1281 
   1282 #define INTERFACE IKsPropertySet
   1283 DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
   1284 {
   1285     /*** IUnknown methods ***/
   1286     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1287     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1288     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1289     /*** IKsPropertySet methods ***/
   1290     STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE;
   1291     STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE;
   1292     STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE;
   1293 };
   1294 #undef INTERFACE
   1295 
   1296 #if !defined(__cplusplus) || defined(CINTERFACE)
   1297 /*** IUnknown methods ***/
   1298 #define IKsPropertySet_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
   1299 #define IKsPropertySet_AddRef(p)                (p)->lpVtbl->AddRef(p)
   1300 #define IKsPropertySet_Release(p)               (p)->lpVtbl->Release(p)
   1301 /*** IKsPropertySet methods ***/
   1302 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)     (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
   1303 #define IKsPropertySet_Set(p,a,b,c,d,e,f)       (p)->lpVtbl->Set(p,a,b,c,d,e,f)
   1304 #define IKsPropertySet_QuerySupport(p,a,b,c)    (p)->lpVtbl->QuerySupport(p,a,b,c)
   1305 #else
   1306 /*** IUnknown methods ***/
   1307 #define IKsPropertySet_QueryInterface(p,a,b)    (p)->QueryInterface(a,b)
   1308 #define IKsPropertySet_AddRef(p)                (p)->AddRef()
   1309 #define IKsPropertySet_Release(p)               (p)->Release()
   1310 /*** IKsPropertySet methods ***/
   1311 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)     (p)->Get(a,b,c,d,e,f,g)
   1312 #define IKsPropertySet_Set(p,a,b,c,d,e,f)       (p)->Set(a,b,c,d,e,f)
   1313 #define IKsPropertySet_QuerySupport(p,a,b,c)    (p)->QuerySupport(a,b,c)
   1314 #endif
   1315 
   1316 #endif /* _IKsPropertySet_ */
   1317 
   1318 /*****************************************************************************
   1319  * IDirectSoundFullDuplex interface
   1320  */
   1321 #define INTERFACE IDirectSoundFullDuplex
   1322 DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown)
   1323 {
   1324     /*** IUnknown methods ***/
   1325     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
   1326     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1327     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1328     /*** IDirectSoundFullDuplex methods ***/
   1329     STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
   1330 };
   1331 #undef INTERFACE
   1332 
   1333 #if !defined(__cplusplus) || defined(CINTERFACE)
   1334 /*** IUnknown methods ***/
   1335 #define IDirectSoundFullDuplex_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
   1336 #define IDirectSoundFullDuplex_AddRef(p)                (p)->lpVtbl->AddRef(p)
   1337 #define IDirectSoundFullDuplex_Release(p)               (p)->lpVtbl->Release(p)
   1338 /*** IDirectSoundFullDuplex methods ***/
   1339 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h)    (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
   1340 #else
   1341 /*** IUnknown methods ***/
   1342 #define IDirectSoundFullDuplex_QueryInterface(p,a,b)    (p)->QueryInterface(a,b)
   1343 #define IDirectSoundFullDuplex_AddRef(p)                (p)->AddRef()
   1344 #define IDirectSoundFullDuplex_Release(p)               (p)->Release()
   1345 /*** IDirectSoundFullDuplex methods ***/
   1346 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h)    (p)->Initialize(a,b,c,d,e,f,g,h)
   1347 #endif
   1348 
   1349 
   1350 /*****************************************************************************
   1351  * IDirectSoundFXI3DL2Reverb interface
   1352  */
   1353 #define INTERFACE IDirectSoundFXI3DL2Reverb
   1354 DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb,IUnknown)
   1355 {
   1356     /*** IUnknown methods ***/
   1357     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1358     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1359     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1360 
   1361     /*** IDirectSoundFXI3DL2Reverb methods ***/
   1362     STDMETHOD(SetAllParameters)(THIS_ LPCDSFXI3DL2Reverb reverb) PURE;
   1363     STDMETHOD(GetAllParameters)(THIS_ LPDSFXI3DL2Reverb reverb) PURE;
   1364     STDMETHOD(SetPreset)(THIS_ DWORD preset) PURE;
   1365     STDMETHOD(GetPreset)(THIS_ DWORD *preset) PURE;
   1366     STDMETHOD(SetQuality)(THIS_ LONG quality) PURE;
   1367     STDMETHOD(GetQuality)(THIS_ LONG *quality) PURE;
   1368 };
   1369 #undef INTERFACE
   1370 
   1371 #if !defined(__cplusplus) || defined(CINTERFACE)
   1372 #define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1373 #define IDirectSoundFXI3DL2Reverb_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1374 #define IDirectSoundFXI3DL2Reverb_Release(p)            (p)->lpVtbl->Release(p)
   1375 #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1376 #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1377 #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a)        (p)->lpVtbl->SetPreset(p,a)
   1378 #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a)        (p)->lpVtbl->GetPreset(p,a)
   1379 #else
   1380 #define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
   1381 #define IDirectSoundFXI3DL2Reverb_AddRef(p)             (p)->AddRef()
   1382 #define IDirectSoundFXI3DL2Reverb_Release(p)            (p)->Release()
   1383 #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1384 #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1385 #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a)        (p)->SetPreset(a)
   1386 #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a)        (p)->GetPreset(a)
   1387 #endif
   1388 
   1389 typedef struct _DSFXGargle
   1390 {
   1391     DWORD       dwRateHz;
   1392     DWORD       dwWaveShape;
   1393 } DSFXGargle, *LPDSFXGargle;
   1394 
   1395 typedef const DSFXGargle *LPCDSFXGargle;
   1396 
   1397 #define DSFXGARGLE_RATEHZ_MIN       1
   1398 #define DSFXGARGLE_RATEHZ_MAX    1000
   1399 #define DSFXGARGLE_WAVE_SQUARE      1
   1400 #define DSFXGARGLE_WAVE_TRIANGLE    0
   1401 
   1402 #define INTERFACE IDirectSoundFXGargle
   1403 DECLARE_INTERFACE_(IDirectSoundFXGargle,IUnknown)
   1404 {
   1405     /*** IUnknown methods ***/
   1406     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1407     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1408     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1409 
   1410     /*** IDirectSoundFXGargle methods ***/
   1411     STDMETHOD(SetAllParameters)(THIS_ const DSFXGargle *gargle) PURE;
   1412     STDMETHOD(GetAllParameters)(THIS_ DSFXGargle *gargle) PURE;
   1413 };
   1414 #undef INTERFACE
   1415 
   1416 #if !defined(__cplusplus) || defined(CINTERFACE)
   1417 #define IDirectSoundFXGargle_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1418 #define IDirectSoundFXGargle_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1419 #define IDirectSoundFXGargle_Release(p)            (p)->lpVtbl->Release(p)
   1420 #define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1421 #define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1422 #else
   1423 #define IDirectSoundFXGargle_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1424 #define IDirectSoundFXGargle_AddRef(p)             (p)->AddRef(p)
   1425 #define IDirectSoundFXGargle_Release(p)            (p)->Release(p)
   1426 #define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1427 #define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1428 #endif
   1429 
   1430 typedef struct _DSFXChorus
   1431 {
   1432     FLOAT fWetDryMix;
   1433     FLOAT fDepth;
   1434     FLOAT fFeedback;
   1435     FLOAT fFrequency;
   1436     LONG  lWaveform;
   1437     FLOAT fDelay;
   1438     LONG  lPhase;
   1439 } DSFXChorus, *LPDSFXChorus;
   1440 
   1441 typedef const DSFXChorus *LPCDSFXChorus;
   1442 
   1443 #define DSFXCHORUS_DEPTH_MIN       0.0f
   1444 #define DSFXCHORUS_DEPTH_MAX     100.0f
   1445 #define DSFXCHORUS_DELAY_MIN       0.0f
   1446 #define DSFXCHORUS_DELAY_MAX      20.0f
   1447 #define DSFXCHORUS_FEEDBACK_MIN  -99.0f
   1448 #define DSFXCHORUS_FEEDBACK_MAX   99.0f
   1449 #define DSFXCHORUS_FREQUENCY_MIN   0.0f
   1450 #define DSFXCHORUS_FREQUENCY_MAX  10.0f
   1451 #define DSFXCHORUS_PHASE_MIN       0
   1452 #define DSFXCHORUS_PHASE_MAX       4
   1453 #define DSFXCHORUS_PHASE_NEG_180   0
   1454 #define DSFXCHORUS_PHASE_NEG_90    1
   1455 #define DSFXCHORUS_PHASE_ZERO      2
   1456 #define DSFXCHORUS_PHASE_90        3
   1457 #define DSFXCHORUS_PHASE_180       4
   1458 #define DSFXCHORUS_WAVE_TRIANGLE   0
   1459 #define DSFXCHORUS_WAVE_SIN        1
   1460 #define DSFXCHORUS_WETDRYMIX_MIN   0.0f
   1461 #define DSFXCHORUS_WETDRYMIX_MAX 100.0f
   1462 
   1463 #define INTERFACE IDirectSoundFXChorus
   1464 DECLARE_INTERFACE_(IDirectSoundFXChorus,IUnknown)
   1465 {
   1466     /*** IUnknown methods ***/
   1467     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1468     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1469     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1470 
   1471     /*** IDirectSoundFXChorus methods ***/
   1472     STDMETHOD(SetAllParameters)(THIS_ const DSFXChorus *chorus) PURE;
   1473     STDMETHOD(GetAllParameters)(THIS_ DSFXChorus *chorus) PURE;
   1474 };
   1475 #undef INTERFACE
   1476 
   1477 #if !defined(__cplusplus) || defined(CINTERFACE)
   1478 #define IDirectSoundFXChorus_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1479 #define IDirectSoundFXChorus_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1480 #define IDirectSoundFXChorus_Release(p)            (p)->lpVtbl->Release(p)
   1481 #define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1482 #define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1483 #else
   1484 #define IDirectSoundFXChorus_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1485 #define IDirectSoundFXChorus_AddRef(p)             (p)->AddRef(p)
   1486 #define IDirectSoundFXChorus_Release(p)            (p)->Release(p)
   1487 #define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1488 #define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1489 #endif
   1490 
   1491 typedef struct _DSFXFlanger
   1492 {
   1493     FLOAT fWetDryMix;
   1494     FLOAT fDepth;
   1495     FLOAT fFeedback;
   1496     FLOAT fFrequency;
   1497     LONG  lWaveform;
   1498     FLOAT fDelay;
   1499     LONG  lPhase;
   1500 } DSFXFlanger, *LPDSFXFlanger;
   1501 
   1502 typedef const DSFXFlanger *LPCDSFXFlanger;
   1503 
   1504 #define DSFXFLANGER_DELAY_MIN       0.0f
   1505 #define DSFXFLANGER_DELAY_MAX       4.0f
   1506 #define DSFXFLANGER_DEPTH_MIN       0.0f
   1507 #define DSFXFLANGER_DEPTH_MAX     100.0f
   1508 #define DSFXFLANGER_FREQUENCY_MIN   0.0f
   1509 #define DSFXFLANGER_FREQUENCY_MAX  10.0f
   1510 #define DSFXFLANGER_FEEDBACK_MIN  -99.0f
   1511 #define DSFXFLANGER_FEEDBACK_MAX   99.0f
   1512 #define DSFXFLANGER_PHASE_MIN       0
   1513 #define DSFXFLANGER_PHASE_MAX       4
   1514 #define DSFXFLANGER_PHASE_NEG_180   0
   1515 #define DSFXFLANGER_PHASE_NEG_90    1
   1516 #define DSFXFLANGER_PHASE_ZERO      2
   1517 #define DSFXFLANGER_PHASE_90        3
   1518 #define DSFXFLANGER_PHASE_180       4
   1519 #define DSFXFLANGER_WAVE_SIN        1
   1520 #define DSFXFLANGER_WAVE_TRIANGLE   0
   1521 #define DSFXFLANGER_WETDRYMIX_MIN   0.0f
   1522 #define DSFXFLANGER_WETDRYMIX_MAX 100.0f
   1523 
   1524 #define INTERFACE IDirectSoundFXFlanger
   1525 DECLARE_INTERFACE_(IDirectSoundFXFlanger,IUnknown)
   1526 {
   1527     /*** IUnknown methods ***/
   1528     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1529     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1530     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1531 
   1532     /*** IDirectSoundFXFlanger methods ***/
   1533     STDMETHOD(SetAllParameters)(THIS_ const DSFXFlanger *flanger) PURE;
   1534     STDMETHOD(GetAllParameters)(THIS_ DSFXFlanger *flanger) PURE;
   1535 };
   1536 #undef INTERFACE
   1537 
   1538 #if !defined(__cplusplus) || defined(CINTERFACE)
   1539 #define IDirectSoundFXFlanger_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1540 #define IDirectSoundFXFlanger_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1541 #define IDirectSoundFXFlanger_Release(p)            (p)->lpVtbl->Release(p)
   1542 #define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1543 #define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1544 #else
   1545 #define IDirectSoundFXFlanger_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1546 #define IDirectSoundFXFlanger_AddRef(p)             (p)->AddRef(p)
   1547 #define IDirectSoundFXFlanger_Release(p)            (p)->Release(p)
   1548 #define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1549 #define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1550 #endif
   1551 
   1552 typedef struct _DSFXEcho
   1553 {
   1554     FLOAT fWetDryMix;
   1555     FLOAT fFeedback;
   1556     FLOAT fLeftDelay;
   1557     FLOAT fRightDelay;
   1558     LONG  lPanDelay;
   1559 } DSFXEcho, *LPDSFXEcho;
   1560 
   1561 typedef const DSFXEcho *LPCDSFXEcho;
   1562 
   1563 #define DSFXECHO_FEEDBACK_MIN      0.0f
   1564 #define DSFXECHO_FEEDBACK_MAX    100.0f
   1565 #define DSFXECHO_LEFTDELAY_MIN     1.0f
   1566 #define DSFXECHO_LEFTDELAY_MAX  2000.0f
   1567 #define DSFXECHO_PANDELAY_MIN      0
   1568 #define DSFXECHO_PANDELAY_MAX      1
   1569 #define DSFXECHO_RIGHTDELAY_MIN    1.0f
   1570 #define DSFXECHO_RIGHTDELAY_MAX 2000.0f
   1571 #define DSFXECHO_WETDRYMIX_MIN     0.0f
   1572 #define DSFXECHO_WETDRYMIX_MAX   100.0f
   1573 
   1574 #define INTERFACE IDirectSoundFXEcho
   1575 DECLARE_INTERFACE_(IDirectSoundFXEcho,IUnknown)
   1576 {
   1577     /*** IUnknown methods ***/
   1578     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1579     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1580     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1581 
   1582     /*** IDirectSoundFXEcho methods ***/
   1583     STDMETHOD(SetAllParameters)(THIS_ const DSFXEcho *echo) PURE;
   1584     STDMETHOD(GetAllParameters)(THIS_ DSFXEcho *echo) PURE;
   1585 };
   1586 #undef INTERFACE
   1587 
   1588 #if !defined(__cplusplus) || defined(CINTERFACE)
   1589 #define IDirectSoundFXEcho_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1590 #define IDirectSoundFXEcho_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1591 #define IDirectSoundFXEcho_Release(p)            (p)->lpVtbl->Release(p)
   1592 #define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1593 #define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1594 #else
   1595 #define IDirectSoundFXEcho_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1596 #define IDirectSoundFXEcho_AddRef(p)             (p)->AddRef(p)
   1597 #define IDirectSoundFXEcho_Release(p)            (p)->Release(p)
   1598 #define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1599 #define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1600 #endif
   1601 
   1602 typedef struct _DSFXDistortion
   1603 {
   1604     FLOAT fGain;
   1605     FLOAT fEdge;
   1606     FLOAT fPostEQCenterFrequency;
   1607     FLOAT fPostEQBandwidth;
   1608     FLOAT fPreLowpassCutoff;
   1609 } DSFXDistortion, *LPDSFXDistortion;
   1610 
   1611 typedef const DSFXDistortion *LPCDSFXDistortion;
   1612 
   1613 #define DSFXDISTORTION_EDGE_MIN                     0.0f
   1614 #define DSFXDISTORTION_EDGE_MAX                   100.0f
   1615 #define DSFXDISTORTION_GAIN_MIN                   -60.0f
   1616 #define DSFXDISTORTION_GAIN_MAX                     0.0f
   1617 #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN  100.0f
   1618 #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX 8000.0f
   1619 #define DSFXDISTORTION_POSTEQBANDWIDTH_MIN        100.0f
   1620 #define DSFXDISTORTION_POSTEQBANDWIDTH_MAX       8000.0f
   1621 #define DSFXDISTORTION_PRELOWPASSCUTOFF_MIN       100.0f
   1622 #define DSFXDISTORTION_PRELOWPASSCUTOFF_MAX      8000.0f
   1623 
   1624 #define INTERFACE IDirectSoundFXDistortion
   1625 DECLARE_INTERFACE_(IDirectSoundFXDistortion,IUnknown)
   1626 {
   1627     /*** IUnknown methods ***/
   1628     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1629     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1630     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1631 
   1632     /*** IDirectSoundFXDistortion methods ***/
   1633     STDMETHOD(SetAllParameters)(THIS_ const DSFXDistortion *distortion) PURE;
   1634     STDMETHOD(GetAllParameters)(THIS_ DSFXDistortion *distortion) PURE;
   1635 };
   1636 #undef INTERFACE
   1637 
   1638 #if !defined(__cplusplus) || defined(CINTERFACE)
   1639 #define IDirectSoundFXDistortion_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1640 #define IDirectSoundFXDistortion_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1641 #define IDirectSoundFXDistortion_Release(p)            (p)->lpVtbl->Release(p)
   1642 #define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1643 #define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1644 #else
   1645 #define IDirectSoundFXDistortion_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1646 #define IDirectSoundFXDistortion_AddRef(p)             (p)->AddRef(p)
   1647 #define IDirectSoundFXDistortion_Release(p)            (p)->Release(p)
   1648 #define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1649 #define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1650 #endif
   1651 
   1652 typedef struct _DSFXCompressor
   1653 {
   1654     FLOAT fGain;
   1655     FLOAT fAttack;
   1656     FLOAT fRelease;
   1657     FLOAT fThreshold;
   1658     FLOAT fRatio;
   1659     FLOAT fPredelay;
   1660 } DSFXCompressor, *LPDSFXCompressor;
   1661 
   1662 typedef const DSFXCompressor *LPCDSFXCompressor;
   1663 
   1664 #define DSFXCOMPRESSOR_ATTACK_MIN       0.01f
   1665 #define DSFXCOMPRESSOR_ATTACK_MAX     500.0f
   1666 #define DSFXCOMPRESSOR_GAIN_MIN       -60.0f
   1667 #define DSFXCOMPRESSOR_GAIN_MAX        60.0f
   1668 #define DSFXCOMPRESSOR_PREDELAY_MIN     0.0f
   1669 #define DSFXCOMPRESSOR_PREDELAY_MAX     4.0f
   1670 #define DSFXCOMPRESSOR_RATIO_MIN        1.0f
   1671 #define DSFXCOMPRESSOR_RATIO_MAX      100.0f
   1672 #define DSFXCOMPRESSOR_RELEASE_MIN     50.0f
   1673 #define DSFXCOMPRESSOR_RELEASE_MAX   3000.0f
   1674 #define DSFXCOMPRESSOR_THRESHOLD_MIN  -60.0f
   1675 #define DSFXCOMPRESSOR_THRESHOLD_MAX    0.0f
   1676 
   1677 #define INTERFACE IDirectSoundFXCompressor
   1678 DECLARE_INTERFACE_(IDirectSoundFXCompressor, IUnknown)
   1679 {
   1680     /*** IUnknown methods ***/
   1681     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1682     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1683     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1684 
   1685     /*** IDirectSoundFXCompressor methods ***/
   1686     STDMETHOD(SetAllParameters)(THIS_ const DSFXCompressor *compressor) PURE;
   1687     STDMETHOD(GetAllParameters)(THIS_ DSFXCompressor *compressor) PURE;
   1688 };
   1689 #undef INTERFACE
   1690 
   1691 #if !defined(__cplusplus) || defined(CINTERFACE)
   1692 #define IDirectSoundFXCompressor_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1693 #define IDirectSoundFXCompressor_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1694 #define IDirectSoundFXCompressor_Release(p)            (p)->lpVtbl->Release(p)
   1695 #define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1696 #define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1697 #else
   1698 #define IDirectSoundFXCompressor_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1699 #define IDirectSoundFXCompressor_AddRef(p)             (p)->AddRef(p)
   1700 #define IDirectSoundFXCompressor_Release(p)            (p)->Release(p)
   1701 #define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1702 #define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1703 #endif
   1704 
   1705 typedef struct _DSFXParamEq
   1706 {
   1707     FLOAT fCenter;
   1708     FLOAT fBandwidth;
   1709     FLOAT fGain;
   1710 } DSFXParamEq, *LPDSFXParamEq;
   1711 
   1712 typedef const DSFXParamEq *LPCDSFXParamEq;
   1713 
   1714 #define DSFXPARAMEQ_BANDWIDTH_MIN     1.0f
   1715 #define DSFXPARAMEQ_BANDWIDTH_MAX    36.0f
   1716 #define DSFXPARAMEQ_CENTER_MIN       80.0f
   1717 #define DSFXPARAMEQ_CENTER_MAX    16000.0f
   1718 #define DSFXPARAMEQ_GAIN_MIN        -15.0f
   1719 #define DSFXPARAMEQ_GAIN_MAX         15.0f
   1720 
   1721 #define INTERFACE IDirectSoundFXParamEq
   1722 DECLARE_INTERFACE_(IDirectSoundFXParamEq, IUnknown)
   1723 {
   1724     /*** IUnknown methods ***/
   1725     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1726     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1727     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1728 
   1729     /*** IDirectSoundFXParamEq methods ***/
   1730     STDMETHOD(SetAllParameters)(THIS_ const DSFXParamEq *param) PURE;
   1731     STDMETHOD(GetAllParameters)(THIS_ DSFXParamEq *param) PURE;
   1732 };
   1733 #undef INTERFACE
   1734 
   1735 #if !defined(__cplusplus) || defined(CINTERFACE)
   1736 #define IDirectSoundFXParamEq_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1737 #define IDirectSoundFXParamEq_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1738 #define IDirectSoundFXParamEq_Release(p)            (p)->lpVtbl->Release(p)
   1739 #define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1740 #define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1741 #else
   1742 #define IDirectSoundFXParamEq_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1743 #define IDirectSoundFXParamEq_AddRef(p)             (p)->AddRef(p)
   1744 #define IDirectSoundFXParamEq_Release(p)            (p)->Release(p)
   1745 #define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1746 #define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1747 #endif
   1748 
   1749 typedef struct _DSFXWavesReverb
   1750 {
   1751     FLOAT fInGain;
   1752     FLOAT fReverbMix;
   1753     FLOAT fReverbTime;
   1754     FLOAT fHighFreqRTRatio;
   1755 } DSFXWavesReverb, *LPDSFXWavesReverb;
   1756 
   1757 typedef const DSFXWavesReverb *LPCDSFXWavesReverb;
   1758 
   1759 #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN       0.001f
   1760 #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX       0.999f
   1761 #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT   0.001f
   1762 #define DSFX_WAVESREVERB_INGAIN_MIN              -96.0f
   1763 #define DSFX_WAVESREVERB_INGAIN_MAX                0.0f
   1764 #define DSFX_WAVESREVERB_INGAIN_DEFAULT            0.0f
   1765 #define DSFX_WAVESREVERB_REVERBMIX_MIN           -96.0f
   1766 #define DSFX_WAVESREVERB_REVERBMIX_MAX             0.0f
   1767 #define DSFX_WAVESREVERB_REVERBMIX_DEFAULT         0.0f
   1768 #define DSFX_WAVESREVERB_REVERBTIME_MIN            0.001f
   1769 #define DSFX_WAVESREVERB_REVERBTIME_MAX         3000.0f
   1770 #define DSFX_WAVESREVERB_REVERBTIME_DEFAULT     1000.0f
   1771 
   1772 #define INTERFACE IDirectSoundFXWavesReverb
   1773 DECLARE_INTERFACE_(IDirectSoundFXWavesReverb,IUnknown)
   1774 {
   1775     /*** IUnknown methods ***/
   1776     STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
   1777     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1778     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1779 
   1780     /*** IDirectSoundFXWavesReverb methods ***/
   1781     STDMETHOD(SetAllParameters)(THIS_ const DSFXWavesReverb *reverb) PURE;
   1782     STDMETHOD(GetAllParameters)(THIS_ DSFXWavesReverb *reverb) PURE;
   1783 };
   1784 #undef INTERFACE
   1785 
   1786 #if !defined(__cplusplus) || defined(CINTERFACE)
   1787 #define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
   1788 #define IDirectSoundFXWavesReverb_AddRef(p)             (p)->lpVtbl->AddRef(p)
   1789 #define IDirectSoundFXWavesReverb_Release(p)            (p)->lpVtbl->Release(p)
   1790 #define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
   1791 #define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
   1792 #else
   1793 #define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
   1794 #define IDirectSoundFXWavesReverb_AddRef(p)             (p)->AddRef(p)
   1795 #define IDirectSoundFXWavesReverb_Release(p)            (p)->Release(p)
   1796 #define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
   1797 #define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
   1798 #endif
   1799 
   1800 enum
   1801 {
   1802     DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW,
   1803     DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW,
   1804     DSFX_I3DL2_MATERIAL_PRESET_THINDOOR,
   1805     DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR,
   1806     DSFX_I3DL2_MATERIAL_PRESET_WOODWALL,
   1807     DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL,
   1808     DSFX_I3DL2_MATERIAL_PRESET_STONEWALL,
   1809     DSFX_I3DL2_MATERIAL_PRESET_CURTAIN
   1810 };
   1811 
   1812 #define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f
   1813 #define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f
   1814 #define I3DL2_MATERIAL_PRESET_THINDOOR     -1800,0.66f
   1815 #define I3DL2_MATERIAL_PRESET_THICKDOOR    -4400,0.64f
   1816 #define I3DL2_MATERIAL_PRESET_WOODWALL     -4000,0.50f
   1817 #define I3DL2_MATERIAL_PRESET_BRICKWALL    -5000,0.60f
   1818 #define I3DL2_MATERIAL_PRESET_STONEWALL    -6000,0.68f
   1819 #define I3DL2_MATERIAL_PRESET_CURTAIN      -1200,0.15f
   1820 
   1821 enum
   1822 {
   1823     DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT,
   1824     DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC,
   1825     DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL,
   1826     DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM,
   1827     DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM,
   1828     DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM,
   1829     DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM,
   1830     DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM,
   1831     DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL,
   1832     DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE,
   1833     DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA,
   1834     DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR,
   1835     DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY,
   1836     DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY,
   1837     DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR,
   1838     DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY,
   1839     DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST,
   1840     DSFX_I3DL2_ENVIRONMENT_PRESET_CITY,
   1841     DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS,
   1842     DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY,
   1843     DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN,
   1844     DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT,
   1845     DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE,
   1846     DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER,
   1847     DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM,
   1848     DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM,
   1849     DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM,
   1850     DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL,
   1851     DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL,
   1852     DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE
   1853 };
   1854 
   1855 #define I3DL2_ENVIRONMENT_PRESET_DEFAULT         -1000,-100,0.0f,1.49f,0.83f,-2602,0.007f,200,0.011f,100.0f,100.0f,5000.0f
   1856 #define I3DL2_ENVIRONMENT_PRESET_GENERIC         -1000,-100,0.0f,1.49f,0.83f,-2602,0.007f,200,0.011f,100.0f,100.0f,5000.0f
   1857 #define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL      -1000,-6000,0.0f,0.17f,0.10f,-1204,0.001f,207,0.002f,100.0f,100.0f,5000.0f
   1858 #define I3DL2_ENVIRONMENT_PRESET_ROOM            -1000,-454,0.0f,0.40f,0.83f,-1646,0.002f,53,0.003f,100.0f,100.0f,5000.0f
   1859 #define I3DL2_ENVIRONMENT_PRESET_BATHROOM        -1000,-1200,0.0f,1.49f,0.54f,-370,0.007f,1030,0.011f,100.0f,60.0f,5000.0f
   1860 #define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM      -1000,-6000,0.0f,0.50f,0.10f,-1376,0.003f,-1104,0.004f,100.0f,100.0f,5000.0f
   1861 #define I3DL2_ENVIRONMENT_PRESET_STONEROOM       -1000,-300,0.0f,2.31f,0.64f,-711,0.012f,83,0.017f,100.0f,100.0f,5000.0f
   1862 #define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM      -1000,-476,0.0f,4.32f,0.59f,-789,0.020f,-289,0.030f,100.0f,100.0f,5000.0f
   1863 #define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL     -1000,-500,0.0f,3.92f,0.70f,-1230,0.020f,-2,0.029f,100.0f,100.0f,5000.0f
   1864 #define I3DL2_ENVIRONMENT_PRESET_CAVE            -1000,0,0.0f,2.91f,1.30f,-602,0.015f,-302,0.022f,100.0f,100.0f,5000.0f
   1865 #define I3DL2_ENVIRONMENT_PRESET_ARENA           -1000,-698,0.0f,7.24f,0.33f,-1166,0.020f,16,0.030f,100.0f,100.0f,5000.0f
   1866 #define I3DL2_ENVIRONMENT_PRESET_HANGAR          -1000,-1000,0.0f,10.05f,0.23f,-602,0.020f,198,0.030f,100.0f,100.0f,5000.0f
   1867 #define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY -1000,-4000,0.0f,0.30f,0.10f,-1831,0.002f,-1630,0.030f,100.0f,100.0f,5000.0f
   1868 #define I3DL2_ENVIRONMENT_PRESET_HALLWAY         -1000,-300,0.0f,1.49f,0.59f,-1219,0.007f,441,0.011f,100.0f,100.0f,5000.0f
   1869 #define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR   -1000,-237,0.0f,2.70f,0.79f,-1214,0.013f,395,0.020f,100.0f,100.0f,5000.0f
   1870 #define I3DL2_ENVIRONMENT_PRESET_ALLEY           -1000,-270,0.0f,1.49f,0.86f,-1204,0.007f,-4,0.011f,100.0f,100.0f,5000.0f
   1871 #define I3DL2_ENVIRONMENT_PRESET_FOREST          -1000,-3300,0.0f,1.49f,0.54f,-2560,0.162f,-613,0.088f,79.0f,100.0f,5000.0f
   1872 #define I3DL2_ENVIRONMENT_PRESET_CITY            -1000,-800,0.0f,1.49f,0.67f,-2273,0.007f,2217,0.011f,50.0f,100.0f,5000.0f
   1873 #define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS       -1000,-2500,0.0f,1.49f,0.21f,-2780,0.300f,-2014,0.100f,27.0f,100.0f,5000.0f
   1874 #define I3DL2_ENVIRONMENT_PRESET_QUARRY          -1000,-1000,0.0f,1.49f,0.83f,-10000,0.061f,500,0.025f,100.0f,100.0f,5000.0f
   1875 #define I3DL2_ENVIRONMENT_PRESET_PLAIN           -1000,-2000,0.0f,1.49f,0.50f,-2466,0.179f,-2514,0.100f,21.0f,100.0f,5000.0f
   1876 #define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT      -1000,0,0.0f,1.65f,1.50f,-1363,0.008f,-1153,0.012f,100.0f,100.0f,5000.0f
   1877 #define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE       -1000,-1000,0.0f,2.81f,0.14f,429,0.014f,648,0.011f,80.0f,60.0f,5000.0f
   1878 #define I3DL2_ENVIRONMENT_PRESET_UNDERWATER      -1000,-4000,0.0f,1.49f,0.10f,-449,0.007f,1700,0.011f,100.0f,100.0f,5000.0f
   1879 #define I3DL2_ENVIRONMENT_PRESET_SMALLROOM       -1000,-600,0.0f,1.10f,0.83f,-400,0.005f,500,0.010f,100.0f,100.0f,5000.0f
   1880 #define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM      -1000,-600,0.0f,1.30f,0.83f,-1000,0.010f,-200,0.020f,100.0f,100.0f,5000.0f
   1881 #define I3DL2_ENVIRONMENT_PRESET_LARGEROOM       -1000,-600,0.0f,1.50f,0.83f,-1600,0.020f,-1000,0.040f,100.0f,100.0f,5000.0f
   1882 #define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL      -1000,-600,0.0f,1.80f,0.70f,-1300,0.015f,-800,0.030f,100.0f,100.0f,5000.0f
   1883 #define I3DL2_ENVIRONMENT_PRESET_LARGEHALL       -1000,-600,0.0f,1.80f,0.70f,-2000,0.030f,-1400,0.060f,100.0f,100.0f,5000.0f
   1884 #define I3DL2_ENVIRONMENT_PRESET_PLATE           -1000,-200,0.0f,1.30f,0.90f,0,0.002f,0,0.010f,100.0f,75.0f,5000.0f
   1885 
   1886 #ifdef __cplusplus
   1887 } /* extern "C" */
   1888 #endif /* defined(__cplusplus) */
   1889 
   1890 #endif /* __DSOUND_INCLUDED__ */