1 /* DirectSound driver */
2 /* (DirectX 5 version) */
4 #ifndef __WINE_DSDRIVER_H
5 #define __WINE_DSDRIVER_H
11 /*****************************************************************************
12 * Predeclare the interfaces
14 DEFINE_GUID(IID_IDsDriver
, 0x8C4233C0l
, 0xB4CC, 0x11CE, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
15 typedef struct IDsDriver IDsDriver
,*PIDSDRIVER
;
17 DEFINE_GUID(IID_IDsDriverBuffer
, 0x8C4233C1l
, 0xB4CC, 0x11CE, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
18 typedef struct IDsDriverBuffer IDsDriverBuffer
,*PIDSDRIVERBUFFER
;
20 DEFINE_GUID(IID_IDsDriverPropertySet
, 0x0F6F2E8E0, 0xD842, 0x11D0, 0x8F, 0x75, 0x00, 0xC0, 0x4F, 0xC2, 0x8A, 0xCA);
21 typedef struct IDsDriverPropertySet IDsDriverPropertySet
,*PIDSDRIVERPROPERTYSET
;
23 #define DSDDESC_DOMMSYSTEMOPEN 0x00000001
24 #define DSDDESC_DOMMSYSTEMSETFORMAT 0x00000002
25 #define DSDDESC_USESYSTEMMEMORY 0x00000004
26 #define DSDDESC_DONTNEEDPRIMARYLOCK 0x00000008
27 #define DSDDESC_DONTNEEDSECONDARYLOCK 0x00000010
29 #define DSDHEAP_NOHEAP 0
30 #define DSDHEAP_CREATEHEAP 1
31 #define DSDHEAP_USEDIRECTDRAWHEAP 2
32 #define DSDHEAP_PRIVATEHEAP 3
34 typedef struct _DSDRIVERDESC
44 LPVOID pvDirectDrawHeap
;
45 DWORD dwMemStartAddress
;
46 DWORD dwMemEndAddress
;
47 DWORD dwMemAllocExtra
;
50 } DSDRIVERDESC
,*PDSDRIVERDESC
;
52 typedef struct _DSDRIVERCAPS
55 DWORD dwMinSecondarySampleRate
;
56 DWORD dwMaxSecondarySampleRate
;
57 DWORD dwPrimaryBuffers
;
58 DWORD dwMaxHwMixingAllBuffers
;
59 DWORD dwMaxHwMixingStaticBuffers
;
60 DWORD dwMaxHwMixingStreamingBuffers
;
61 DWORD dwFreeHwMixingAllBuffers
;
62 DWORD dwFreeHwMixingStaticBuffers
;
63 DWORD dwFreeHwMixingStreamingBuffers
;
64 DWORD dwMaxHw3DAllBuffers
;
65 DWORD dwMaxHw3DStaticBuffers
;
66 DWORD dwMaxHw3DStreamingBuffers
;
67 DWORD dwFreeHw3DAllBuffers
;
68 DWORD dwFreeHw3DStaticBuffers
;
69 DWORD dwFreeHw3DStreamingBuffers
;
70 DWORD dwTotalHwMemBytes
;
71 DWORD dwFreeHwMemBytes
;
72 DWORD dwMaxContigFreeHwMemBytes
;
73 } DSDRIVERCAPS
,*PDSDRIVERCAPS
;
75 typedef struct _DSVOLUMEPAN
77 DWORD dwTotalLeftAmpFactor
;
78 DWORD dwTotalRightAmpFactor
;
82 DWORD dwPanLeftAmpFactor
;
83 DWORD dwPanRightAmpFactor
;
84 } DSVOLUMEPAN
,*PDSVOLUMEPAN
;
86 typedef union _DSPROPERTY
95 } DSPROPERTY
,*PDSPROPERTY
;
97 /*****************************************************************************
100 #define ICOM_INTERFACE IDsDriver
101 #define IDsDriver_METHODS \
102 ICOM_METHOD1(HRESULT,GetDriverDesc, PDSDRIVERDESC,pDsDriverDesc) \
103 ICOM_METHOD (HRESULT,Open) \
104 ICOM_METHOD (HRESULT,Close) \
105 ICOM_METHOD1(HRESULT,GetCaps, PDSDRIVERCAPS,pDsDrvCaps) \
106 ICOM_METHOD6(HRESULT,CreateSoundBuffer, LPWAVEFORMATEX,pwfx,DWORD,dwFlags,DWORD,dwCardAddress,LPDWORD,pdwcbBufferSize,LPBYTE*,ppbBuffer,LPVOID*,ppvObj) \
107 ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, PIDSDRIVERBUFFER,pIDsDriverBuffer,LPVOID*,ppvObj)
108 #define IDsDriver_IMETHODS \
111 ICOM_DEFINE(IDsDriver
,IUnknown
)
112 #undef ICOM_INTERFACE
114 /*** IUnknown methods ***/
115 #define IDsDriver_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
116 #define IDsDriver_AddRef(p) ICOM_CALL (AddRef,p)
117 #define IDsDriver_Release(p) ICOM_CALL (Release,p)
118 /*** IDsDriver methods ***/
119 #define IDsDriver_GetDriverDesc(p,a) ICOM_CALL1(GetDriverDesc,p,a)
120 #define IDsDriver_Open(p) ICOM_CALL (Open,p)
121 #define IDsDriver_Close(p) ICOM_CALL (Close,p)
122 #define IDsDriver_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
123 #define IDsDriver_CreateSoundBuffer(p,a,b,c,d,e,f) ICOM_CALL6(CreateSoundBuffer,p,a,b,c,d,e,f)
124 #define IDsDriver_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b)
126 /*****************************************************************************
127 * IDsDriverBuffer interface
129 #define ICOM_INTERFACE IDsDriverBuffer
130 #define IDsDriverBuffer_METHODS \
131 ICOM_METHOD7(HRESULT,Lock, LPVOID*,ppvAudio1,LPDWORD,pdwLen1,LPVOID*,pdwAudio2,LPDWORD,pdwLen2,DWORD,dwWritePosition,DWORD,dwWriteLen,DWORD,dwFlags) \
132 ICOM_METHOD4(HRESULT,Unlock, LPVOID,pvAudio1,DWORD,dwLen1,LPVOID,pvAudio2,DWORD,dwLen2) \
133 ICOM_METHOD1(HRESULT,SetFormat, LPWAVEFORMATEX,pwfxToSet) \
134 ICOM_METHOD1(HRESULT,SetFrequency, DWORD,dwFrequency) \
135 ICOM_METHOD1(HRESULT,SetVolumePan, PDSVOLUMEPAN,pDsVolumePan) \
136 ICOM_METHOD1(HRESULT,SetPosition, DWORD,dwNewPosition) \
137 ICOM_METHOD2(HRESULT,GetPosition, LPDWORD,lpdwCurrentPlayCursor,LPDWORD,lpdwCurrentWriteCursor) \
138 ICOM_METHOD3(HRESULT,Play, DWORD,dwReserved1,DWORD,dwReserved2,DWORD,dwFlags) \
139 ICOM_METHOD (HRESULT,Stop)
140 #define IDsDriverBuffer_IMETHODS \
142 IDsDriverBuffer_METHODS
143 ICOM_DEFINE(IDsDriverBuffer
,IUnknown
)
144 #undef ICOM_INTERFACE
146 /*** IUnknown methods ***/
147 #define IDsDriverBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
148 #define IDsDriverBuffer_AddRef(p) ICOM_CALL (AddRef,p)
149 #define IDsDriverBuffer_Release(p) ICOM_CALL (Release,p)
150 /*** IDsDriverBuffer methods ***/
151 #define IDsDriverBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
152 #define IDsDriverBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
153 #define IDsDriverBuffer_SetFormat(p,a) ICOM_CALL1(SetFormat,p,a)
154 #define IDsDriverBuffer_SetFrequency(p,a) ICOM_CALL1(SetFrequency,p,a)
155 #define IDsDriverBuffer_SetVolumePan(p,a) ICOM_CALL1(SetVolumePan,p,a)
156 #define IDsDriverBuffer_SetPosition(p,a) ICOM_CALL1(SetPosition,p,a)
157 #define IDsDriverBuffer_GetPosition(p,a,b) ICOM_CALL2(GetPosition,p,a,b)
158 #define IDsDriverBuffer_Play(p,a,b,c) ICOM_CALL3(Play,p,a,b,c)
159 #define IDsDriverBuffer_Stop(p) ICOM_CALL (Stop,p)
161 /*****************************************************************************
162 * IDsDriverPropertySet interface
164 #define ICOM_INTERFACE IDsDriverPropertySet
165 #define IDsDriverPropertySet_METHODS \
166 ICOM_METHOD6(HRESULT,Get, PDSPROPERTY,pDsProperty,LPVOID,pPropertyParams,ULONG,cbPropertyParams,LPVOID,pPropertyData,ULONG,cbPropertyData,PULONG,pcbReturnedData) \
167 ICOM_METHOD5(HRESULT,Set, PDSPROPERTY,pDsProperty,LPVOID,pPropertyParams,ULONG,cbPropertyParams,LPVOID,pPropertyData,ULONG,cbPropertyData) \
168 ICOM_METHOD3(HRESULT,QuerySupport, REFGUID,PropertySetId,ULONG,PropertyId,PULONG,pSupport)
169 #define IDsDriverPropertySet_IMETHODS \
171 IDsDriverPropertySet_METHODS
172 ICOM_DEFINE(IDsDriverPropertySet
,IUnknown
)
173 #undef ICOM_INTERFACE
175 /*** IUnknown methods ***/
176 #define IDsDriverPropertySet_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
177 #define IDsDriverPropertySet_AddRef(p) ICOM_CALL (AddRef,p)
178 #define IDsDriverPropertySet_Release(p) ICOM_CALL (Release,p)
179 /*** IDsDriverPropertySet methods ***/
180 #define IDsDriverPropertySet_Get(p,a,b,c,d,e,f) ICOM_CALL6(Get,p,a,b,c,d,e,f)
181 #define IDsDriverPropertySet_Set(p,a,b,c,d,e) ICOM_CALL5(Set,p,a,b,c,d,e)
182 #define IDsDriverPropertySet_QuerySupport(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c)
184 /* Defined property sets */
185 DEFINE_GUID(DSPROPSETID_DirectSound3DListener
, 0x6D047B40, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
188 DSPROPERTY_DIRECTSOUND3DLISTENER_ALL
,
189 DSPROPERTY_DIRECTSOUND3DLISTENER_POSITION
,
190 DSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY
,
191 DSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION
,
192 DSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR
,
193 DSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR
,
194 DSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR
,
195 DSPROPERTY_DIRECTSOUND3DLISTENER_BATCH
,
196 DSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION
197 } DSPROPERTY_DIRECTSOUND3DLISTENER
;
199 DEFINE_GUID(DSPROPSETID_DirectSound3DBuffer
, 0x6D047B41, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
202 DSPROPERTY_DIRECTSOUND3DBUFFER_ALL
,
203 DSPROPERTY_DIRECTSOUND3DBUFFER_POSITION
,
204 DSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY
,
205 DSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES
,
206 DSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION
,
207 DSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME
,
208 DSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE
,
209 DSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE
,
210 DSPROPERTY_DIRECTSOUND3DBUFFER_MODE
211 } DSPROPERTY_DIRECTSOUND3DBUFFER
;
213 DEFINE_GUID(DSPROPSETID_DirectSoundSpeakerConfig
, 0x6D047B42, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
216 DSPROPERTY_DIRECTSOUNDSPEAKERCONFIG_SPEAKERCONFIG
217 } DSPROPERTY_DIRECTSOUNDSPEAKERCONFIG
;
223 #endif /* __WINE_DSDRIVER_H */