| 1 | /* $Id: dsound.h,v 1.5 2001-04-02 09:54:20 sandervl Exp $ */ | 
|---|
| 2 |  | 
|---|
| 3 | #ifndef __WINE_DSOUND_H | 
|---|
| 4 | #define __WINE_DSOUND_H | 
|---|
| 5 |  | 
|---|
| 6 | #include "winbase.h"     /* for CRITICAL_SECTION */ | 
|---|
| 7 | #include "mmsystem.h" | 
|---|
| 8 | #include "d3d.h"                        /*FIXME: Need to break out d3dtypes.h */ | 
|---|
| 9 |  | 
|---|
| 10 | /***************************************************************************** | 
|---|
| 11 | * Predeclare the interfaces | 
|---|
| 12 | */ | 
|---|
| 13 | DEFINE_GUID(CLSID_DirectSound,          0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); | 
|---|
| 14 |  | 
|---|
| 15 | DEFINE_GUID(IID_IDirectSound,           0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); | 
|---|
| 16 | typedef struct IDirectSound IDirectSound,*LPDIRECTSOUND; | 
|---|
| 17 |  | 
|---|
| 18 | DEFINE_GUID(IID_IDirectSoundBuffer,     0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); | 
|---|
| 19 | typedef struct IDirectSoundBuffer IDirectSoundBuffer,*LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER; | 
|---|
| 20 |  | 
|---|
| 21 | DEFINE_GUID(IID_IDirectSoundNotify,     0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); | 
|---|
| 22 | typedef struct IDirectSoundNotify IDirectSoundNotify,*LPDIRECTSOUNDNOTIFY; | 
|---|
| 23 |  | 
|---|
| 24 | DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); | 
|---|
| 25 | typedef struct IDirectSound3DListener IDirectSound3DListener,*LPDIRECTSOUND3DLISTENER; | 
|---|
| 26 |  | 
|---|
| 27 | DEFINE_GUID(IID_IDirectSound3DBuffer,   0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); | 
|---|
| 28 | typedef struct IDirectSound3DBuffer IDirectSound3DBuffer,*LPDIRECTSOUND3DBUFFER; | 
|---|
| 29 |  | 
|---|
| 30 | DEFINE_GUID(IID_IDirectSoundCapture,    0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); | 
|---|
| 31 | typedef struct IDirectSoundCapture IDirectSoundCapture,*LPDIRECTSOUNDCAPTURE; | 
|---|
| 32 |  | 
|---|
| 33 | DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); | 
|---|
| 34 | typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer,*LPDIRECTSOUNDCAPTUREBUFFER; | 
|---|
| 35 |  | 
|---|
| 36 | DEFINE_GUID(IID_IKsPropertySet,         0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93); | 
|---|
| 37 |  | 
|---|
| 38 |  | 
|---|
| 39 | #define _FACDS          0x878 | 
|---|
| 40 | #define MAKE_DSHRESULT(code)            MAKE_HRESULT(1,_FACDS,code) | 
|---|
| 41 |  | 
|---|
| 42 | #define DS_OK                           0 | 
|---|
| 43 | #define DSERR_ALLOCATED                 MAKE_DSHRESULT(10) | 
|---|
| 44 | #define DSERR_CONTROLUNAVAIL            MAKE_DSHRESULT(30) | 
|---|
| 45 | #define DSERR_INVALIDPARAM              E_INVALIDARG | 
|---|
| 46 | #define DSERR_INVALIDCALL               MAKE_DSHRESULT(50) | 
|---|
| 47 | #define DSERR_GENERIC                   E_FAIL | 
|---|
| 48 | #define DSERR_PRIOLEVELNEEDED           MAKE_DSHRESULT(70) | 
|---|
| 49 | #define DSERR_OUTOFMEMORY               E_OUTOFMEMORY | 
|---|
| 50 | #define DSERR_BADFORMAT                 MAKE_DSHRESULT(100) | 
|---|
| 51 | #define DSERR_UNSUPPORTED               E_NOTIMPL | 
|---|
| 52 | #define DSERR_NODRIVER                  MAKE_DSHRESULT(120) | 
|---|
| 53 | #define DSERR_ALREADYINITIALIZED        MAKE_DSHRESULT(130) | 
|---|
| 54 | #define DSERR_NOAGGREGATION             CLASS_E_NOAGGREGATION | 
|---|
| 55 | #define DSERR_BUFFERLOST                MAKE_DSHRESULT(150) | 
|---|
| 56 | #define DSERR_OTHERAPPHASPRIO           MAKE_DSHRESULT(160) | 
|---|
| 57 | #define DSERR_UNINITIALIZED             MAKE_DSHRESULT(170) | 
|---|
| 58 |  | 
|---|
| 59 | #define DSCAPS_PRIMARYMONO          0x00000001 | 
|---|
| 60 | #define DSCAPS_PRIMARYSTEREO        0x00000002 | 
|---|
| 61 | #define DSCAPS_PRIMARY8BIT          0x00000004 | 
|---|
| 62 | #define DSCAPS_PRIMARY16BIT         0x00000008 | 
|---|
| 63 | #define DSCAPS_CONTINUOUSRATE       0x00000010 | 
|---|
| 64 | #define DSCAPS_EMULDRIVER           0x00000020 | 
|---|
| 65 | #define DSCAPS_CERTIFIED            0x00000040 | 
|---|
| 66 | #define DSCAPS_SECONDARYMONO        0x00000100 | 
|---|
| 67 | #define DSCAPS_SECONDARYSTEREO      0x00000200 | 
|---|
| 68 | #define DSCAPS_SECONDARY8BIT        0x00000400 | 
|---|
| 69 | #define DSCAPS_SECONDARY16BIT       0x00000800 | 
|---|
| 70 |  | 
|---|
| 71 | #define DSSCL_NORMAL            1 | 
|---|
| 72 | #define DSSCL_PRIORITY          2 | 
|---|
| 73 | #define DSSCL_EXCLUSIVE         3 | 
|---|
| 74 | #define DSSCL_WRITEPRIMARY      4 | 
|---|
| 75 |  | 
|---|
| 76 | typedef struct _DSCAPS | 
|---|
| 77 | { | 
|---|
| 78 | DWORD       dwSize; | 
|---|
| 79 | DWORD       dwFlags; | 
|---|
| 80 | DWORD       dwMinSecondarySampleRate; | 
|---|
| 81 | DWORD       dwMaxSecondarySampleRate; | 
|---|
| 82 | DWORD       dwPrimaryBuffers; | 
|---|
| 83 | DWORD       dwMaxHwMixingAllBuffers; | 
|---|
| 84 | DWORD       dwMaxHwMixingStaticBuffers; | 
|---|
| 85 | DWORD       dwMaxHwMixingStreamingBuffers; | 
|---|
| 86 | DWORD       dwFreeHwMixingAllBuffers; | 
|---|
| 87 | DWORD       dwFreeHwMixingStaticBuffers; | 
|---|
| 88 | DWORD       dwFreeHwMixingStreamingBuffers; | 
|---|
| 89 | DWORD       dwMaxHw3DAllBuffers; | 
|---|
| 90 | DWORD       dwMaxHw3DStaticBuffers; | 
|---|
| 91 | DWORD       dwMaxHw3DStreamingBuffers; | 
|---|
| 92 | DWORD       dwFreeHw3DAllBuffers; | 
|---|
| 93 | DWORD       dwFreeHw3DStaticBuffers; | 
|---|
| 94 | DWORD       dwFreeHw3DStreamingBuffers; | 
|---|
| 95 | DWORD       dwTotalHwMemBytes; | 
|---|
| 96 | DWORD       dwFreeHwMemBytes; | 
|---|
| 97 | DWORD       dwMaxContigFreeHwMemBytes; | 
|---|
| 98 | DWORD       dwUnlockTransferRateHwBuffers; | 
|---|
| 99 | DWORD       dwPlayCpuOverheadSwBuffers; | 
|---|
| 100 | DWORD       dwReserved1; | 
|---|
| 101 | DWORD       dwReserved2; | 
|---|
| 102 | } DSCAPS,*LPDSCAPS; | 
|---|
| 103 |  | 
|---|
| 104 | #define DSBPLAY_LOOPING         0x00000001 | 
|---|
| 105 |  | 
|---|
| 106 | #define DSBSTATUS_PLAYING           0x00000001 | 
|---|
| 107 | #define DSBSTATUS_BUFFERLOST        0x00000002 | 
|---|
| 108 | #define DSBSTATUS_LOOPING           0x00000004 | 
|---|
| 109 |  | 
|---|
| 110 |  | 
|---|
| 111 | #define DSBLOCK_FROMWRITECURSOR     0x00000001 | 
|---|
| 112 | #define DSBLOCK_ENTIREBUFFER        0x00000002 | 
|---|
| 113 |  | 
|---|
| 114 | #define DSBCAPS_PRIMARYBUFFER       0x00000001 | 
|---|
| 115 | #define DSBCAPS_STATIC              0x00000002 | 
|---|
| 116 | #define DSBCAPS_LOCHARDWARE         0x00000004 | 
|---|
| 117 | #define DSBCAPS_LOCSOFTWARE         0x00000008 | 
|---|
| 118 | #define DSBCAPS_CTRL3D              0x00000010 | 
|---|
| 119 | #define DSBCAPS_CTRLFREQUENCY       0x00000020 | 
|---|
| 120 | #define DSBCAPS_CTRLPAN             0x00000040 | 
|---|
| 121 | #define DSBCAPS_CTRLVOLUME          0x00000080 | 
|---|
| 122 | #define DSBCAPS_CTRLPOSITIONNOTIFY  0x00000100 | 
|---|
| 123 | #define DSBCAPS_CTRLDEFAULT         0x000000E0  /* Pan + volume + frequency. */ | 
|---|
| 124 | #define DSBCAPS_CTRLALL             0x000001F0  /* All control capabilities */ | 
|---|
| 125 | #define DSBCAPS_STICKYFOCUS         0x00004000 | 
|---|
| 126 | #define DSBCAPS_GLOBALFOCUS         0x00008000 | 
|---|
| 127 | #define DSBCAPS_GETCURRENTPOSITION2 0x00010000  /* More accurate play cursor under emulation*/ | 
|---|
| 128 | #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000 | 
|---|
| 129 |  | 
|---|
| 130 | #define DSBPAN_LEFT                 -10000 | 
|---|
| 131 | #define DSBPAN_RIGHT                 10000 | 
|---|
| 132 | #define DSBVOLUME_MAX                    0 | 
|---|
| 133 | #define DSBVOLUME_MIN               -10000 | 
|---|
| 134 | #define DSBFREQUENCY_MIN            100 | 
|---|
| 135 | #define DSBFREQUENCY_MAX            100000 | 
|---|
| 136 | #define DSBFREQUENCY_ORIGINAL       0 | 
|---|
| 137 |  | 
|---|
| 138 | typedef struct _DSBCAPS | 
|---|
| 139 | { | 
|---|
| 140 | DWORD       dwSize; | 
|---|
| 141 | DWORD       dwFlags; | 
|---|
| 142 | DWORD       dwBufferBytes; | 
|---|
| 143 | DWORD       dwUnlockTransferRate; | 
|---|
| 144 | DWORD       dwPlayCpuOverhead; | 
|---|
| 145 | } DSBCAPS,*LPDSBCAPS; | 
|---|
| 146 |  | 
|---|
| 147 | #define DSSCL_NORMAL                1 | 
|---|
| 148 | #define DSSCL_PRIORITY              2 | 
|---|
| 149 | #define DSSCL_EXCLUSIVE             3 | 
|---|
| 150 | #define DSSCL_WRITEPRIMARY          4 | 
|---|
| 151 |  | 
|---|
| 152 | typedef struct _DSBUFFERDESC | 
|---|
| 153 | { | 
|---|
| 154 | DWORD               dwSize; | 
|---|
| 155 | DWORD               dwFlags; | 
|---|
| 156 | DWORD               dwBufferBytes; | 
|---|
| 157 | DWORD               dwReserved; | 
|---|
| 158 | LPWAVEFORMATEX      lpwfxFormat; | 
|---|
| 159 | } DSBUFFERDESC,*LPDSBUFFERDESC; | 
|---|
| 160 |  | 
|---|
| 161 | typedef struct _DSBPOSITIONNOTIFY | 
|---|
| 162 | { | 
|---|
| 163 | DWORD           dwOffset; | 
|---|
| 164 | HANDLE  hEventNotify; | 
|---|
| 165 | } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY; | 
|---|
| 166 |  | 
|---|
| 167 | typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY; | 
|---|
| 168 |  | 
|---|
| 169 | #define DSSPEAKER_HEADPHONE     1 | 
|---|
| 170 | #define DSSPEAKER_MONO          2 | 
|---|
| 171 | #define DSSPEAKER_QUAD          3 | 
|---|
| 172 | #define DSSPEAKER_STEREO        4 | 
|---|
| 173 | #define DSSPEAKER_SURROUND      5 | 
|---|
| 174 |  | 
|---|
| 175 | #define DSSPEAKER_GEOMETRY_MIN      0x00000005  /* 5 degrees */ | 
|---|
| 176 | #define DSSPEAKER_GEOMETRY_NARROW   0x0000000A  /* 10 degrees */ | 
|---|
| 177 | #define DSSPEAKER_GEOMETRY_WIDE     0x00000014  /* 20 degrees */ | 
|---|
| 178 | #define DSSPEAKER_GEOMETRY_MAX      0x000000B4  /* 180 degrees */ | 
|---|
| 179 |  | 
|---|
| 180 |  | 
|---|
| 181 | typedef LPVOID* LPLPVOID; | 
|---|
| 182 |  | 
|---|
| 183 | typedef BOOL (* CALLBACK LPDSENUMCALLBACKW)(LPGUID,LPWSTR,LPWSTR,LPVOID); | 
|---|
| 184 | typedef BOOL (* CALLBACK LPDSENUMCALLBACKA)(LPGUID,LPSTR,LPSTR,LPVOID); | 
|---|
| 185 |  | 
|---|
| 186 | extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW lpCallback, LPVOID lpContext ); | 
|---|
| 187 | extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA lpCallback, LPVOID lpContext ); | 
|---|
| 188 |  | 
|---|
| 189 | #ifdef UNICODE | 
|---|
| 190 | #define LPDSENUMCALLBACK        LPDSENUMCALLBACKW | 
|---|
| 191 | #define DirectSoundEnumerate    DirectSoundEnumerateW | 
|---|
| 192 | #else | 
|---|
| 193 | #define LPDSENUMCALLBACK        LPDSENUMCALLBACKA | 
|---|
| 194 | #define DirectSoundEnumerate    DirectSoundEnumerateA | 
|---|
| 195 | #endif | 
|---|
| 196 |  | 
|---|
| 197 | extern HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND * ppDS,IUnknown *pUnkOuter ); | 
|---|
| 198 |  | 
|---|
| 199 |  | 
|---|
| 200 | /***************************************************************************** | 
|---|
| 201 | * IDirectSound interface | 
|---|
| 202 | */ | 
|---|
| 203 | //#define ICOM_INTERFACE IDirectSound | 
|---|
| 204 | #define ICOM_INTERFACE VOID | 
|---|
| 205 | #define IDirectSound_METHODS \ | 
|---|
| 206 | ICOM_METHOD3(HRESULT,CreateSoundBuffer,    LPDSBUFFERDESC,lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER,lplpDirectSoundBuffer, IUnknown*,pUnkOuter) \ | 
|---|
| 207 | ICOM_METHOD1(HRESULT,GetCaps,              LPDSCAPS,lpDSCaps) \ | 
|---|
| 208 | ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, LPDIRECTSOUNDBUFFER,lpDsbOriginal, LPLPDIRECTSOUNDBUFFER,lplpDsbDuplicate) \ | 
|---|
| 209 | ICOM_METHOD2(HRESULT,SetCooperativeLevel,  HWND,hwnd, DWORD,dwLevel) \ | 
|---|
| 210 | ICOM_METHOD (HRESULT,Compact) \ | 
|---|
| 211 | ICOM_METHOD1(HRESULT,GetSpeakerConfig,     LPDWORD,lpdwSpeakerConfig) \ | 
|---|
| 212 | ICOM_METHOD1(HRESULT,SetSpeakerConfig,     DWORD,dwSpeakerConfig) \ | 
|---|
| 213 | ICOM_METHOD1(HRESULT,Initialize,           LPGUID,lpGuid) | 
|---|
| 214 | #define IDirectSound_IMETHODS \ | 
|---|
| 215 | IUnknown_IMETHODS \ | 
|---|
| 216 | IDirectSound_METHODS | 
|---|
| 217 | ICOM_DEFINE(IDirectSound,IUnknown) | 
|---|
| 218 | #undef ICOM_INTERFACE | 
|---|
| 219 |  | 
|---|
| 220 | #ifdef ICOM_CINTERFACE | 
|---|
| 221 | /*** IUnknown methods ***/ | 
|---|
| 222 | #define IDirectSound_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) | 
|---|
| 223 | #define IDirectSound_AddRef(p)             ICOM_CALL (AddRef,p) | 
|---|
| 224 | #define IDirectSound_Release(p)            ICOM_CALL (Release,p) | 
|---|
| 225 | /*** IDirectSound methods ***/ | 
|---|
| 226 | #define IDirectSound_CreateSoundBuffer(p,a,b,c)  ICOM_CALL3(CreateSoundBuffer,p,a,b,c) | 
|---|
| 227 | #define IDirectSound_GetCaps(p,a)                ICOM_CALL1(GetCaps,p,a) | 
|---|
| 228 | #define IDirectSound_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b) | 
|---|
| 229 | #define IDirectSound_SetCooperativeLevel(p,a,b)  ICOM_CALL2(SetCooperativeLevel,p,a,b) | 
|---|
| 230 | #define IDirectSound_Compact(p)                  ICOM_CALL (Compact,p) | 
|---|
| 231 | #define IDirectSound_GetSpeakerConfig(p,a)       ICOM_CALL1(GetSpeakerConfig,p,a) | 
|---|
| 232 | #define IDirectSound_SetSpeakerConfig(p,a)       ICOM_CALL1(SetSpeakerConfig,p,a) | 
|---|
| 233 | #define IDirectSound_Initialize(p,a)             ICOM_CALL1(Initialize,p,a) | 
|---|
| 234 | #endif | 
|---|
| 235 |  | 
|---|
| 236 |  | 
|---|
| 237 | /***************************************************************************** | 
|---|
| 238 | * IDirectSoundBuffer interface | 
|---|
| 239 | */ | 
|---|
| 240 | //#define ICOM_INTERFACE IDirectSoundBuffer | 
|---|
| 241 | #define ICOM_INTERFACE VOID | 
|---|
| 242 | #define IDirectSoundBuffer_METHODS \ | 
|---|
| 243 | ICOM_METHOD1(HRESULT,GetCaps,              LPDSBCAPS,lpDSBufferCaps) \ | 
|---|
| 244 | ICOM_METHOD2(HRESULT,GetCurrentPosition,   LPDWORD,lpdwCurrentPlayCursor, LPDWORD,lpdwCurrentWriteCursor) \ | 
|---|
| 245 | ICOM_METHOD3(HRESULT,GetFormat,            LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \ | 
|---|
| 246 | ICOM_METHOD1(HRESULT,GetVolume,            LPLONG,lplVolume) \ | 
|---|
| 247 | ICOM_METHOD1(HRESULT,GetPan,               LPLONG,lplpan) \ | 
|---|
| 248 | ICOM_METHOD1(HRESULT,GetFrequency,         LPDWORD,lpdwFrequency) \ | 
|---|
| 249 | ICOM_METHOD1(HRESULT,GetStatus,            LPDWORD,lpdwStatus) \ | 
|---|
| 250 | ICOM_METHOD2(HRESULT,Initialize,           LPDIRECTSOUND,lpDirectSound, LPDSBUFFERDESC,lpcDSBufferDesc) \ | 
|---|
| 251 | ICOM_METHOD7(HRESULT,Lock,                 DWORD,dwWriteCursor, DWORD,dwWriteBytes, LPVOID,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \ | 
|---|
| 252 | ICOM_METHOD3(HRESULT,Play,                 DWORD,dwReserved1, DWORD,dwReserved2, DWORD,dwFlags) \ | 
|---|
| 253 | ICOM_METHOD1(HRESULT,SetCurrentPosition,   DWORD,dwNewPosition) \ | 
|---|
| 254 | ICOM_METHOD1(HRESULT,SetFormat,            LPWAVEFORMATEX,lpcfxFormat) \ | 
|---|
| 255 | ICOM_METHOD1(HRESULT,SetVolume,            LONG,lVolume) \ | 
|---|
| 256 | ICOM_METHOD1(HRESULT,SetPan,               LONG,lPan) \ | 
|---|
| 257 | ICOM_METHOD1(HRESULT,SetFrequency,         DWORD,dwFrequency) \ | 
|---|
| 258 | ICOM_METHOD (HRESULT,Stop) \ | 
|---|
| 259 | ICOM_METHOD4(HRESULT,Unlock,               LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioPtr2) \ | 
|---|
| 260 | ICOM_METHOD (HRESULT,Restore) | 
|---|
| 261 | #define IDirectSoundBuffer_IMETHODS \ | 
|---|
| 262 | IUnknown_IMETHODS \ | 
|---|
| 263 | IDirectSoundBuffer_METHODS | 
|---|
| 264 | ICOM_DEFINE(IDirectSoundBuffer,IUnknown) | 
|---|
| 265 | #undef ICOM_INTERFACE | 
|---|
| 266 |  | 
|---|
| 267 | #ifdef ICOM_CINTERFACE | 
|---|
| 268 | /*** IUnknown methods ***/ | 
|---|
| 269 | #define IDirectSoundBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) | 
|---|
| 270 | #define IDirectSoundBuffer_AddRef(p)             ICOM_CALL (AddRef,p) | 
|---|
| 271 | #define IDirectSoundBuffer_Release(p)            ICOM_CALL (Release,p) | 
|---|
| 272 | /*** IDirectSoundBuffer methods ***/ | 
|---|
| 273 | #define IDirectSoundBuffer_GetCaps(p,a)                ICOM_CALL1(GetCaps,p,a) | 
|---|
| 274 | #define IDirectSoundBuffer_GetCurrentPosition16(p,a,b) ICOM_CALL2(GetCurrentPosition16,p,a,b) | 
|---|
| 275 | #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)   ICOM_CALL2(GetCurrentPosition,p,a,b) | 
|---|
| 276 | #define IDirectSoundBuffer_GetFormat(p,a,b,c)          ICOM_CALL3(GetFormat,p,a,b,c) | 
|---|
| 277 | #define IDirectSoundBuffer_GetVolume(p,a)              ICOM_CALL1(GetVolume,p,a) | 
|---|
| 278 | #define IDirectSoundBuffer_GetPan(p,a)                 ICOM_CALL1(GetPan,p,a) | 
|---|
| 279 | #define IDirectSoundBuffer_GetFrequency(p,a)           ICOM_CALL1(GetFrequency,p,a) | 
|---|
| 280 | #define IDirectSoundBuffer_GetStatus(p,a)              ICOM_CALL1(GetStatus,p,a) | 
|---|
| 281 | #define IDirectSoundBuffer_Initialize(p,a,b)           ICOM_CALL2(Initialize,p,a,b) | 
|---|
| 282 | #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)       ICOM_CALL7(Lock,p,a,b,c,d,e,f,g) | 
|---|
| 283 | #define IDirectSoundBuffer_Play(p,a,b,c)               ICOM_CALL3(Play,p,a,b,c) | 
|---|
| 284 | #define IDirectSoundBuffer_SetCurrentPosition(p,a)     ICOM_CALL1(SetCurrentPosition,p,a) | 
|---|
| 285 | #define IDirectSoundBuffer_SetFormat(p,a)              ICOM_CALL1(SetFormat,p,a) | 
|---|
| 286 | #define IDirectSoundBuffer_SetVolume(p,a)              ICOM_CALL1(SetVolume,p,a) | 
|---|
| 287 | #define IDirectSoundBuffer_SetPan(p,a)                 ICOM_CALL1(SetPan,p,a) | 
|---|
| 288 | #define IDirectSoundBuffer_SetFrequency(p,a)           ICOM_CALL1(SetFrequency,p,a) | 
|---|
| 289 | #define IDirectSoundBuffer_Stop(p)                     ICOM_CALL (Stop,p) | 
|---|
| 290 | #define IDirectSoundBuffer_Unlock(p,a,b,c,d)           ICOM_CALL4(Unlock,p,a,b,c,d) | 
|---|
| 291 | #define IDirectSoundBuffer_Restore(p)                  ICOM_CALL (Restore,p) | 
|---|
| 292 | #endif | 
|---|
| 293 |  | 
|---|
| 294 |  | 
|---|
| 295 | /***************************************************************************** | 
|---|
| 296 | * IDirectSoundCapture interface | 
|---|
| 297 | */ | 
|---|
| 298 | /* FIXME: not implemented yet */ | 
|---|
| 299 |  | 
|---|
| 300 |  | 
|---|
| 301 | /***************************************************************************** | 
|---|
| 302 | * IDirectSoundCaptureBuffer interface | 
|---|
| 303 | */ | 
|---|
| 304 | /* FIXME: not implemented yet */ | 
|---|
| 305 |  | 
|---|
| 306 |  | 
|---|
| 307 | /***************************************************************************** | 
|---|
| 308 | * IDirectSoundNotify interface | 
|---|
| 309 | */ | 
|---|
| 310 | #define WINE_NOBUFFER                   0x80000000 | 
|---|
| 311 |  | 
|---|
| 312 | #define DSBPN_OFFSETSTOP                -1 | 
|---|
| 313 |  | 
|---|
| 314 | //#define ICOM_INTERFACE IDirectSoundNotify | 
|---|
| 315 | #define ICOM_INTERFACE VOID | 
|---|
| 316 | #define IDirectSoundNotify_METHODS \ | 
|---|
| 317 | ICOM_METHOD2(HRESULT,SetNotificationPositions, DWORD,cPositionNotifies, LPCDSBPOSITIONNOTIFY,lpcPositionNotifies) | 
|---|
| 318 | #define IDirectSoundNotify_IMETHODS \ | 
|---|
| 319 | IUnknown_IMETHODS \ | 
|---|
| 320 | IDirectSoundNotify_METHODS | 
|---|
| 321 | ICOM_DEFINE(IDirectSoundNotify,IUnknown) | 
|---|
| 322 | #undef ICOM_INTERFACE | 
|---|
| 323 |  | 
|---|
| 324 | #ifdef ICOM_CINTERFACE | 
|---|
| 325 | /*** IUnknown methods ***/ | 
|---|
| 326 | #define IDirectSoundNotify_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) | 
|---|
| 327 | #define IDirectSoundNotify_AddRef(p)             ICOM_CALL (AddRef,p) | 
|---|
| 328 | #define IDirectSoundNotify_Release(p)            ICOM_CALL (Release,p) | 
|---|
| 329 | /*** IDirectSoundNotify methods ***/ | 
|---|
| 330 | #define IDirectSoundNotify_SetNotificationPositions(p,a,b) ICOM_CALL2(SetNotificationPositions,p,a,b) | 
|---|
| 331 | #endif | 
|---|
| 332 |  | 
|---|
| 333 |  | 
|---|
| 334 | /***************************************************************************** | 
|---|
| 335 | * IDirectSound3DListener interface | 
|---|
| 336 | */ | 
|---|
| 337 | #define DS3DMODE_NORMAL             0x00000000 | 
|---|
| 338 | #define DS3DMODE_HEADRELATIVE       0x00000001 | 
|---|
| 339 | #define DS3DMODE_DISABLE            0x00000002 | 
|---|
| 340 |  | 
|---|
| 341 | #define DS3D_IMMEDIATE              0x00000000 | 
|---|
| 342 | #define DS3D_DEFERRED               0x00000001 | 
|---|
| 343 |  | 
|---|
| 344 | #define DS3D_MINDISTANCEFACTOR      0.0f | 
|---|
| 345 | #define DS3D_MAXDISTANCEFACTOR      10.0f | 
|---|
| 346 | #define DS3D_DEFAULTDISTANCEFACTOR  1.0f | 
|---|
| 347 |  | 
|---|
| 348 | #define DS3D_MINROLLOFFFACTOR       0.0f | 
|---|
| 349 | #define DS3D_MAXROLLOFFFACTOR       10.0f | 
|---|
| 350 | #define DS3D_DEFAULTROLLOFFFACTOR   1.0f | 
|---|
| 351 |  | 
|---|
| 352 | #define DS3D_MINDOPPLERFACTOR       0.0f | 
|---|
| 353 | #define DS3D_MAXDOPPLERFACTOR       10.0f | 
|---|
| 354 | #define DS3D_DEFAULTDOPPLERFACTOR   1.0f | 
|---|
| 355 |  | 
|---|
| 356 | #define DS3D_DEFAULTMINDISTANCE     1.0f | 
|---|
| 357 | #define DS3D_DEFAULTMAXDISTANCE     1000000000.0f | 
|---|
| 358 |  | 
|---|
| 359 | #define DS3D_MINCONEANGLE           0 | 
|---|
| 360 | #define DS3D_MAXCONEANGLE           360 | 
|---|
| 361 | #define DS3D_DEFAULTCONEANGLE       360 | 
|---|
| 362 |  | 
|---|
| 363 | #define DS3D_DEFAULTCONEOUTSIDEVOLUME   0 | 
|---|
| 364 |  | 
|---|
| 365 | typedef struct _DS3DLISTENER { | 
|---|
| 366 | DWORD                           dwSize; | 
|---|
| 367 | D3DVECTOR                       vPosition; | 
|---|
| 368 | D3DVECTOR                       vVelocity; | 
|---|
| 369 | D3DVECTOR                       vOrientFront; | 
|---|
| 370 | D3DVECTOR                       vOrientTop; | 
|---|
| 371 | D3DVALUE                        flDistanceFactor; | 
|---|
| 372 | D3DVALUE                        flRolloffFactor; | 
|---|
| 373 | D3DVALUE                        flDopplerFactor; | 
|---|
| 374 | } DS3DLISTENER, *LPDS3DLISTENER; | 
|---|
| 375 |  | 
|---|
| 376 | typedef const DS3DLISTENER *LPCDS3DLISTENER; | 
|---|
| 377 |  | 
|---|
| 378 | #define ICOM_INTERFACE IDirectSound3DListener | 
|---|
| 379 | #define IDirectSound3DListener_METHODS \ | 
|---|
| 380 | ICOM_METHOD1(HRESULT,GetAllParameters,  LPDS3DLISTENER,lpListener) \ | 
|---|
| 381 | ICOM_METHOD1(HRESULT,GetDistanceFactor, LPD3DVALUE,lpflDistanceFactor) \ | 
|---|
| 382 | ICOM_METHOD1(HRESULT,GetDopplerFactor,  LPD3DVALUE,lpflDopplerFactor) \ | 
|---|
| 383 | ICOM_METHOD2(HRESULT,GetOrientation,    LPD3DVECTOR,lpvOrientFront, LPD3DVECTOR,lpvOrientTop) \ | 
|---|
| 384 | ICOM_METHOD1(HRESULT,GetPosition,       LPD3DVECTOR,lpvPosition) \ | 
|---|
| 385 | ICOM_METHOD1(HRESULT,GetRolloffFactor,  LPD3DVALUE,lpflRolloffFactor) \ | 
|---|
| 386 | ICOM_METHOD1(HRESULT,GetVelocity,       LPD3DVECTOR,lpvVelocity) \ | 
|---|
| 387 | ICOM_METHOD2(HRESULT,SetAllParameters,  LPCDS3DLISTENER,lpcListener, DWORD,dwApply) \ | 
|---|
| 388 | ICOM_METHOD2(HRESULT,SetDistanceFactor, D3DVALUE,flDistanceFactor, DWORD,dwApply) \ | 
|---|
| 389 | ICOM_METHOD2(HRESULT,SetDopplerFactor,  D3DVALUE,flDopplerFactor, DWORD,dwApply) \ | 
|---|
| 390 | ICOM_METHOD7(HRESULT,SetOrientation,    D3DVALUE,xFront, D3DVALUE,yFront, D3DVALUE,zFront, D3DVALUE,xTop, D3DVALUE,yTop, D3DVALUE,zTop, DWORD,dwApply) \ | 
|---|
| 391 | ICOM_METHOD4(HRESULT,SetPosition,       D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ | 
|---|
| 392 | ICOM_METHOD2(HRESULT,SetRolloffFactor,  D3DVALUE,flRolloffFactor, DWORD,dwApply) \ | 
|---|
| 393 | ICOM_METHOD4(HRESULT,SetVelocity,       D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ | 
|---|
| 394 | ICOM_METHOD (HRESULT,CommitDeferredSettings) | 
|---|
| 395 | #define IDirectSound3DListener_IMETHODS \ | 
|---|
| 396 | IUnknown_IMETHODS \ | 
|---|
| 397 | IDirectSound3DListener_METHODS | 
|---|
| 398 | ICOM_DEFINE(IDirectSound3DListener,IUnknown) | 
|---|
| 399 | #undef ICOM_INTERFACE | 
|---|
| 400 |  | 
|---|
| 401 | #ifdef ICOM_CINTERFACE | 
|---|
| 402 | /*** IUnknown methods ***/ | 
|---|
| 403 | #define IDirectSound3DListener_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) | 
|---|
| 404 | #define IDirectSound3DListener_AddRef(p)             ICOM_CALL (AddRef,p) | 
|---|
| 405 | #define IDirectSound3DListener_Release(p)            ICOM_CALL (Release,p) | 
|---|
| 406 | /*** IDirectSound3DListener methods ***/ | 
|---|
| 407 | #define IDirectSound3DListener_GetAllParameters(p,a)           ICOM_CALL1(GetAllParameters,p,a) | 
|---|
| 408 | #define IDirectSound3DListener_GetDistanceFactor(p,a)          ICOM_CALL1(GetDistanceFactor,p,a) | 
|---|
| 409 | #define IDirectSound3DListener_GetDopplerFactor(p,a)           ICOM_CALL1(GetDopplerFactor,p,a) | 
|---|
| 410 | #define IDirectSound3DListener_GetOrientation(p,a,b)           ICOM_CALL2(GetOrientation,p,a,b) | 
|---|
| 411 | #define IDirectSound3DListener_GetPosition(p,a)                ICOM_CALL1(GetPosition,p,a) | 
|---|
| 412 | #define IDirectSound3DListener_GetRolloffFactor(p,a)           ICOM_CALL1(GetRolloffFactor,p,a) | 
|---|
| 413 | #define IDirectSound3DListener_GetVelocity(p,a)                ICOM_CALL1(GetVelocity,p,a) | 
|---|
| 414 | #define IDirectSound3DListener_SetAllParameters(p,a,b)         ICOM_CALL2(SetAllParameters,p,a,b) | 
|---|
| 415 | #define IDirectSound3DListener_SetDistanceFactor(p,a,b)        ICOM_CALL2(SetDistanceFactor,p,a,b) | 
|---|
| 416 | #define IDirectSound3DListener_SetDopplerFactor(p,a,b)         ICOM_CALL2(SetDopplerFactor,p,a,b) | 
|---|
| 417 | #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) ICOM_CALL7(SetOrientation,p,a,b,c,d,e,f,g) | 
|---|
| 418 | #define IDirectSound3DListener_SetPosition(p,a,b,c,d)          ICOM_CALL4(SetPosition,p,a,b,c,d) | 
|---|
| 419 | #define IDirectSound3DListener_SetRolloffFactor(p,a,b)         ICOM_CALL2(SetRolloffFactor,p,a,b) | 
|---|
| 420 | #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)          ICOM_CALL4(SetVelocity,p,a,b,c,d) | 
|---|
| 421 | #define IDirectSound3DListener_CommitDeferredSettings(p)       ICOM_CALL (CommitDeferredSettings,p) | 
|---|
| 422 | #endif | 
|---|
| 423 |  | 
|---|
| 424 |  | 
|---|
| 425 | /***************************************************************************** | 
|---|
| 426 | * IDirectSound3DBuffer interface | 
|---|
| 427 | */ | 
|---|
| 428 | typedef struct  _DS3DBUFFER { | 
|---|
| 429 | DWORD                           dwSize; | 
|---|
| 430 | D3DVECTOR                       vPosition; | 
|---|
| 431 | D3DVECTOR                       vVelocity; | 
|---|
| 432 | DWORD                           dwInsideConeAngle; | 
|---|
| 433 | DWORD                           dwOutsideConeAngle; | 
|---|
| 434 | D3DVECTOR                       vConeOrientation; | 
|---|
| 435 | LONG                            lConeOutsideVolume; | 
|---|
| 436 | D3DVALUE                        flMinDistance; | 
|---|
| 437 | D3DVALUE                        flMaxDistance; | 
|---|
| 438 | DWORD                           dwMode; | 
|---|
| 439 | } DS3DBUFFER, *LPDS3DBUFFER; | 
|---|
| 440 |  | 
|---|
| 441 | typedef const DS3DBUFFER *LPCDS3DBUFFER; | 
|---|
| 442 |  | 
|---|
| 443 | #define ICOM_INTERFACE IDirectSound3DBuffer | 
|---|
| 444 | #define IDirectSound3DBuffer_METHODS \ | 
|---|
| 445 | ICOM_METHOD1(HRESULT,GetAllParameters,     LPDS3DBUFFER,lpDs3dBuffer) \ | 
|---|
| 446 | ICOM_METHOD2(HRESULT,GetConeAngles,        LPDWORD,lpdwInsideConeAngle, LPDWORD,lpdwOutsideConeAngle) \ | 
|---|
| 447 | ICOM_METHOD1(HRESULT,GetConeOrientation,   LPD3DVECTOR,lpvOrientation) \ | 
|---|
| 448 | ICOM_METHOD1(HRESULT,GetConeOutsideVolume, LPLONG,lplConeOutsideVolume) \ | 
|---|
| 449 | ICOM_METHOD1(HRESULT,GetMaxDistance,       LPD3DVALUE,lpflMaxDistance) \ | 
|---|
| 450 | ICOM_METHOD1(HRESULT,GetMinDistance,       LPD3DVALUE,lpflMinDistance) \ | 
|---|
| 451 | ICOM_METHOD1(HRESULT,GetMode,              LPDWORD,lpwdMode) \ | 
|---|
| 452 | ICOM_METHOD1(HRESULT,GetPosition,          LPD3DVECTOR,lpvPosition) \ | 
|---|
| 453 | ICOM_METHOD1(HRESULT,GetVelocity,          LPD3DVECTOR,lpvVelocity) \ | 
|---|
| 454 | ICOM_METHOD2(HRESULT,SetAllParameters,     LPCDS3DBUFFER,lpcDs3dBuffer, DWORD,dwApply) \ | 
|---|
| 455 | ICOM_METHOD3(HRESULT,SetConeAngles,        DWORD,dwInsideConeAngle, DWORD,dwOutsideConeAngle, DWORD,dwApply) \ | 
|---|
| 456 | ICOM_METHOD4(HRESULT,SetConeOrientation,   D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ | 
|---|
| 457 | ICOM_METHOD2(HRESULT,SetConeOutsideVolume, LONG,lConeOutsideVolume, DWORD,dwApply) \ | 
|---|
| 458 | ICOM_METHOD2(HRESULT,SetMaxDistance,       D3DVALUE,flMaxDistance, DWORD,dwApply) \ | 
|---|
| 459 | ICOM_METHOD2(HRESULT,SetMinDistance,       D3DVALUE,flMinDistance, DWORD,dwApply) \ | 
|---|
| 460 | ICOM_METHOD2(HRESULT,SetMode,              DWORD,dwMode, DWORD,dwApply) \ | 
|---|
| 461 | ICOM_METHOD4(HRESULT,SetPosition,          D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ | 
|---|
| 462 | ICOM_METHOD4(HRESULT,SetVelocity,          D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) | 
|---|
| 463 | #define IDirectSound3DBuffer_IMETHODS \ | 
|---|
| 464 | IUnknown_IMETHODS \ | 
|---|
| 465 | IDirectSound3DBuffer_METHODS | 
|---|
| 466 | ICOM_DEFINE(IDirectSound3DBuffer,IUnknown) | 
|---|
| 467 | #undef ICOM_INTERFACE | 
|---|
| 468 |  | 
|---|
| 469 | #ifdef ICOM_CINTERFACE | 
|---|
| 470 | /*** IUnknown methods ***/ | 
|---|
| 471 | #define IDirectSound3DBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) | 
|---|
| 472 | #define IDirectSound3DBuffer_AddRef(p)             ICOM_CALL (AddRef,p) | 
|---|
| 473 | #define IDirectSound3DBuffer_Release(p)            ICOM_CALL (Release,p) | 
|---|
| 474 | /*** IDirectSound3DBuffer methods ***/ | 
|---|
| 475 | #define IDirectSound3DBuffer_GetAllParameters(p,a)         ICOM_CALL1(GetAllParameters,p,a) | 
|---|
| 476 | #define IDirectSound3DBuffer_GetConeAngles(p,a,b)          ICOM_CALL2(GetConeAngles,p,a,b) | 
|---|
| 477 | #define IDirectSound3DBuffer_GetConeOrientation(p,a)       ICOM_CALL1(GetConeOrientation,p,a) | 
|---|
| 478 | #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)     ICOM_CALL1(GetConeOutsideVolume,p,a) | 
|---|
| 479 | #define IDirectSound3DBuffer_GetMaxDistance(p,a)           ICOM_CALL1(GetMaxDistance,p,a) | 
|---|
| 480 | #define IDirectSound3DBuffer_GetMinDistance(p,a)           ICOM_CALL1(GetMinDistance,p,a) | 
|---|
| 481 | #define IDirectSound3DBuffer_GetMode(p,a)                  ICOM_CALL1(GetMode,p,a) | 
|---|
| 482 | #define IDirectSound3DBuffer_GetPosition(p,a)              ICOM_CALL1(GetPosition,p,a) | 
|---|
| 483 | #define IDirectSound3DBuffer_GetVelocity(p,a)              ICOM_CALL1(GetVelocity,p,a) | 
|---|
| 484 | #define IDirectSound3DBuffer_SetAllParameters(p,a,b)       ICOM_CALL2(SetAllParameters,p,a,b) | 
|---|
| 485 | #define IDirectSound3DBuffer_SetConeAngles(p,a,b)          ICOM_CALL3(SetConeAngles,p,a,b) | 
|---|
| 486 | #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) ICOM_CALL4(SetConeOrientation,p,a,b,c,d) | 
|---|
| 487 | #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)   ICOM_CALL2(SetConeOutsideVolume,p,a,b) | 
|---|
| 488 | #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)         ICOM_CALL2(SetMaxDistance,p,a,b) | 
|---|
| 489 | #define IDirectSound3DBuffer_SetMinDistance(p,a,b)         ICOM_CALL2(SetMinDistance,p,a,b) | 
|---|
| 490 | #define IDirectSound3DBuffer_SetMode(p,a,b)                ICOM_CALL2(SetMode,p,a,b) | 
|---|
| 491 | #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)        ICOM_CALL4(SetPosition,p,a,b,c,d) | 
|---|
| 492 | #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)        ICOM_CALL4(SetVelocity,p,a,b,c,d) | 
|---|
| 493 | #endif | 
|---|
| 494 |  | 
|---|
| 495 |  | 
|---|
| 496 | /***************************************************************************** | 
|---|
| 497 | * IKsPropertySet interface | 
|---|
| 498 | */ | 
|---|
| 499 | /* FIXME: not implemented yet */ | 
|---|
| 500 |  | 
|---|
| 501 |  | 
|---|
| 502 | #endif /* __WINE_DSOUND_H */ | 
|---|