blob: 0923561ceec39f334395ad50247d1f3a9452330b [file] [log] [blame]
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00001/*
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
Jonathan Ernst360a3f92006-05-18 14:49:52 +020016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Alexandre Julliard0799c1a2002-03-09 23:29:33 +000017 */
18
Alexandre Julliard02e90081998-01-04 17:49:09 +000019#ifndef __WINE_DSOUND_H
20#define __WINE_DSOUND_H
21
Ove Kaaven935e3df2002-06-13 19:15:06 +000022#ifndef DIRECTSOUND_VERSION
Robert Reif7dd63742004-01-09 22:06:54 +000023#define DIRECTSOUND_VERSION 0x0900
Ove Kaaven935e3df2002-06-13 19:15:06 +000024#endif
25
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000026#define COM_NO_WINDOWS_H
27#include <objbase.h>
28#include <float.h>
Alexandre Julliard02e90081998-01-04 17:49:09 +000029
Patrik Stridvall14da7b11999-06-12 10:53:06 +000030#ifdef __cplusplus
31extern "C" {
32#endif /* defined(__cplusplus) */
33
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000034#ifndef DX_SHARED_DEFINES
35
36typedef float D3DVALUE, *LPD3DVALUE;
37
38#ifndef D3DCOLOR_DEFINED
39typedef DWORD D3DCOLOR, *LPD3DCOLOR;
40#define D3DCOLOR_DEFINED
41#endif
42
43#ifndef D3DVECTOR_DEFINED
44typedef struct _D3DVECTOR {
45 float x;
46 float y;
47 float z;
Robert Reife577a2a2005-10-03 11:04:06 +000048} D3DVECTOR;
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000049#define D3DVECTOR_DEFINED
50#endif
51
Robert Reife577a2a2005-10-03 11:04:06 +000052#ifndef LPD3DVECTOR_DEFINED
53typedef D3DVECTOR *LPD3DVECTOR;
54#define LPD3DVECTOR_DEFINED
55#endif
56
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000057#define DX_SHARED_DEFINES
58#endif /* DX_SHARED_DEFINES */
59
Francois Gougetbed8c261999-04-11 11:51:48 +000060/*****************************************************************************
61 * Predeclare the interfaces
62 */
Ove Kaaven935e3df2002-06-13 19:15:06 +000063DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
64DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
65DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
66DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
67DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
Alexandre Julliard02e90081998-01-04 17:49:09 +000068
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000069DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000070typedef struct IDirectSound *LPDIRECTSOUND,**LPLPDIRECTSOUND;
Francois Gougetbed8c261999-04-11 11:51:48 +000071
Ove Kaaven935e3df2002-06-13 19:15:06 +000072DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000073typedef struct IDirectSound8 *LPDIRECTSOUND8,**LPLPDIRECTSOUND8;
Ove Kaaven935e3df2002-06-13 19:15:06 +000074
Vincent Béron9a624912002-05-31 23:06:46 +000075DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000076typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
Francois Gougetbed8c261999-04-11 11:51:48 +000077
Ove Kaaven935e3df2002-06-13 19:15:06 +000078DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000079typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8,**LPLPDIRECTSOUNDBUFFER8;
Ove Kaaven935e3df2002-06-13 19:15:06 +000080
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000081DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000082typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY,**LPLPDIRECTSOUNDNOTIFY;
Robert Reifacd4bc02003-04-03 18:02:39 +000083#define IID_IDirectSoundNotify8 IID_IDirectSoundNotify
Francois Gougetbed8c261999-04-11 11:51:48 +000084
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000085DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000086typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER,**LPLPDIRECTSOUND3DLISTENER;
Francois Gougetbed8c261999-04-11 11:51:48 +000087
Vincent Béron9a624912002-05-31 23:06:46 +000088DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000089typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER,**LPLPDIRECTSOUND3DBUFFER;
Francois Gougetbed8c261999-04-11 11:51:48 +000090
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000091DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000092typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE,**LPLPDIRECTSOUNDCAPTURE;
Robert Reifacd4bc02003-04-03 18:02:39 +000093#define IID_IDirectSoundCapture8 IID_IDirectSoundCapture
Robert Reiff0006c82004-07-06 19:41:57 +000094typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8,**LPLPDIRECTSOUNDCAPTURE8;
Francois Gougetbed8c261999-04-11 11:51:48 +000095
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000096DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
Alexandre Julliardb8d30752005-07-26 18:32:53 +000097typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER,**LPLPDIRECTSOUNDCAPTUREBUFFER;
Vincent Béron9a624912002-05-31 23:06:46 +000098
Robert Reifbc362fd2003-02-24 20:37:50 +000099DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
Alexandre Julliardb8d30752005-07-26 18:32:53 +0000100typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8;
Robert Reifbc362fd2003-02-24 20:37:50 +0000101
102DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
Alexandre Julliardb8d30752005-07-26 18:32:53 +0000103typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX,**LPLPDIRECTSOUNDFULLDUPLEX;
Robert Reifacd4bc02003-04-03 18:02:39 +0000104#define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000105
Ove Kaaven935e3df2002-06-13 19:15:06 +0000106DEFINE_GUID(DSDEVID_DefaultPlayback, 0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
107DEFINE_GUID(DSDEVID_DefaultCapture, 0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
108DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
109DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
110
Robert Reifbc362fd2003-02-24 20:37:50 +0000111DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
Alexandre Julliard140e7222002-05-05 19:40:57 +0000112
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000113#define _FACDS 0x878
114#define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
115
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000116#define DS_OK 0
Robert Reif7dd63742004-01-09 22:06:54 +0000117#define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10)
Robert Reife7310f42004-02-27 21:29:10 +0000118#define DS_INCOMPLETE MAKE_HRESULT(0, _FACDS, 20)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000119#define DSERR_ALLOCATED MAKE_DSHRESULT(10)
120#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
121#define DSERR_INVALIDPARAM E_INVALIDARG
122#define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
123#define DSERR_GENERIC E_FAIL
124#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
125#define DSERR_OUTOFMEMORY E_OUTOFMEMORY
126#define DSERR_BADFORMAT MAKE_DSHRESULT(100)
127#define DSERR_UNSUPPORTED E_NOTIMPL
128#define DSERR_NODRIVER MAKE_DSHRESULT(120)
129#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
130#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
131#define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
132#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
133#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
Robert Reif7dd63742004-01-09 22:06:54 +0000134#define DSERR_NOINTERFACE E_NOINTERFACE
135#define DSERR_ACCESSDENIED E_ACCESSDENIED
136#define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180)
137#define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190)
138#define DSERR_SENDLOOP MAKE_DSHRESULT(200)
139#define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210)
140#define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220)
141#define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000142
Alexandre Julliard02e90081998-01-04 17:49:09 +0000143#define DSCAPS_PRIMARYMONO 0x00000001
144#define DSCAPS_PRIMARYSTEREO 0x00000002
145#define DSCAPS_PRIMARY8BIT 0x00000004
146#define DSCAPS_PRIMARY16BIT 0x00000008
147#define DSCAPS_CONTINUOUSRATE 0x00000010
148#define DSCAPS_EMULDRIVER 0x00000020
149#define DSCAPS_CERTIFIED 0x00000040
150#define DSCAPS_SECONDARYMONO 0x00000100
151#define DSCAPS_SECONDARYSTEREO 0x00000200
152#define DSCAPS_SECONDARY8BIT 0x00000400
153#define DSCAPS_SECONDARY16BIT 0x00000800
154
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000155#define DSSCL_NORMAL 1
156#define DSSCL_PRIORITY 2
157#define DSSCL_EXCLUSIVE 3
158#define DSSCL_WRITEPRIMARY 4
159
Alexandre Julliard02e90081998-01-04 17:49:09 +0000160typedef struct _DSCAPS
161{
162 DWORD dwSize;
163 DWORD dwFlags;
164 DWORD dwMinSecondarySampleRate;
165 DWORD dwMaxSecondarySampleRate;
166 DWORD dwPrimaryBuffers;
167 DWORD dwMaxHwMixingAllBuffers;
168 DWORD dwMaxHwMixingStaticBuffers;
169 DWORD dwMaxHwMixingStreamingBuffers;
170 DWORD dwFreeHwMixingAllBuffers;
171 DWORD dwFreeHwMixingStaticBuffers;
172 DWORD dwFreeHwMixingStreamingBuffers;
173 DWORD dwMaxHw3DAllBuffers;
174 DWORD dwMaxHw3DStaticBuffers;
175 DWORD dwMaxHw3DStreamingBuffers;
176 DWORD dwFreeHw3DAllBuffers;
177 DWORD dwFreeHw3DStaticBuffers;
178 DWORD dwFreeHw3DStreamingBuffers;
179 DWORD dwTotalHwMemBytes;
180 DWORD dwFreeHwMemBytes;
181 DWORD dwMaxContigFreeHwMemBytes;
182 DWORD dwUnlockTransferRateHwBuffers;
183 DWORD dwPlayCpuOverheadSwBuffers;
184 DWORD dwReserved1;
185 DWORD dwReserved2;
186} DSCAPS,*LPDSCAPS;
Robert Reif7dd63742004-01-09 22:06:54 +0000187typedef const DSCAPS *LPCDSCAPS;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000188
Robert Reif7dd63742004-01-09 22:06:54 +0000189#define DSBPLAY_LOOPING 0x00000001
190#define DSBPLAY_LOCHARDWARE 0x00000002
191#define DSBPLAY_LOCSOFTWARE 0x00000004
192#define DSBPLAY_TERMINATEBY_TIME 0x00000008
193#define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010
194#define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020
Alexandre Julliard02e90081998-01-04 17:49:09 +0000195
196#define DSBSTATUS_PLAYING 0x00000001
197#define DSBSTATUS_BUFFERLOST 0x00000002
198#define DSBSTATUS_LOOPING 0x00000004
Robert Reif7dd63742004-01-09 22:06:54 +0000199#define DSBSTATUS_LOCHARDWARE 0x00000008
200#define DSBSTATUS_LOCSOFTWARE 0x00000010
201#define DSBSTATUS_TERMINATED 0x00000020
Alexandre Julliard02e90081998-01-04 17:49:09 +0000202
Robert Riggs88bd9801998-11-22 15:09:33 +0000203#define DSBLOCK_FROMWRITECURSOR 0x00000001
204#define DSBLOCK_ENTIREBUFFER 0x00000002
Alexandre Julliard02e90081998-01-04 17:49:09 +0000205
206#define DSBCAPS_PRIMARYBUFFER 0x00000001
207#define DSBCAPS_STATIC 0x00000002
208#define DSBCAPS_LOCHARDWARE 0x00000004
209#define DSBCAPS_LOCSOFTWARE 0x00000008
Robert Riggs88bd9801998-11-22 15:09:33 +0000210#define DSBCAPS_CTRL3D 0x00000010
Alexandre Julliard02e90081998-01-04 17:49:09 +0000211#define DSBCAPS_CTRLFREQUENCY 0x00000020
212#define DSBCAPS_CTRLPAN 0x00000040
213#define DSBCAPS_CTRLVOLUME 0x00000080
Robert Reif7dd63742004-01-09 22:06:54 +0000214#define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */
Robert Riggs88bd9801998-11-22 15:09:33 +0000215#define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
Raphael Junqueira493660a2003-10-27 22:08:37 +0000216#define DSBCAPS_CTRLFX 0x00000200
Robert Riggs88bd9801998-11-22 15:09:33 +0000217#define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */
Alexandre Julliard02e90081998-01-04 17:49:09 +0000218#define DSBCAPS_STICKYFOCUS 0x00004000
Robert Riggs88bd9801998-11-22 15:09:33 +0000219#define DSBCAPS_GLOBALFOCUS 0x00008000
Alexandre Julliard02e90081998-01-04 17:49:09 +0000220#define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/
Robert Riggs88bd9801998-11-22 15:09:33 +0000221#define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
Robert Reif7dd63742004-01-09 22:06:54 +0000222#define DSBCAPS_LOCDEFER 0x00040000
Robert Riggs88bd9801998-11-22 15:09:33 +0000223
Ove Kaavenfdebace2001-09-10 23:08:11 +0000224#define DSBSIZE_MIN 4
225#define DSBSIZE_MAX 0xFFFFFFF
Robert Riggs88bd9801998-11-22 15:09:33 +0000226#define DSBPAN_LEFT -10000
Robert Reif7dd63742004-01-09 22:06:54 +0000227#define DSBPAN_CENTER 0
Robert Riggs88bd9801998-11-22 15:09:33 +0000228#define DSBPAN_RIGHT 10000
229#define DSBVOLUME_MAX 0
230#define DSBVOLUME_MIN -10000
231#define DSBFREQUENCY_MIN 100
Robert Reif7dd63742004-01-09 22:06:54 +0000232#define DSBFREQUENCY_MAX 200000
Robert Riggs88bd9801998-11-22 15:09:33 +0000233#define DSBFREQUENCY_ORIGINAL 0
Alexandre Julliard02e90081998-01-04 17:49:09 +0000234
235typedef struct _DSBCAPS
236{
237 DWORD dwSize;
238 DWORD dwFlags;
239 DWORD dwBufferBytes;
240 DWORD dwUnlockTransferRate;
241 DWORD dwPlayCpuOverhead;
242} DSBCAPS,*LPDSBCAPS;
Robert Reif7dd63742004-01-09 22:06:54 +0000243typedef const DSBCAPS *LPCDSBCAPS;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000244
245#define DSSCL_NORMAL 1
246#define DSSCL_PRIORITY 2
247#define DSSCL_EXCLUSIVE 3
248#define DSSCL_WRITEPRIMARY 4
249
Ove Kaaven935e3df2002-06-13 19:15:06 +0000250typedef struct _DSEFFECTDESC
251{
252 DWORD dwSize;
253 DWORD dwFlags;
254 GUID guidDSFXClass;
255 DWORD_PTR dwReserved1;
256 DWORD_PTR dwReserved2;
257} DSEFFECTDESC,*LPDSEFFECTDESC;
258typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
259
260#define DSFX_LOCHARDWARE 0x00000001
261#define DSFX_LOCSOFTWARE 0x00000002
262
263enum
264{
265 DSFXR_PRESENT,
266 DSFXR_LOCHARDWARE,
267 DSFXR_LOCSOFTWARE,
268 DSFXR_UNALLOCATED,
269 DSFXR_FAILED,
270 DSFXR_UNKNOWN,
271 DSFXR_SENDLOOP
272};
273
Robert Reifdbb03ec2004-04-19 02:58:45 +0000274typedef struct _DSBUFFERDESC1
275{
276 DWORD dwSize;
277 DWORD dwFlags;
278 DWORD dwBufferBytes;
279 DWORD dwReserved;
280 LPWAVEFORMATEX lpwfxFormat;
281} DSBUFFERDESC1,*LPDSBUFFERDESC1;
282typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
283
Alexandre Julliard02e90081998-01-04 17:49:09 +0000284typedef struct _DSBUFFERDESC
285{
286 DWORD dwSize;
287 DWORD dwFlags;
288 DWORD dwBufferBytes;
289 DWORD dwReserved;
290 LPWAVEFORMATEX lpwfxFormat;
Ove Kaaven935e3df2002-06-13 19:15:06 +0000291 GUID guid3DAlgorithm;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000292} DSBUFFERDESC,*LPDSBUFFERDESC;
Ove Kaaven935e3df2002-06-13 19:15:06 +0000293typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000294
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000295typedef struct _DSBPOSITIONNOTIFY
296{
Ove Kaaven935e3df2002-06-13 19:15:06 +0000297 DWORD dwOffset;
298 HANDLE hEventNotify;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000299} DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000300typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
Alexandre Julliard02e90081998-01-04 17:49:09 +0000301
302#define DSSPEAKER_HEADPHONE 1
303#define DSSPEAKER_MONO 2
304#define DSSPEAKER_QUAD 3
305#define DSSPEAKER_STEREO 4
306#define DSSPEAKER_SURROUND 5
Robert Reif7dd63742004-01-09 22:06:54 +0000307#define DSSPEAKER_5POINT1 6
308#define DSSPEAKER_7POINT1 7
Alexandre Julliard02e90081998-01-04 17:49:09 +0000309
Marcus Meissner73458b01998-12-26 12:54:29 +0000310#define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */
311#define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */
312#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
313#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
Robert Riggsb9950121998-12-01 12:57:31 +0000314
Robert Reif76a5e0a2003-08-28 19:38:29 +0000315#define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
316#define DSSPEAKER_CONFIG(a) ((BYTE)(a))
317#define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
318
Ove Kaaven935e3df2002-06-13 19:15:06 +0000319#define DS_CERTIFIED 0x00000000
320#define DS_UNCERTIFIED 0x00000001
321
Robert Reif7dd63742004-01-09 22:06:54 +0000322typedef struct _DSCEFFECTDESC
323{
324 DWORD dwSize;
325 DWORD dwFlags;
326 GUID guidDSCFXClass;
327 GUID guidDSCFXInstance;
328 DWORD dwReserved1;
329 DWORD dwReserved2;
330} DSCEFFECTDESC, *LPDSCEFFECTDESC;
331typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
Robert Reifdbb03ec2004-04-19 02:58:45 +0000332
Robert Reif7dd63742004-01-09 22:06:54 +0000333#define DSCFX_LOCHARDWARE 0x00000001
334#define DSCFX_LOCSOFTWARE 0x00000002
Robert Reifdbb03ec2004-04-19 02:58:45 +0000335
Robert Reif7dd63742004-01-09 22:06:54 +0000336#define DSCFXR_LOCHARDWARE 0x00000010
337#define DSCFXR_LOCSOFTWARE 0x00000020
Robert Reifdbb03ec2004-04-19 02:58:45 +0000338
339typedef struct _DSCBUFFERDESC1
340{
341 DWORD dwSize;
342 DWORD dwFlags;
343 DWORD dwBufferBytes;
344 DWORD dwReserved;
345 LPWAVEFORMATEX lpwfxFormat;
346} DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
347
Peter Hunnisettf5a10272000-06-01 22:47:35 +0000348typedef struct _DSCBUFFERDESC
349{
Robert Reif7dd63742004-01-09 22:06:54 +0000350 DWORD dwSize;
351 DWORD dwFlags;
352 DWORD dwBufferBytes;
353 DWORD dwReserved;
354 LPWAVEFORMATEX lpwfxFormat;
355 DWORD dwFXCount;
356 LPDSCEFFECTDESC lpDSCFXDesc;
Peter Hunnisettf5a10272000-06-01 22:47:35 +0000357} DSCBUFFERDESC, *LPDSCBUFFERDESC;
358typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
359
360typedef struct _DSCCAPS
361{
Robert Reif6041ff32003-02-14 23:57:27 +0000362 DWORD dwSize;
Peter Hunnisettf5a10272000-06-01 22:47:35 +0000363 DWORD dwFlags;
364 DWORD dwFormats;
365 DWORD dwChannels;
366} DSCCAPS, *LPDSCCAPS;
367typedef const DSCCAPS *LPCDSCCAPS;
368
369typedef struct _DSCBCAPS
370{
371 DWORD dwSize;
372 DWORD dwFlags;
373 DWORD dwBufferBytes;
374 DWORD dwReserved;
375} DSCBCAPS, *LPDSCBCAPS;
376typedef const DSCBCAPS *LPCDSCBCAPS;
377
Robert Reif6041ff32003-02-14 23:57:27 +0000378#define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER
379#define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED
Robert Reif7dd63742004-01-09 22:06:54 +0000380#define DSCCAPS_MULTIPLECAPTURE 0x00000001
Robert Reif6041ff32003-02-14 23:57:27 +0000381
382#define DSCBCAPS_WAVEMAPPED 0x80000000
383#define DSCBCAPS_CTRLFX 0x00000200
384
Robert Reif7dd63742004-01-09 22:06:54 +0000385#define DSCBLOCK_ENTIREBUFFER 0x00000001
Robert Reif6041ff32003-02-14 23:57:27 +0000386#define DSCBSTART_LOOPING 0x00000001
387#define DSCBPN_OFFSET_STOP 0xffffffff
388
389#define DSCBSTATUS_CAPTURING 0x00000001
390#define DSCBSTATUS_LOOPING 0x00000002
391
Peter Hunnisettf5a10272000-06-01 22:47:35 +0000392#ifndef __LPCGUID_DEFINED__
393#define __LPCGUID_DEFINED__
394typedef const GUID *LPCGUID;
Vincent Béron9a624912002-05-31 23:06:46 +0000395#endif
Alexandre Julliard02e90081998-01-04 17:49:09 +0000396
Ove Kaaven935e3df2002-06-13 19:15:06 +0000397typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
398typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
Dmitry Timoshkov3ead12b2008-06-24 22:09:48 +0900399DECL_WINELIB_TYPE_AW(LPDSENUMCALLBACK)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000400
Ove Kaaven935e3df2002-06-13 19:15:06 +0000401extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter);
Peter Hunnisett62f32332000-05-30 20:07:31 +0000402extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
403extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
Marcus Meissner375f8ba2008-06-06 11:54:33 +0200404#define DirectSoundEnumerate WINELIB_NAME_AW(DirectSoundEnumerate)
Ove Kaaven935e3df2002-06-13 19:15:06 +0000405extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
Peter Hunnisett62f32332000-05-30 20:07:31 +0000406extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
407extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
Marcus Meissner375f8ba2008-06-06 11:54:33 +0200408#define DirectSoundCaptureEnumerate WINELIB_NAME_AW(DirectSoundCaptureEnumerate)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000409
Ove Kaaven935e3df2002-06-13 19:15:06 +0000410extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter);
Robert Reif5c8fb162005-06-04 09:38:14 +0000411extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
Robert Reifdbb03ec2004-04-19 02:58:45 +0000412extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
413 LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel,
414 LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
Robert Reif998f56e2003-03-06 22:44:38 +0000415#define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
Ove Kaaven935e3df2002-06-13 19:15:06 +0000416extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest);
417
Alexandre Julliard02e90081998-01-04 17:49:09 +0000418
Francois Gougetbed8c261999-04-11 11:51:48 +0000419/*****************************************************************************
420 * IDirectSound interface
421 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000422#define INTERFACE IDirectSound
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000423DECLARE_INTERFACE_(IDirectSound,IUnknown)
424{
425 /*** IUnknown methods ***/
426 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
427 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
428 STDMETHOD_(ULONG,Release)(THIS) PURE;
429 /*** IDirectSound methods ***/
430 STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
431 STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
432 STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
433 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
434 STDMETHOD(Compact)(THIS) PURE;
435 STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
436 STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000437 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000438};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000439#undef INTERFACE
Francois Gougetbed8c261999-04-11 11:51:48 +0000440
Francois Gouget179dc252004-10-04 19:39:32 +0000441#if !defined(__cplusplus) || defined(CINTERFACE)
442/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000443#define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
444#define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
445#define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000446/*** IDirectSound methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000447#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
448#define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
449#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
450#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
451#define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
452#define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
453#define IDirectSound_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
454#define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
Francois Gouget179dc252004-10-04 19:39:32 +0000455#else
456/*** IUnknown methods ***/
457#define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
458#define IDirectSound_AddRef(p) (p)->AddRef()
459#define IDirectSound_Release(p) (p)->Release()
460/*** IDirectSound methods ***/
461#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
462#define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
463#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
464#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
465#define IDirectSound_Compact(p) (p)->Compact()
466#define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
467#define IDirectSound_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
468#define IDirectSound_Initialize(p,a) (p)->Initialize(a)
Alexandre Julliard55379112003-04-10 21:13:58 +0000469#endif
Alexandre Julliard02e90081998-01-04 17:49:09 +0000470
Alexandre Julliard02e90081998-01-04 17:49:09 +0000471
Francois Gougetbed8c261999-04-11 11:51:48 +0000472/*****************************************************************************
Ove Kaaven935e3df2002-06-13 19:15:06 +0000473 * IDirectSound8 interface
474 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000475#define INTERFACE IDirectSound8
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000476DECLARE_INTERFACE_(IDirectSound8,IUnknown)
477{
478 /*** IUnknown methods ***/
479 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
480 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
481 STDMETHOD_(ULONG,Release)(THIS) PURE;
482 /*** IDirectSound8 methods ***/
483 STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
484 STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
485 STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
486 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
487 STDMETHOD(Compact)(THIS) PURE;
488 STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
489 STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
490 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000491 STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000492};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000493#undef INTERFACE
Ove Kaaven935e3df2002-06-13 19:15:06 +0000494
Francois Gouget179dc252004-10-04 19:39:32 +0000495#if !defined(__cplusplus) || defined(CINTERFACE)
496/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000497#define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
498#define IDirectSound8_AddRef(p) (p)->lpVtbl->AddRef(p)
499#define IDirectSound8_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000500/*** IDirectSound methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000501#define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
502#define IDirectSound8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
503#define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
504#define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
505#define IDirectSound8_Compact(p) (p)->lpVtbl->Compact(p)
506#define IDirectSound8_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
507#define IDirectSound8_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
508#define IDirectSound8_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
Francois Gouget179dc252004-10-04 19:39:32 +0000509/*** IDirectSound8 methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000510#define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a)
Francois Gouget179dc252004-10-04 19:39:32 +0000511#else
512/*** IUnknown methods ***/
513#define IDirectSound8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
514#define IDirectSound8_AddRef(p) (p)->AddRef()
515#define IDirectSound8_Release(p) (p)->Release()
516/*** IDirectSound methods ***/
517#define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
518#define IDirectSound8_GetCaps(p,a) (p)->GetCaps(a)
519#define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
520#define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
521#define IDirectSound8_Compact(p) (p)->Compact()
522#define IDirectSound8_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
523#define IDirectSound8_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
524#define IDirectSound8_Initialize(p,a) (p)->Initialize(a)
525/*** IDirectSound8 methods ***/
526#define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a)
Alexandre Julliard55379112003-04-10 21:13:58 +0000527#endif
Ove Kaaven935e3df2002-06-13 19:15:06 +0000528
529
530/*****************************************************************************
Francois Gougetbed8c261999-04-11 11:51:48 +0000531 * IDirectSoundBuffer interface
532 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000533#define INTERFACE IDirectSoundBuffer
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000534DECLARE_INTERFACE_(IDirectSoundBuffer,IUnknown)
535{
536 /*** IUnknown methods ***/
537 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
538 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
539 STDMETHOD_(ULONG,Release)(THIS) PURE;
540 /*** IDirectSoundBuffer methods ***/
541 STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
542 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
543 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
544 STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
545 STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
546 STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
547 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
548 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
Tomas Carnecky9b4f9972007-03-08 14:48:45 +0100549 STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000550 STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
551 STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
552 STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
553 STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
554 STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
555 STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
556 STDMETHOD(Stop)(THIS) PURE;
Tomas Carnecky9b4f9972007-03-08 14:48:45 +0100557 STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000558 STDMETHOD(Restore)(THIS) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000559};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000560#undef INTERFACE
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000561
Francois Gouget179dc252004-10-04 19:39:32 +0000562#if !defined(__cplusplus) || defined(CINTERFACE)
563/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000564#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
565#define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
566#define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000567/*** IDirectSoundBuffer methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000568#define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
569#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
570#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
571#define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
572#define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
573#define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
574#define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
575#define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
576#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
577#define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
578#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
579#define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
580#define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
581#define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
582#define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
583#define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
584#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
585#define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000586#else
587/*** IUnknown methods ***/
588#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
589#define IDirectSoundBuffer_AddRef(p) (p)->AddRef()
590#define IDirectSoundBuffer_Release(p) (p)->Release()
591/*** IDirectSoundBuffer methods ***/
592#define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
593#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
594#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
595#define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
596#define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
597#define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
598#define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
599#define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
600#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
601#define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
602#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
603#define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
604#define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
605#define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
606#define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
607#define IDirectSoundBuffer_Stop(p) (p)->Stop()
608#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
609#define IDirectSoundBuffer_Restore(p) (p)->Restore()
Alexandre Julliard55379112003-04-10 21:13:58 +0000610#endif
Alexandre Julliard02e90081998-01-04 17:49:09 +0000611
Alexandre Julliard02e90081998-01-04 17:49:09 +0000612
Francois Gougetbed8c261999-04-11 11:51:48 +0000613/*****************************************************************************
Ove Kaaven935e3df2002-06-13 19:15:06 +0000614 * IDirectSoundBuffer8 interface
615 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000616#define INTERFACE IDirectSoundBuffer8
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000617DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown)
618{
619 /*** IUnknown methods ***/
620 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
621 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
622 STDMETHOD_(ULONG,Release)(THIS) PURE;
623 /*** IDirectSoundBuffer8 methods ***/
624 STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
625 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
626 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
627 STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
628 STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
629 STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
630 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
631 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
Tomas Carnecky9b4f9972007-03-08 14:48:45 +0100632 STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000633 STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
634 STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
635 STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
636 STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
637 STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
638 STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
639 STDMETHOD(Stop)(THIS) PURE;
Tomas Carnecky9b4f9972007-03-08 14:48:45 +0100640 STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000641 STDMETHOD(Restore)(THIS) PURE;
642 STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
643 STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000644 STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000645};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000646#undef INTERFACE
Ove Kaaven935e3df2002-06-13 19:15:06 +0000647
Francois Gouget179dc252004-10-04 19:39:32 +0000648#if !defined(__cplusplus) || defined(CINTERFACE)
649/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000650#define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
651#define IDirectSoundBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
652#define IDirectSoundBuffer8_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000653/*** IDirectSoundBuffer methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000654#define IDirectSoundBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
655#define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
656#define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
657#define IDirectSoundBuffer8_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
658#define IDirectSoundBuffer8_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
659#define IDirectSoundBuffer8_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
660#define IDirectSoundBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
661#define IDirectSoundBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
662#define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
663#define IDirectSoundBuffer8_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
664#define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
665#define IDirectSoundBuffer8_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
666#define IDirectSoundBuffer8_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
667#define IDirectSoundBuffer8_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
668#define IDirectSoundBuffer8_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
669#define IDirectSoundBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
670#define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
671#define IDirectSoundBuffer8_Restore(p) (p)->lpVtbl->Restore(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000672/*** IDirectSoundBuffer8 methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000673#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c)
674#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c)
Robert Reif59cc52b2004-07-07 00:48:18 +0000675#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
Francois Gouget179dc252004-10-04 19:39:32 +0000676#else
677/*** IUnknown methods ***/
678#define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
679#define IDirectSoundBuffer8_AddRef(p) (p)->AddRef()
680#define IDirectSoundBuffer8_Release(p) (p)->Release()
681/*** IDirectSoundBuffer methods ***/
682#define IDirectSoundBuffer8_GetCaps(p,a) (p)->GetCaps(a)
683#define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
684#define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
685#define IDirectSoundBuffer8_GetVolume(p,a) (p)->GetVolume(a)
686#define IDirectSoundBuffer8_GetPan(p,a) (p)->GetPan(a)
687#define IDirectSoundBuffer8_GetFrequency(p,a) (p)->GetFrequency(a)
688#define IDirectSoundBuffer8_GetStatus(p,a) (p)->GetStatus(a)
689#define IDirectSoundBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
690#define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
691#define IDirectSoundBuffer8_Play(p,a,b,c) (p)->Play(a,b,c)
692#define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
693#define IDirectSoundBuffer8_SetFormat(p,a) (p)->SetFormat(a)
694#define IDirectSoundBuffer8_SetVolume(p,a) (p)->SetVolume(a)
695#define IDirectSoundBuffer8_SetPan(p,a) (p)->SetPan(a)
696#define IDirectSoundBuffer8_SetFrequency(p,a) (p)->SetFrequency(a)
697#define IDirectSoundBuffer8_Stop(p) (p)->Stop()
698#define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
699#define IDirectSoundBuffer8_Restore(p) (p)->Restore()
700/*** IDirectSoundBuffer8 methods ***/
701#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c)
702#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c)
703#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
Alexandre Julliard55379112003-04-10 21:13:58 +0000704#endif
Ove Kaaven935e3df2002-06-13 19:15:06 +0000705
706
707/*****************************************************************************
Francois Gougetbed8c261999-04-11 11:51:48 +0000708 * IDirectSoundCapture interface
709 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000710#define INTERFACE IDirectSoundCapture
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000711DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown)
712{
713 /*** IUnknown methods ***/
714 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
715 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
716 STDMETHOD_(ULONG,Release)(THIS) PURE;
717 /*** IDirectSoundCapture methods ***/
718 STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE;
719 STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000720 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000721};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000722#undef INTERFACE
Peter Hunnisettf5a10272000-06-01 22:47:35 +0000723
Francois Gouget179dc252004-10-04 19:39:32 +0000724#if !defined(__cplusplus) || defined(CINTERFACE)
725/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000726#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
727#define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p)
728#define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000729/*** IDirectSoundCapture methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000730#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
731#define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
732#define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
Francois Gouget179dc252004-10-04 19:39:32 +0000733#else
734/*** IUnknown methods ***/
735#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
736#define IDirectSoundCapture_AddRef(p) (p)->AddRef()
737#define IDirectSoundCapture_Release(p) (p)->Release()
738/*** IDirectSoundCapture methods ***/
739#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
740#define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
741#define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
Alexandre Julliard55379112003-04-10 21:13:58 +0000742#endif
Francois Gougetbed8c261999-04-11 11:51:48 +0000743
744/*****************************************************************************
745 * IDirectSoundCaptureBuffer interface
746 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000747#define INTERFACE IDirectSoundCaptureBuffer
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000748DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,IUnknown)
749{
750 /*** IUnknown methods ***/
751 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
752 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
753 STDMETHOD_(ULONG,Release)(THIS) PURE;
754 /*** IDirectSoundCaptureBuffer methods ***/
755 STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
756 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
757 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
758 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
759 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
760 STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
761 STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
762 STDMETHOD(Stop)(THIS) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000763 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000764};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000765#undef INTERFACE
Peter Hunnisettf5a10272000-06-01 22:47:35 +0000766
Francois Gouget179dc252004-10-04 19:39:32 +0000767#if !defined(__cplusplus) || defined(CINTERFACE)
768/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000769#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
770#define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
771#define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000772/*** IDirectSoundCaptureBuffer methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000773#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
774#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
775#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
776#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
777#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
778#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
779#define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
780#define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
781#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
Francois Gouget179dc252004-10-04 19:39:32 +0000782#else
783/*** IUnknown methods ***/
784#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
785#define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef()
786#define IDirectSoundCaptureBuffer_Release(p) (p)->Release()
787/*** IDirectSoundCaptureBuffer methods ***/
788#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
789#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
790#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
791#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
792#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
793#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
794#define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
795#define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
796#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
Alexandre Julliard55379112003-04-10 21:13:58 +0000797#endif
Francois Gougetbed8c261999-04-11 11:51:48 +0000798
799/*****************************************************************************
Ove Kaaven935e3df2002-06-13 19:15:06 +0000800 * IDirectSoundCaptureBuffer8 interface
801 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000802#define INTERFACE IDirectSoundCaptureBuffer8
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000803DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)
804{
805 /*** IUnknown methods ***/
806 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
807 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
808 STDMETHOD_(ULONG,Release)(THIS) PURE;
809 /*** IDirectSoundCaptureBuffer methods ***/
810 STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
811 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
812 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
813 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
814 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
815 STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
816 STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
817 STDMETHOD(Stop)(THIS) PURE;
818 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
819 /*** IDirectSoundCaptureBuffer8 methods ***/
820 STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000821 STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000822};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000823#undef INTERFACE
Ove Kaaven935e3df2002-06-13 19:15:06 +0000824
Francois Gouget179dc252004-10-04 19:39:32 +0000825#if !defined(__cplusplus) || defined(CINTERFACE)
826/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000827#define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
828#define IDirectSoundCaptureBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
829#define IDirectSoundCaptureBuffer8_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000830/*** IDirectSoundCaptureBuffer methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000831#define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
832#define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
833#define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
834#define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
835#define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
836#define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
837#define IDirectSoundCaptureBuffer8_Start(p,a) (p)->lpVtbl->Start(p,a)
838#define IDirectSoundCaptureBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
839#define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
Francois Gouget179dc252004-10-04 19:39:32 +0000840/*** IDirectSoundCaptureBuffer8 methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000841#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
842#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b)
Francois Gouget179dc252004-10-04 19:39:32 +0000843#else
844/*** IUnknown methods ***/
845#define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
846#define IDirectSoundCaptureBuffer8_AddRef(p) (p)->AddRef()
847#define IDirectSoundCaptureBuffer8_Release(p) (p)->Release()
848/*** IDirectSoundCaptureBuffer methods ***/
849#define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->GetCaps(a)
850#define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
851#define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
852#define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->GetStatus(a)
853#define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
854#define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
855#define IDirectSoundCaptureBuffer8_Start(p,a) (p)->Start(a)
856#define IDirectSoundCaptureBuffer8_Stop(p) (p)->Stop()
857#define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
858/*** IDirectSoundCaptureBuffer8 methods ***/
859#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
860#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b)
Alexandre Julliard55379112003-04-10 21:13:58 +0000861#endif
Ove Kaaven935e3df2002-06-13 19:15:06 +0000862
863/*****************************************************************************
Francois Gougetbed8c261999-04-11 11:51:48 +0000864 * IDirectSoundNotify interface
865 */
Robert Riggs88bd9801998-11-22 15:09:33 +0000866#define WINE_NOBUFFER 0x80000000
867
Robert Riggsb9950121998-12-01 12:57:31 +0000868#define DSBPN_OFFSETSTOP -1
869
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000870#define INTERFACE IDirectSoundNotify
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000871DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)
872{
873 /*** IUnknown methods ***/
874 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
875 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
876 STDMETHOD_(ULONG,Release)(THIS) PURE;
877 /*** IDirectSoundNotify methods ***/
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000878 STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000879};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000880#undef INTERFACE
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000881
Francois Gouget179dc252004-10-04 19:39:32 +0000882#if !defined(__cplusplus) || defined(CINTERFACE)
Francois Gougetbed8c261999-04-11 11:51:48 +0000883/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000884#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
885#define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
886#define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p)
Francois Gougetbed8c261999-04-11 11:51:48 +0000887/*** IDirectSoundNotify methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000888#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
Francois Gouget179dc252004-10-04 19:39:32 +0000889#else
890/*** IUnknown methods ***/
891#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
892#define IDirectSoundNotify_AddRef(p) (p)->AddRef()
893#define IDirectSoundNotify_Release(p) (p)->Release()
894/*** IDirectSoundNotify methods ***/
895#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
Alexandre Julliard55379112003-04-10 21:13:58 +0000896#endif
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000897
Robert Riggs88bd9801998-11-22 15:09:33 +0000898
Francois Gougetbed8c261999-04-11 11:51:48 +0000899/*****************************************************************************
900 * IDirectSound3DListener interface
901 */
Robert Riggs88bd9801998-11-22 15:09:33 +0000902#define DS3DMODE_NORMAL 0x00000000
903#define DS3DMODE_HEADRELATIVE 0x00000001
904#define DS3DMODE_DISABLE 0x00000002
905
906#define DS3D_IMMEDIATE 0x00000000
907#define DS3D_DEFERRED 0x00000001
908
Robert Reif7dd63742004-01-09 22:06:54 +0000909#define DS3D_MINDISTANCEFACTOR FLT_MIN
910#define DS3D_MAXDISTANCEFACTOR FLT_MAX
Robert Riggs88bd9801998-11-22 15:09:33 +0000911#define DS3D_DEFAULTDISTANCEFACTOR 1.0f
912
913#define DS3D_MINROLLOFFFACTOR 0.0f
914#define DS3D_MAXROLLOFFFACTOR 10.0f
915#define DS3D_DEFAULTROLLOFFFACTOR 1.0f
916
917#define DS3D_MINDOPPLERFACTOR 0.0f
918#define DS3D_MAXDOPPLERFACTOR 10.0f
919#define DS3D_DEFAULTDOPPLERFACTOR 1.0f
920
921#define DS3D_DEFAULTMINDISTANCE 1.0f
922#define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
923
924#define DS3D_MINCONEANGLE 0
925#define DS3D_MAXCONEANGLE 360
926#define DS3D_DEFAULTCONEANGLE 360
927
Robert Reif7dd63742004-01-09 22:06:54 +0000928#define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
Robert Riggs88bd9801998-11-22 15:09:33 +0000929
930typedef struct _DS3DLISTENER {
931 DWORD dwSize;
932 D3DVECTOR vPosition;
933 D3DVECTOR vVelocity;
934 D3DVECTOR vOrientFront;
935 D3DVECTOR vOrientTop;
936 D3DVALUE flDistanceFactor;
937 D3DVALUE flRolloffFactor;
938 D3DVALUE flDopplerFactor;
939} DS3DLISTENER, *LPDS3DLISTENER;
940
941typedef const DS3DLISTENER *LPCDS3DLISTENER;
Vincent Béron9a624912002-05-31 23:06:46 +0000942
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000943#define INTERFACE IDirectSound3DListener
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000944DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)
945{
946 /*** IUnknown methods ***/
947 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
948 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
949 STDMETHOD_(ULONG,Release)(THIS) PURE;
950 /*** IDirectSound3DListener methods ***/
951 STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE;
952 STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE;
953 STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE;
954 STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE;
955 STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
956 STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE;
957 STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
958 STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE;
959 STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
960 STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
961 STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
962 STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
963 STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
964 STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000965 STDMETHOD(CommitDeferredSettings)(THIS) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000966};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +0000967#undef INTERFACE
Robert Riggs88bd9801998-11-22 15:09:33 +0000968
Francois Gouget179dc252004-10-04 19:39:32 +0000969#if !defined(__cplusplus) || defined(CINTERFACE)
Francois Gougetbed8c261999-04-11 11:51:48 +0000970/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000971#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
972#define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p)
973#define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p)
Francois Gougetbed8c261999-04-11 11:51:48 +0000974/*** IDirectSound3DListener methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +0000975#define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
976#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
977#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
978#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
979#define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
980#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
981#define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
982#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
983#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
984#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
985#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
986#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
987#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
988#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
989#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
Francois Gouget179dc252004-10-04 19:39:32 +0000990#else
991/*** IUnknown methods ***/
992#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
993#define IDirectSound3DListener_AddRef(p) (p)->AddRef()
994#define IDirectSound3DListener_Release(p) (p)->Release()
995/*** IDirectSound3DListener methods ***/
996#define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
997#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
998#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
999#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
1000#define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
1001#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
1002#define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
1003#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
1004#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
1005#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
1006#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
1007#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
1008#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
1009#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
1010#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
Alexandre Julliard55379112003-04-10 21:13:58 +00001011#endif
Robert Riggs88bd9801998-11-22 15:09:33 +00001012
Robert Riggs88bd9801998-11-22 15:09:33 +00001013
Francois Gougetbed8c261999-04-11 11:51:48 +00001014/*****************************************************************************
1015 * IDirectSound3DBuffer interface
1016 */
Robert Riggs88bd9801998-11-22 15:09:33 +00001017typedef struct _DS3DBUFFER {
1018 DWORD dwSize;
1019 D3DVECTOR vPosition;
1020 D3DVECTOR vVelocity;
1021 DWORD dwInsideConeAngle;
1022 DWORD dwOutsideConeAngle;
1023 D3DVECTOR vConeOrientation;
1024 LONG lConeOutsideVolume;
1025 D3DVALUE flMinDistance;
1026 D3DVALUE flMaxDistance;
1027 DWORD dwMode;
1028} DS3DBUFFER, *LPDS3DBUFFER;
1029
1030typedef const DS3DBUFFER *LPCDS3DBUFFER;
1031
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001032#define INTERFACE IDirectSound3DBuffer
Alexandre Julliard5d0160e2004-10-05 04:38:15 +00001033DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown)
1034{
1035 /*** IUnknown methods ***/
1036 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1037 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1038 STDMETHOD_(ULONG,Release)(THIS) PURE;
1039 /*** IDirectSound3DBuffer methods ***/
1040 STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE;
1041 STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE;
1042 STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE;
1043 STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE;
1044 STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE;
1045 STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE;
1046 STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE;
1047 STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
1048 STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
1049 STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE;
1050 STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
1051 STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1052 STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
1053 STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
1054 STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
1055 STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE;
1056 STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001057 STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +00001058};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001059#undef INTERFACE
Robert Riggs88bd9801998-11-22 15:09:33 +00001060
Francois Gouget179dc252004-10-04 19:39:32 +00001061#if !defined(__cplusplus) || defined(CINTERFACE)
Francois Gougetbed8c261999-04-11 11:51:48 +00001062/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +00001063#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1064#define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
1065#define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p)
Francois Gougetbed8c261999-04-11 11:51:48 +00001066/*** IDirectSound3DBuffer methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +00001067#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1068#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
1069#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
1070#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
1071#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
1072#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
1073#define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
1074#define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
1075#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
1076#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
Maarten Lankhorstcd143fb2009-11-19 13:06:08 +01001077#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c)
Alexandre Julliard55379112003-04-10 21:13:58 +00001078#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
1079#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
1080#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
1081#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
1082#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
1083#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
1084#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
Francois Gouget179dc252004-10-04 19:39:32 +00001085#else
1086/*** IUnknown methods ***/
1087#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1088#define IDirectSound3DBuffer_AddRef(p) (p)->AddRef()
1089#define IDirectSound3DBuffer_Release(p) (p)->Release()
1090/*** IDirectSound3DBuffer methods ***/
1091#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
1092#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
1093#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
1094#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
1095#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
1096#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
1097#define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
1098#define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
1099#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
1100#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
1101#define IDirectSound3DBuffer_SetConeAngles(p,a,b) (p)->SetConeAngles(a,b)
1102#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
1103#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b)
1104#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
1105#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
1106#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
1107#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
1108#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
Alexandre Julliard55379112003-04-10 21:13:58 +00001109#endif
Francois Gougetbed8c261999-04-11 11:51:48 +00001110
Alexandre Julliard140e7222002-05-05 19:40:57 +00001111/*****************************************************************************
1112 * IKsPropertySet interface
1113 */
Alexandre Julliard4433f152003-07-01 04:33:35 +00001114#ifndef _IKsPropertySet_
1115#define _IKsPropertySet_
1116
Alexandre Julliardb8d30752005-07-26 18:32:53 +00001117typedef struct IKsPropertySet *LPKSPROPERTYSET;
Alexandre Julliard4433f152003-07-01 04:33:35 +00001118
1119DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
1120
Alexandre Julliard140e7222002-05-05 19:40:57 +00001121#define KSPROPERTY_SUPPORT_GET 1
1122#define KSPROPERTY_SUPPORT_SET 2
1123
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001124#define INTERFACE IKsPropertySet
Alexandre Julliard5d0160e2004-10-05 04:38:15 +00001125DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
1126{
1127 /*** IUnknown methods ***/
1128 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1129 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1130 STDMETHOD_(ULONG,Release)(THIS) PURE;
1131 /*** IKsPropertySet methods ***/
1132 STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE;
1133 STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE;
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001134 STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +00001135};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001136#undef INTERFACE
Alexandre Julliard140e7222002-05-05 19:40:57 +00001137
Francois Gouget179dc252004-10-04 19:39:32 +00001138#if !defined(__cplusplus) || defined(CINTERFACE)
1139/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +00001140#define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1141#define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p)
1142#define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +00001143/*** IKsPropertySet methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +00001144#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
1145#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
1146#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
Francois Gouget179dc252004-10-04 19:39:32 +00001147#else
1148/*** IUnknown methods ***/
1149#define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1150#define IKsPropertySet_AddRef(p) (p)->AddRef()
1151#define IKsPropertySet_Release(p) (p)->Release()
1152/*** IKsPropertySet methods ***/
1153#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
1154#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
1155#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
Alexandre Julliard55379112003-04-10 21:13:58 +00001156#endif
Francois Gougetbed8c261999-04-11 11:51:48 +00001157
Alexandre Julliard4433f152003-07-01 04:33:35 +00001158#endif /* _IKsPropertySet_ */
Francois Gougetbed8c261999-04-11 11:51:48 +00001159
Robert Reifbc362fd2003-02-24 20:37:50 +00001160/*****************************************************************************
1161 * IDirectSoundFullDuplex interface
1162 */
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001163#define INTERFACE IDirectSoundFullDuplex
Alexandre Julliard5d0160e2004-10-05 04:38:15 +00001164DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown)
1165{
1166 /*** IUnknown methods ***/
1167 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1168 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1169 STDMETHOD_(ULONG,Release)(THIS) PURE;
1170 /*** IDirectSoundFullDuplex methods ***/
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001171 STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
Alexandre Julliard5d0160e2004-10-05 04:38:15 +00001172};
Alexandre Julliardf00c46f2003-04-10 00:19:24 +00001173#undef INTERFACE
Robert Reifbc362fd2003-02-24 20:37:50 +00001174
Francois Gouget179dc252004-10-04 19:39:32 +00001175#if !defined(__cplusplus) || defined(CINTERFACE)
1176/*** IUnknown methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +00001177#define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1178#define IDirectSoundFullDuplex_AddRef(p) (p)->lpVtbl->AddRef(p)
1179#define IDirectSoundFullDuplex_Release(p) (p)->lpVtbl->Release(p)
Francois Gouget179dc252004-10-04 19:39:32 +00001180/*** IDirectSoundFullDuplex methods ***/
Alexandre Julliard55379112003-04-10 21:13:58 +00001181#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
Francois Gouget179dc252004-10-04 19:39:32 +00001182#else
1183/*** IUnknown methods ***/
1184#define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1185#define IDirectSoundFullDuplex_AddRef(p) (p)->AddRef()
1186#define IDirectSoundFullDuplex_Release(p) (p)->Release()
1187/*** IDirectSoundFullDuplex methods ***/
1188#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h)
Alexandre Julliard55379112003-04-10 21:13:58 +00001189#endif
Robert Reifbc362fd2003-02-24 20:37:50 +00001190
Patrik Stridvall14da7b11999-06-12 10:53:06 +00001191#ifdef __cplusplus
1192} /* extern "C" */
1193#endif /* defined(__cplusplus) */
Francois Gougetbed8c261999-04-11 11:51:48 +00001194
1195#endif /* __WINE_DSOUND_H */