Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | */ |
| 18 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 19 | #ifndef __WINE_DSOUND_H |
| 20 | #define __WINE_DSOUND_H |
| 21 | |
Michael Veksler | 3fbb8dc | 1999-02-21 18:23:26 +0000 | [diff] [blame] | 22 | #include "winbase.h" /* for CRITICAL_SECTION */ |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 23 | #include "mmsystem.h" |
Peter Hunnisett | 0b56446 | 2000-05-18 01:26:42 +0000 | [diff] [blame] | 24 | #include "d3dtypes.h" |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 25 | |
Patrik Stridvall | 14da7b1 | 1999-06-12 10:53:06 +0000 | [diff] [blame] | 26 | #ifdef __cplusplus |
| 27 | extern "C" { |
| 28 | #endif /* defined(__cplusplus) */ |
| 29 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 30 | /***************************************************************************** |
| 31 | * Predeclare the interfaces |
| 32 | */ |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 33 | DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 34 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 35 | DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 36 | typedef struct IDirectSound IDirectSound,*LPDIRECTSOUND; |
| 37 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 38 | DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 39 | typedef struct IDirectSoundBuffer IDirectSoundBuffer,*LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER; |
| 40 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 41 | DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 42 | typedef struct IDirectSoundNotify IDirectSoundNotify,*LPDIRECTSOUNDNOTIFY; |
| 43 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 44 | DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 45 | typedef struct IDirectSound3DListener IDirectSound3DListener,*LPDIRECTSOUND3DLISTENER; |
| 46 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 47 | DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 48 | typedef struct IDirectSound3DBuffer IDirectSound3DBuffer,*LPDIRECTSOUND3DBUFFER; |
| 49 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 50 | DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 51 | typedef struct IDirectSoundCapture IDirectSoundCapture,*LPDIRECTSOUNDCAPTURE; |
| 52 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 53 | DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 54 | typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer,*LPDIRECTSOUNDCAPTUREBUFFER; |
Johan Gill | 8fc98cd | 2002-05-01 18:05:30 +0000 | [diff] [blame] | 55 | |
| 56 | DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE); |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 57 | |
Alexandre Julliard | 140e722 | 2002-05-05 19:40:57 +0000 | [diff] [blame] | 58 | DEFINE_GUID(IID_IKsPropertySet, 0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93); |
| 59 | typedef struct IKsPropertySet IKsPropertySet,*LPKSPROPERTYSET; |
| 60 | |
| 61 | |
Alexandre Julliard | 0623a6f | 1998-01-18 18:01:49 +0000 | [diff] [blame] | 62 | #define _FACDS 0x878 |
| 63 | #define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code) |
| 64 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 65 | #define DS_OK 0 |
Alexandre Julliard | 0623a6f | 1998-01-18 18:01:49 +0000 | [diff] [blame] | 66 | #define DSERR_ALLOCATED MAKE_DSHRESULT(10) |
| 67 | #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30) |
| 68 | #define DSERR_INVALIDPARAM E_INVALIDARG |
| 69 | #define DSERR_INVALIDCALL MAKE_DSHRESULT(50) |
| 70 | #define DSERR_GENERIC E_FAIL |
| 71 | #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70) |
| 72 | #define DSERR_OUTOFMEMORY E_OUTOFMEMORY |
| 73 | #define DSERR_BADFORMAT MAKE_DSHRESULT(100) |
| 74 | #define DSERR_UNSUPPORTED E_NOTIMPL |
| 75 | #define DSERR_NODRIVER MAKE_DSHRESULT(120) |
| 76 | #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130) |
| 77 | #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION |
| 78 | #define DSERR_BUFFERLOST MAKE_DSHRESULT(150) |
| 79 | #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160) |
| 80 | #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170) |
| 81 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 82 | #define DSCAPS_PRIMARYMONO 0x00000001 |
| 83 | #define DSCAPS_PRIMARYSTEREO 0x00000002 |
| 84 | #define DSCAPS_PRIMARY8BIT 0x00000004 |
| 85 | #define DSCAPS_PRIMARY16BIT 0x00000008 |
| 86 | #define DSCAPS_CONTINUOUSRATE 0x00000010 |
| 87 | #define DSCAPS_EMULDRIVER 0x00000020 |
| 88 | #define DSCAPS_CERTIFIED 0x00000040 |
| 89 | #define DSCAPS_SECONDARYMONO 0x00000100 |
| 90 | #define DSCAPS_SECONDARYSTEREO 0x00000200 |
| 91 | #define DSCAPS_SECONDARY8BIT 0x00000400 |
| 92 | #define DSCAPS_SECONDARY16BIT 0x00000800 |
| 93 | |
Alexandre Julliard | 0623a6f | 1998-01-18 18:01:49 +0000 | [diff] [blame] | 94 | #define DSSCL_NORMAL 1 |
| 95 | #define DSSCL_PRIORITY 2 |
| 96 | #define DSSCL_EXCLUSIVE 3 |
| 97 | #define DSSCL_WRITEPRIMARY 4 |
| 98 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 99 | typedef struct _DSCAPS |
| 100 | { |
| 101 | DWORD dwSize; |
| 102 | DWORD dwFlags; |
| 103 | DWORD dwMinSecondarySampleRate; |
| 104 | DWORD dwMaxSecondarySampleRate; |
| 105 | DWORD dwPrimaryBuffers; |
| 106 | DWORD dwMaxHwMixingAllBuffers; |
| 107 | DWORD dwMaxHwMixingStaticBuffers; |
| 108 | DWORD dwMaxHwMixingStreamingBuffers; |
| 109 | DWORD dwFreeHwMixingAllBuffers; |
| 110 | DWORD dwFreeHwMixingStaticBuffers; |
| 111 | DWORD dwFreeHwMixingStreamingBuffers; |
| 112 | DWORD dwMaxHw3DAllBuffers; |
| 113 | DWORD dwMaxHw3DStaticBuffers; |
| 114 | DWORD dwMaxHw3DStreamingBuffers; |
| 115 | DWORD dwFreeHw3DAllBuffers; |
| 116 | DWORD dwFreeHw3DStaticBuffers; |
| 117 | DWORD dwFreeHw3DStreamingBuffers; |
| 118 | DWORD dwTotalHwMemBytes; |
| 119 | DWORD dwFreeHwMemBytes; |
| 120 | DWORD dwMaxContigFreeHwMemBytes; |
| 121 | DWORD dwUnlockTransferRateHwBuffers; |
| 122 | DWORD dwPlayCpuOverheadSwBuffers; |
| 123 | DWORD dwReserved1; |
| 124 | DWORD dwReserved2; |
| 125 | } DSCAPS,*LPDSCAPS; |
| 126 | |
| 127 | #define DSBPLAY_LOOPING 0x00000001 |
| 128 | |
| 129 | #define DSBSTATUS_PLAYING 0x00000001 |
| 130 | #define DSBSTATUS_BUFFERLOST 0x00000002 |
| 131 | #define DSBSTATUS_LOOPING 0x00000004 |
| 132 | |
| 133 | |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 134 | #define DSBLOCK_FROMWRITECURSOR 0x00000001 |
| 135 | #define DSBLOCK_ENTIREBUFFER 0x00000002 |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 136 | |
| 137 | #define DSBCAPS_PRIMARYBUFFER 0x00000001 |
| 138 | #define DSBCAPS_STATIC 0x00000002 |
| 139 | #define DSBCAPS_LOCHARDWARE 0x00000004 |
| 140 | #define DSBCAPS_LOCSOFTWARE 0x00000008 |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 141 | #define DSBCAPS_CTRL3D 0x00000010 |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 142 | #define DSBCAPS_CTRLFREQUENCY 0x00000020 |
| 143 | #define DSBCAPS_CTRLPAN 0x00000040 |
| 144 | #define DSBCAPS_CTRLVOLUME 0x00000080 |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 145 | #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100 |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 146 | #define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */ |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 147 | #define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */ |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 148 | #define DSBCAPS_STICKYFOCUS 0x00004000 |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 149 | #define DSBCAPS_GLOBALFOCUS 0x00008000 |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 150 | #define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/ |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 151 | #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000 |
| 152 | |
Ove Kaaven | fdebace | 2001-09-10 23:08:11 +0000 | [diff] [blame] | 153 | #define DSBSIZE_MIN 4 |
| 154 | #define DSBSIZE_MAX 0xFFFFFFF |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 155 | #define DSBPAN_LEFT -10000 |
| 156 | #define DSBPAN_RIGHT 10000 |
| 157 | #define DSBVOLUME_MAX 0 |
| 158 | #define DSBVOLUME_MIN -10000 |
| 159 | #define DSBFREQUENCY_MIN 100 |
| 160 | #define DSBFREQUENCY_MAX 100000 |
| 161 | #define DSBFREQUENCY_ORIGINAL 0 |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 162 | |
| 163 | typedef struct _DSBCAPS |
| 164 | { |
| 165 | DWORD dwSize; |
| 166 | DWORD dwFlags; |
| 167 | DWORD dwBufferBytes; |
| 168 | DWORD dwUnlockTransferRate; |
| 169 | DWORD dwPlayCpuOverhead; |
| 170 | } DSBCAPS,*LPDSBCAPS; |
| 171 | |
| 172 | #define DSSCL_NORMAL 1 |
| 173 | #define DSSCL_PRIORITY 2 |
| 174 | #define DSSCL_EXCLUSIVE 3 |
| 175 | #define DSSCL_WRITEPRIMARY 4 |
| 176 | |
| 177 | typedef struct _DSBUFFERDESC |
| 178 | { |
| 179 | DWORD dwSize; |
| 180 | DWORD dwFlags; |
| 181 | DWORD dwBufferBytes; |
| 182 | DWORD dwReserved; |
| 183 | LPWAVEFORMATEX lpwfxFormat; |
| 184 | } DSBUFFERDESC,*LPDSBUFFERDESC; |
| 185 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 186 | typedef struct _DSBPOSITIONNOTIFY |
| 187 | { |
| 188 | DWORD dwOffset; |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 189 | HANDLE hEventNotify; |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 190 | } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY; |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 191 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 192 | typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY; |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 193 | |
| 194 | #define DSSPEAKER_HEADPHONE 1 |
| 195 | #define DSSPEAKER_MONO 2 |
| 196 | #define DSSPEAKER_QUAD 3 |
| 197 | #define DSSPEAKER_STEREO 4 |
| 198 | #define DSSPEAKER_SURROUND 5 |
| 199 | |
Marcus Meissner | 73458b0 | 1998-12-26 12:54:29 +0000 | [diff] [blame] | 200 | #define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */ |
| 201 | #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */ |
| 202 | #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */ |
| 203 | #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */ |
Robert Riggs | b995012 | 1998-12-01 12:57:31 +0000 | [diff] [blame] | 204 | |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 205 | typedef struct _DSCBUFFERDESC |
| 206 | { |
| 207 | DWORD dwSize; |
| 208 | DWORD dwFlags; |
| 209 | DWORD dwBufferBytes; |
| 210 | DWORD dwReserved; |
| 211 | LPWAVEFORMATEX lpwfxFormat; |
| 212 | } DSCBUFFERDESC, *LPDSCBUFFERDESC; |
| 213 | typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC; |
| 214 | |
| 215 | typedef struct _DSCCAPS |
| 216 | { |
| 217 | DWORD DwSize; |
| 218 | DWORD dwFlags; |
| 219 | DWORD dwFormats; |
| 220 | DWORD dwChannels; |
| 221 | } DSCCAPS, *LPDSCCAPS; |
| 222 | typedef const DSCCAPS *LPCDSCCAPS; |
| 223 | |
| 224 | typedef struct _DSCBCAPS |
| 225 | { |
| 226 | DWORD dwSize; |
| 227 | DWORD dwFlags; |
| 228 | DWORD dwBufferBytes; |
| 229 | DWORD dwReserved; |
| 230 | } DSCBCAPS, *LPDSCBCAPS; |
| 231 | typedef const DSCBCAPS *LPCDSCBCAPS; |
| 232 | |
| 233 | #ifndef __LPCGUID_DEFINED__ |
| 234 | #define __LPCGUID_DEFINED__ |
| 235 | typedef const GUID *LPCGUID; |
| 236 | #endif |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 237 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 238 | typedef LPVOID* LPLPVOID; |
| 239 | |
Patrik Stridvall | f94462f | 2002-01-31 23:22:07 +0000 | [diff] [blame] | 240 | typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPWSTR,LPWSTR,LPVOID); |
| 241 | typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPSTR,LPSTR,LPVOID); |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 242 | |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 243 | extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND * ppDS,IUnknown *pUnkOuter ); |
Peter Hunnisett | 62f3233 | 2000-05-30 20:07:31 +0000 | [diff] [blame] | 244 | extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID); |
| 245 | extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID); |
| 246 | |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 247 | extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN); |
Peter Hunnisett | 62f3233 | 2000-05-30 20:07:31 +0000 | [diff] [blame] | 248 | extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID); |
| 249 | extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID); |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 250 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 251 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 252 | /***************************************************************************** |
| 253 | * IDirectSound interface |
| 254 | */ |
| 255 | #define ICOM_INTERFACE IDirectSound |
| 256 | #define IDirectSound_METHODS \ |
| 257 | ICOM_METHOD3(HRESULT,CreateSoundBuffer, LPDSBUFFERDESC,lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER,lplpDirectSoundBuffer, IUnknown*,pUnkOuter) \ |
| 258 | ICOM_METHOD1(HRESULT,GetCaps, LPDSCAPS,lpDSCaps) \ |
| 259 | ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, LPDIRECTSOUNDBUFFER,lpDsbOriginal, LPLPDIRECTSOUNDBUFFER,lplpDsbDuplicate) \ |
| 260 | ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hwnd, DWORD,dwLevel) \ |
| 261 | ICOM_METHOD (HRESULT,Compact) \ |
| 262 | ICOM_METHOD1(HRESULT,GetSpeakerConfig, LPDWORD,lpdwSpeakerConfig) \ |
| 263 | ICOM_METHOD1(HRESULT,SetSpeakerConfig, DWORD,dwSpeakerConfig) \ |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 264 | ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGuid) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 265 | #define IDirectSound_IMETHODS \ |
| 266 | IUnknown_IMETHODS \ |
| 267 | IDirectSound_METHODS |
| 268 | ICOM_DEFINE(IDirectSound,IUnknown) |
| 269 | #undef ICOM_INTERFACE |
| 270 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 271 | /*** IUnknown methods ***/ |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 272 | #define IDirectSound_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 273 | #define IDirectSound_AddRef(p) ICOM_CALL (AddRef,p) |
| 274 | #define IDirectSound_Release(p) ICOM_CALL (Release,p) |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 275 | /*** IDirectSound methods ***/ |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 276 | #define IDirectSound_CreateSoundBuffer(p,a,b,c) ICOM_CALL3(CreateSoundBuffer,p,a,b,c) |
| 277 | #define IDirectSound_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a) |
| 278 | #define IDirectSound_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b) |
| 279 | #define IDirectSound_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b) |
| 280 | #define IDirectSound_Compact(p) ICOM_CALL (Compact,p) |
| 281 | #define IDirectSound_GetSpeakerConfig(p,a) ICOM_CALL1(GetSpeakerConfig,p,a) |
| 282 | #define IDirectSound_SetSpeakerConfig(p,a) ICOM_CALL1(SetSpeakerConfig,p,a) |
| 283 | #define IDirectSound_Initialize(p,a) ICOM_CALL1(Initialize,p,a) |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 284 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 285 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 286 | /***************************************************************************** |
| 287 | * IDirectSoundBuffer interface |
| 288 | */ |
| 289 | #define ICOM_INTERFACE IDirectSoundBuffer |
| 290 | #define IDirectSoundBuffer_METHODS \ |
| 291 | ICOM_METHOD1(HRESULT,GetCaps, LPDSBCAPS,lpDSBufferCaps) \ |
| 292 | ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCurrentPlayCursor, LPDWORD,lpdwCurrentWriteCursor) \ |
| 293 | ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \ |
| 294 | ICOM_METHOD1(HRESULT,GetVolume, LPLONG,lplVolume) \ |
| 295 | ICOM_METHOD1(HRESULT,GetPan, LPLONG,lplpan) \ |
| 296 | ICOM_METHOD1(HRESULT,GetFrequency, LPDWORD,lpdwFrequency) \ |
| 297 | ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \ |
| 298 | ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUND,lpDirectSound, LPDSBUFFERDESC,lpcDSBufferDesc) \ |
| 299 | ICOM_METHOD7(HRESULT,Lock, DWORD,dwWriteCursor, DWORD,dwWriteBytes, LPVOID,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \ |
| 300 | ICOM_METHOD3(HRESULT,Play, DWORD,dwReserved1, DWORD,dwReserved2, DWORD,dwFlags) \ |
| 301 | ICOM_METHOD1(HRESULT,SetCurrentPosition, DWORD,dwNewPosition) \ |
| 302 | ICOM_METHOD1(HRESULT,SetFormat, LPWAVEFORMATEX,lpcfxFormat) \ |
| 303 | ICOM_METHOD1(HRESULT,SetVolume, LONG,lVolume) \ |
| 304 | ICOM_METHOD1(HRESULT,SetPan, LONG,lPan) \ |
| 305 | ICOM_METHOD1(HRESULT,SetFrequency, DWORD,dwFrequency) \ |
| 306 | ICOM_METHOD (HRESULT,Stop) \ |
| 307 | ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioPtr2) \ |
| 308 | ICOM_METHOD (HRESULT,Restore) |
| 309 | #define IDirectSoundBuffer_IMETHODS \ |
| 310 | IUnknown_IMETHODS \ |
| 311 | IDirectSoundBuffer_METHODS |
| 312 | ICOM_DEFINE(IDirectSoundBuffer,IUnknown) |
| 313 | #undef ICOM_INTERFACE |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 314 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 315 | /*** IUnknown methods ***/ |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 316 | #define IDirectSoundBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 317 | #define IDirectSoundBuffer_AddRef(p) ICOM_CALL (AddRef,p) |
| 318 | #define IDirectSoundBuffer_Release(p) ICOM_CALL (Release,p) |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 319 | /*** IDirectSoundBuffer methods ***/ |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 320 | #define IDirectSoundBuffer_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a) |
Ove Kaaven | c2edee0 | 2001-10-21 15:01:43 +0000 | [diff] [blame] | 321 | #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 322 | #define IDirectSoundBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c) |
| 323 | #define IDirectSoundBuffer_GetVolume(p,a) ICOM_CALL1(GetVolume,p,a) |
| 324 | #define IDirectSoundBuffer_GetPan(p,a) ICOM_CALL1(GetPan,p,a) |
| 325 | #define IDirectSoundBuffer_GetFrequency(p,a) ICOM_CALL1(GetFrequency,p,a) |
Steve Langasek | 6d1012b | 2000-01-12 04:58:08 +0000 | [diff] [blame] | 326 | #define IDirectSoundBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 327 | #define IDirectSoundBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b) |
| 328 | #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g) |
| 329 | #define IDirectSoundBuffer_Play(p,a,b,c) ICOM_CALL3(Play,p,a,b,c) |
| 330 | #define IDirectSoundBuffer_SetCurrentPosition(p,a) ICOM_CALL1(SetCurrentPosition,p,a) |
| 331 | #define IDirectSoundBuffer_SetFormat(p,a) ICOM_CALL1(SetFormat,p,a) |
| 332 | #define IDirectSoundBuffer_SetVolume(p,a) ICOM_CALL1(SetVolume,p,a) |
| 333 | #define IDirectSoundBuffer_SetPan(p,a) ICOM_CALL1(SetPan,p,a) |
| 334 | #define IDirectSoundBuffer_SetFrequency(p,a) ICOM_CALL1(SetFrequency,p,a) |
| 335 | #define IDirectSoundBuffer_Stop(p) ICOM_CALL (Stop,p) |
Steve Langasek | 6d1012b | 2000-01-12 04:58:08 +0000 | [diff] [blame] | 336 | #define IDirectSoundBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 337 | #define IDirectSoundBuffer_Restore(p) ICOM_CALL (Restore,p) |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 338 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 339 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 340 | /***************************************************************************** |
| 341 | * IDirectSoundCapture interface |
| 342 | */ |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 343 | #define ICOM_INTERFACE IDirectSoundCapture |
| 344 | #define IDirectSoundCapture_METHODS \ |
| 345 | ICOM_METHOD3(HRESULT,CreateCaptureBuffer, LPCDSCBUFFERDESC,lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER*,lplpDSCaptureBuffer, LPUNKNOWN,pUnk) \ |
| 346 | ICOM_METHOD1(HRESULT,GetCaps, LPDSCCAPS,lpDSCCaps) \ |
| 347 | ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGUID) |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 348 | |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 349 | #define IDirectSoundCapture_IMETHODS \ |
| 350 | IUnknown_IMETHODS \ |
| 351 | IDirectSoundCapture_METHODS |
| 352 | ICOM_DEFINE(IDirectSoundCapture,IUnknown) |
| 353 | #undef ICOM_INTERFACE |
| 354 | |
| 355 | #define IDirectSoundCapture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 356 | #define IDirectSoundCapture_AddRef(p) ICOM_CALL (AddRef,p) |
| 357 | #define IDirectSoundCapture_Release(p) ICOM_CALL (Release,p) |
| 358 | #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) ICOM_CALL3(CreateCaptureBuffer,p,a,b,c) |
| 359 | #define IDirectSoundCapture_GetCaps(p,a) ICOM_CALL (GetCaps,p,a) |
| 360 | #define IDirectSoundCapture_Initialize(p,a) ICOM_CALL (Initialize,p,a) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 361 | |
| 362 | /***************************************************************************** |
| 363 | * IDirectSoundCaptureBuffer interface |
| 364 | */ |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 365 | #define ICOM_INTERFACE IDirectSoundCaptureBuffer |
| 366 | #define IDirectSoundCaptureBuffer_METHODS \ |
| 367 | ICOM_METHOD1(HRESULT,GetCaps, LPDSCBCAPS,lpDSCBCaps) \ |
| 368 | ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCapturePosition,LPDWORD,lpdwReadPosition) \ |
| 369 | ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \ |
| 370 | ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \ |
| 371 | ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUNDCAPTURE,lpDSC, LPCDSCBUFFERDESC,lpcDSCBDesc) \ |
| 372 | ICOM_METHOD7(HRESULT,Lock, DWORD,dwReadCusor, DWORD,dwReadBytes, LPVOID*,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID*,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \ |
| 373 | ICOM_METHOD1(HRESULT,Start, DWORD,dwFlags) \ |
| 374 | ICOM_METHOD (HRESULT,Stop) \ |
| 375 | ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioBytes2) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 376 | |
Peter Hunnisett | f5a1027 | 2000-06-01 22:47:35 +0000 | [diff] [blame] | 377 | #define IDirectSoundCaptureBuffer_IMETHODS \ |
| 378 | IUnknown_IMETHODS \ |
| 379 | IDirectSoundCaptureBuffer_METHODS |
| 380 | ICOM_DEFINE(IDirectSoundCaptureBuffer,IUnknown) |
| 381 | #undef ICOM_INTERFACE |
| 382 | |
| 383 | #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 384 | #define IDirectSoundCaptureBuffer_AddRef(p) ICOM_CALL (AddRef,p) |
| 385 | #define IDirectSoundCaptureBuffer_Release(p) ICOM_CALL (Release,p) |
| 386 | #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b) |
| 387 | #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c) |
| 388 | #define IDirectSoundCaptureBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a) |
| 389 | #define IDirectSoundCaptureBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b) |
| 390 | #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g) |
| 391 | #define IDirectSoundCaptureBuffer_Start(p,a) ICOM_CALL1(Start,p,a) |
| 392 | #define IDirectSoundCaptureBuffer_Stop(p) ICOM_CALL (Stop,p) |
| 393 | #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 394 | |
| 395 | /***************************************************************************** |
| 396 | * IDirectSoundNotify interface |
| 397 | */ |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 398 | #define WINE_NOBUFFER 0x80000000 |
| 399 | |
Robert Riggs | b995012 | 1998-12-01 12:57:31 +0000 | [diff] [blame] | 400 | #define DSBPN_OFFSETSTOP -1 |
| 401 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 402 | #define ICOM_INTERFACE IDirectSoundNotify |
| 403 | #define IDirectSoundNotify_METHODS \ |
| 404 | ICOM_METHOD2(HRESULT,SetNotificationPositions, DWORD,cPositionNotifies, LPCDSBPOSITIONNOTIFY,lpcPositionNotifies) |
| 405 | #define IDirectSoundNotify_IMETHODS \ |
| 406 | IUnknown_IMETHODS \ |
| 407 | IDirectSoundNotify_METHODS |
| 408 | ICOM_DEFINE(IDirectSoundNotify,IUnknown) |
| 409 | #undef ICOM_INTERFACE |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 410 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 411 | /*** IUnknown methods ***/ |
| 412 | #define IDirectSoundNotify_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 413 | #define IDirectSoundNotify_AddRef(p) ICOM_CALL (AddRef,p) |
| 414 | #define IDirectSoundNotify_Release(p) ICOM_CALL (Release,p) |
| 415 | /*** IDirectSoundNotify methods ***/ |
| 416 | #define IDirectSoundNotify_SetNotificationPositions(p,a,b) ICOM_CALL2(SetNotificationPositions,p,a,b) |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 417 | |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 418 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 419 | /***************************************************************************** |
| 420 | * IDirectSound3DListener interface |
| 421 | */ |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 422 | #define DS3DMODE_NORMAL 0x00000000 |
| 423 | #define DS3DMODE_HEADRELATIVE 0x00000001 |
| 424 | #define DS3DMODE_DISABLE 0x00000002 |
| 425 | |
| 426 | #define DS3D_IMMEDIATE 0x00000000 |
| 427 | #define DS3D_DEFERRED 0x00000001 |
| 428 | |
| 429 | #define DS3D_MINDISTANCEFACTOR 0.0f |
| 430 | #define DS3D_MAXDISTANCEFACTOR 10.0f |
| 431 | #define DS3D_DEFAULTDISTANCEFACTOR 1.0f |
| 432 | |
| 433 | #define DS3D_MINROLLOFFFACTOR 0.0f |
| 434 | #define DS3D_MAXROLLOFFFACTOR 10.0f |
| 435 | #define DS3D_DEFAULTROLLOFFFACTOR 1.0f |
| 436 | |
| 437 | #define DS3D_MINDOPPLERFACTOR 0.0f |
| 438 | #define DS3D_MAXDOPPLERFACTOR 10.0f |
| 439 | #define DS3D_DEFAULTDOPPLERFACTOR 1.0f |
| 440 | |
| 441 | #define DS3D_DEFAULTMINDISTANCE 1.0f |
| 442 | #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f |
| 443 | |
| 444 | #define DS3D_MINCONEANGLE 0 |
| 445 | #define DS3D_MAXCONEANGLE 360 |
| 446 | #define DS3D_DEFAULTCONEANGLE 360 |
| 447 | |
| 448 | #define DS3D_DEFAULTCONEOUTSIDEVOLUME 0 |
| 449 | |
| 450 | typedef struct _DS3DLISTENER { |
| 451 | DWORD dwSize; |
| 452 | D3DVECTOR vPosition; |
| 453 | D3DVECTOR vVelocity; |
| 454 | D3DVECTOR vOrientFront; |
| 455 | D3DVECTOR vOrientTop; |
| 456 | D3DVALUE flDistanceFactor; |
| 457 | D3DVALUE flRolloffFactor; |
| 458 | D3DVALUE flDopplerFactor; |
| 459 | } DS3DLISTENER, *LPDS3DLISTENER; |
| 460 | |
| 461 | typedef const DS3DLISTENER *LPCDS3DLISTENER; |
| 462 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 463 | #define ICOM_INTERFACE IDirectSound3DListener |
| 464 | #define IDirectSound3DListener_METHODS \ |
| 465 | ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DLISTENER,lpListener) \ |
| 466 | ICOM_METHOD1(HRESULT,GetDistanceFactor, LPD3DVALUE,lpflDistanceFactor) \ |
| 467 | ICOM_METHOD1(HRESULT,GetDopplerFactor, LPD3DVALUE,lpflDopplerFactor) \ |
| 468 | ICOM_METHOD2(HRESULT,GetOrientation, LPD3DVECTOR,lpvOrientFront, LPD3DVECTOR,lpvOrientTop) \ |
| 469 | ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \ |
| 470 | ICOM_METHOD1(HRESULT,GetRolloffFactor, LPD3DVALUE,lpflRolloffFactor) \ |
| 471 | ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \ |
| 472 | ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DLISTENER,lpcListener, DWORD,dwApply) \ |
| 473 | ICOM_METHOD2(HRESULT,SetDistanceFactor, D3DVALUE,flDistanceFactor, DWORD,dwApply) \ |
| 474 | ICOM_METHOD2(HRESULT,SetDopplerFactor, D3DVALUE,flDopplerFactor, DWORD,dwApply) \ |
| 475 | ICOM_METHOD7(HRESULT,SetOrientation, D3DVALUE,xFront, D3DVALUE,yFront, D3DVALUE,zFront, D3DVALUE,xTop, D3DVALUE,yTop, D3DVALUE,zTop, DWORD,dwApply) \ |
| 476 | ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ |
| 477 | ICOM_METHOD2(HRESULT,SetRolloffFactor, D3DVALUE,flRolloffFactor, DWORD,dwApply) \ |
| 478 | ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ |
| 479 | ICOM_METHOD (HRESULT,CommitDeferredSettings) |
| 480 | #define IDirectSound3DListener_IMETHODS \ |
| 481 | IUnknown_IMETHODS \ |
| 482 | IDirectSound3DListener_METHODS |
| 483 | ICOM_DEFINE(IDirectSound3DListener,IUnknown) |
| 484 | #undef ICOM_INTERFACE |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 485 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 486 | /*** IUnknown methods ***/ |
| 487 | #define IDirectSound3DListener_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 488 | #define IDirectSound3DListener_AddRef(p) ICOM_CALL (AddRef,p) |
| 489 | #define IDirectSound3DListener_Release(p) ICOM_CALL (Release,p) |
| 490 | /*** IDirectSound3DListener methods ***/ |
| 491 | #define IDirectSound3DListener_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a) |
| 492 | #define IDirectSound3DListener_GetDistanceFactor(p,a) ICOM_CALL1(GetDistanceFactor,p,a) |
| 493 | #define IDirectSound3DListener_GetDopplerFactor(p,a) ICOM_CALL1(GetDopplerFactor,p,a) |
| 494 | #define IDirectSound3DListener_GetOrientation(p,a,b) ICOM_CALL2(GetOrientation,p,a,b) |
| 495 | #define IDirectSound3DListener_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a) |
| 496 | #define IDirectSound3DListener_GetRolloffFactor(p,a) ICOM_CALL1(GetRolloffFactor,p,a) |
| 497 | #define IDirectSound3DListener_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a) |
| 498 | #define IDirectSound3DListener_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b) |
| 499 | #define IDirectSound3DListener_SetDistanceFactor(p,a,b) ICOM_CALL2(SetDistanceFactor,p,a,b) |
| 500 | #define IDirectSound3DListener_SetDopplerFactor(p,a,b) ICOM_CALL2(SetDopplerFactor,p,a,b) |
| 501 | #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) ICOM_CALL7(SetOrientation,p,a,b,c,d,e,f,g) |
| 502 | #define IDirectSound3DListener_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d) |
| 503 | #define IDirectSound3DListener_SetRolloffFactor(p,a,b) ICOM_CALL2(SetRolloffFactor,p,a,b) |
| 504 | #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d) |
| 505 | #define IDirectSound3DListener_CommitDeferredSettings(p) ICOM_CALL (CommitDeferredSettings,p) |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 506 | |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 507 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 508 | /***************************************************************************** |
| 509 | * IDirectSound3DBuffer interface |
| 510 | */ |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 511 | typedef struct _DS3DBUFFER { |
| 512 | DWORD dwSize; |
| 513 | D3DVECTOR vPosition; |
| 514 | D3DVECTOR vVelocity; |
| 515 | DWORD dwInsideConeAngle; |
| 516 | DWORD dwOutsideConeAngle; |
| 517 | D3DVECTOR vConeOrientation; |
| 518 | LONG lConeOutsideVolume; |
| 519 | D3DVALUE flMinDistance; |
| 520 | D3DVALUE flMaxDistance; |
| 521 | DWORD dwMode; |
| 522 | } DS3DBUFFER, *LPDS3DBUFFER; |
| 523 | |
| 524 | typedef const DS3DBUFFER *LPCDS3DBUFFER; |
| 525 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 526 | #define ICOM_INTERFACE IDirectSound3DBuffer |
| 527 | #define IDirectSound3DBuffer_METHODS \ |
| 528 | ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DBUFFER,lpDs3dBuffer) \ |
| 529 | ICOM_METHOD2(HRESULT,GetConeAngles, LPDWORD,lpdwInsideConeAngle, LPDWORD,lpdwOutsideConeAngle) \ |
| 530 | ICOM_METHOD1(HRESULT,GetConeOrientation, LPD3DVECTOR,lpvOrientation) \ |
| 531 | ICOM_METHOD1(HRESULT,GetConeOutsideVolume, LPLONG,lplConeOutsideVolume) \ |
| 532 | ICOM_METHOD1(HRESULT,GetMaxDistance, LPD3DVALUE,lpflMaxDistance) \ |
| 533 | ICOM_METHOD1(HRESULT,GetMinDistance, LPD3DVALUE,lpflMinDistance) \ |
| 534 | ICOM_METHOD1(HRESULT,GetMode, LPDWORD,lpwdMode) \ |
| 535 | ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \ |
| 536 | ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \ |
| 537 | ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DBUFFER,lpcDs3dBuffer, DWORD,dwApply) \ |
| 538 | ICOM_METHOD3(HRESULT,SetConeAngles, DWORD,dwInsideConeAngle, DWORD,dwOutsideConeAngle, DWORD,dwApply) \ |
| 539 | ICOM_METHOD4(HRESULT,SetConeOrientation, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ |
| 540 | ICOM_METHOD2(HRESULT,SetConeOutsideVolume, LONG,lConeOutsideVolume, DWORD,dwApply) \ |
| 541 | ICOM_METHOD2(HRESULT,SetMaxDistance, D3DVALUE,flMaxDistance, DWORD,dwApply) \ |
| 542 | ICOM_METHOD2(HRESULT,SetMinDistance, D3DVALUE,flMinDistance, DWORD,dwApply) \ |
| 543 | ICOM_METHOD2(HRESULT,SetMode, DWORD,dwMode, DWORD,dwApply) \ |
| 544 | ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \ |
| 545 | ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) |
| 546 | #define IDirectSound3DBuffer_IMETHODS \ |
| 547 | IUnknown_IMETHODS \ |
| 548 | IDirectSound3DBuffer_METHODS |
| 549 | ICOM_DEFINE(IDirectSound3DBuffer,IUnknown) |
| 550 | #undef ICOM_INTERFACE |
Robert Riggs | 88bd980 | 1998-11-22 15:09:33 +0000 | [diff] [blame] | 551 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 552 | /*** IUnknown methods ***/ |
| 553 | #define IDirectSound3DBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 554 | #define IDirectSound3DBuffer_AddRef(p) ICOM_CALL (AddRef,p) |
| 555 | #define IDirectSound3DBuffer_Release(p) ICOM_CALL (Release,p) |
| 556 | /*** IDirectSound3DBuffer methods ***/ |
| 557 | #define IDirectSound3DBuffer_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a) |
| 558 | #define IDirectSound3DBuffer_GetConeAngles(p,a,b) ICOM_CALL2(GetConeAngles,p,a,b) |
| 559 | #define IDirectSound3DBuffer_GetConeOrientation(p,a) ICOM_CALL1(GetConeOrientation,p,a) |
| 560 | #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) ICOM_CALL1(GetConeOutsideVolume,p,a) |
| 561 | #define IDirectSound3DBuffer_GetMaxDistance(p,a) ICOM_CALL1(GetMaxDistance,p,a) |
| 562 | #define IDirectSound3DBuffer_GetMinDistance(p,a) ICOM_CALL1(GetMinDistance,p,a) |
| 563 | #define IDirectSound3DBuffer_GetMode(p,a) ICOM_CALL1(GetMode,p,a) |
| 564 | #define IDirectSound3DBuffer_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a) |
| 565 | #define IDirectSound3DBuffer_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a) |
| 566 | #define IDirectSound3DBuffer_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b) |
| 567 | #define IDirectSound3DBuffer_SetConeAngles(p,a,b) ICOM_CALL3(SetConeAngles,p,a,b) |
| 568 | #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) ICOM_CALL4(SetConeOrientation,p,a,b,c,d) |
| 569 | #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) ICOM_CALL2(SetConeOutsideVolume,p,a,b) |
| 570 | #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) ICOM_CALL2(SetMaxDistance,p,a,b) |
| 571 | #define IDirectSound3DBuffer_SetMinDistance(p,a,b) ICOM_CALL2(SetMinDistance,p,a,b) |
| 572 | #define IDirectSound3DBuffer_SetMode(p,a,b) ICOM_CALL2(SetMode,p,a,b) |
| 573 | #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d) |
| 574 | #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 575 | |
Alexandre Julliard | 140e722 | 2002-05-05 19:40:57 +0000 | [diff] [blame] | 576 | /***************************************************************************** |
| 577 | * IKsPropertySet interface |
| 578 | */ |
| 579 | #define KSPROPERTY_SUPPORT_GET 1 |
| 580 | #define KSPROPERTY_SUPPORT_SET 2 |
| 581 | |
| 582 | #define ICOM_INTERFACE IKsPropertySet |
| 583 | #define IKsPropertySet_METHODS \ |
| 584 | ICOM_METHOD7(HRESULT,Get,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3,ULONG*,px4);\ |
| 585 | ICOM_METHOD6(HRESULT,Set,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3);\ |
| 586 | ICOM_METHOD3(HRESULT,QuerySupport,REFGUID,rgid,ULONG,x1,ULONG*,px2); |
| 587 | #define IKsPropertySet_IMETHODS \ |
| 588 | IUnknown_IMETHODS \ |
| 589 | IKsPropertySet_METHODS |
| 590 | ICOM_DEFINE(IKsPropertySet,IUnknown) |
| 591 | #undef ICOM_INTERFACE |
| 592 | |
| 593 | #define IKsPropertySet_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) |
| 594 | #define IKsPropertySet_AddRef(p) ICOM_CALL (AddRef,p) |
| 595 | #define IKsPropertySet_Release(p) ICOM_CALL (Release,p) |
| 596 | #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) ICOM_CALL7(Get,p,a,b,c,d,e,f,g) |
| 597 | #define IKsPropertySet_Set(p,a,b,c,d,e,f) ICOM_CALL6(Set,p,a,b,c,d,e,f) |
| 598 | #define IKsPropertySet_QuerySupport(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c) |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 599 | |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 600 | |
Patrik Stridvall | 14da7b1 | 1999-06-12 10:53:06 +0000 | [diff] [blame] | 601 | #ifdef __cplusplus |
| 602 | } /* extern "C" */ |
| 603 | #endif /* defined(__cplusplus) */ |
Francois Gouget | bed8c26 | 1999-04-11 11:51:48 +0000 | [diff] [blame] | 604 | |
| 605 | #endif /* __WINE_DSOUND_H */ |