Make sure edit and listbox controls are of same ASCII/Unicode style as
[wine.git] / include / dsdriver.h
blobbee365f18607979ca893b103daa37b10b5b4bc04
1 /*
2 * DirectSound driver
3 * (DirectX 5 version)
5 * Copyright (C) 2000 Ove Kaaven
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef __WINE_DSDRIVER_H
23 #define __WINE_DSDRIVER_H
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
29 /*****************************************************************************
30 * Predeclare the interfaces
32 DEFINE_GUID(IID_IDsDriver, 0x8C4233C0l, 0xB4CC, 0x11CE, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
33 typedef struct IDsDriver IDsDriver,*PIDSDRIVER;
35 DEFINE_GUID(IID_IDsDriverBuffer, 0x8C4233C1l, 0xB4CC, 0x11CE, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
36 typedef struct IDsDriverBuffer IDsDriverBuffer,*PIDSDRIVERBUFFER;
38 DEFINE_GUID(IID_IDsDriverPropertySet, 0x0F6F2E8E0, 0xD842, 0x11D0, 0x8F, 0x75, 0x00, 0xC0, 0x4F, 0xC2, 0x8A, 0xCA);
39 typedef struct IDsDriverPropertySet IDsDriverPropertySet,*PIDSDRIVERPROPERTYSET;
41 #define DSDDESC_DOMMSYSTEMOPEN 0x00000001
42 #define DSDDESC_DOMMSYSTEMSETFORMAT 0x00000002
43 #define DSDDESC_USESYSTEMMEMORY 0x00000004
44 #define DSDDESC_DONTNEEDPRIMARYLOCK 0x00000008
45 #define DSDDESC_DONTNEEDSECONDARYLOCK 0x00000010
47 #define DSDHEAP_NOHEAP 0
48 #define DSDHEAP_CREATEHEAP 1
49 #define DSDHEAP_USEDIRECTDRAWHEAP 2
50 #define DSDHEAP_PRIVATEHEAP 3
52 typedef struct _DSDRIVERDESC
54 DWORD dwFlags;
55 CHAR szDesc[256];
56 CHAR szDrvName[256];
57 DWORD dnDevNode;
58 WORD wVxdId;
59 WORD wReserved;
60 ULONG ulDeviceNum;
61 DWORD dwHeapType;
62 LPVOID pvDirectDrawHeap;
63 DWORD dwMemStartAddress;
64 DWORD dwMemEndAddress;
65 DWORD dwMemAllocExtra;
66 LPVOID pvReserved1;
67 LPVOID pvReserved2;
68 } DSDRIVERDESC,*PDSDRIVERDESC;
70 typedef struct _DSDRIVERCAPS
72 DWORD dwFlags;
73 DWORD dwMinSecondarySampleRate;
74 DWORD dwMaxSecondarySampleRate;
75 DWORD dwPrimaryBuffers;
76 DWORD dwMaxHwMixingAllBuffers;
77 DWORD dwMaxHwMixingStaticBuffers;
78 DWORD dwMaxHwMixingStreamingBuffers;
79 DWORD dwFreeHwMixingAllBuffers;
80 DWORD dwFreeHwMixingStaticBuffers;
81 DWORD dwFreeHwMixingStreamingBuffers;
82 DWORD dwMaxHw3DAllBuffers;
83 DWORD dwMaxHw3DStaticBuffers;
84 DWORD dwMaxHw3DStreamingBuffers;
85 DWORD dwFreeHw3DAllBuffers;
86 DWORD dwFreeHw3DStaticBuffers;
87 DWORD dwFreeHw3DStreamingBuffers;
88 DWORD dwTotalHwMemBytes;
89 DWORD dwFreeHwMemBytes;
90 DWORD dwMaxContigFreeHwMemBytes;
91 } DSDRIVERCAPS,*PDSDRIVERCAPS;
93 typedef struct _DSVOLUMEPAN
95 DWORD dwTotalLeftAmpFactor;
96 DWORD dwTotalRightAmpFactor;
97 LONG lVolume;
98 DWORD dwVolAmpFactor;
99 LONG lPan;
100 DWORD dwPanLeftAmpFactor;
101 DWORD dwPanRightAmpFactor;
102 } DSVOLUMEPAN,*PDSVOLUMEPAN;
104 typedef union _DSPROPERTY
106 struct {
107 GUID Set;
108 ULONG Id;
109 ULONG Flags;
110 ULONG InstanceId;
111 } DUMMYSTRUCTNAME;
112 ULONGLONG Alignment;
113 } DSPROPERTY,*PDSPROPERTY;
115 /*****************************************************************************
116 * IDsDriver interface
118 #define ICOM_INTERFACE IDsDriver
119 #define IDsDriver_METHODS \
120 ICOM_METHOD1(HRESULT,GetDriverDesc, PDSDRIVERDESC,pDsDriverDesc) \
121 ICOM_METHOD (HRESULT,Open) \
122 ICOM_METHOD (HRESULT,Close) \
123 ICOM_METHOD1(HRESULT,GetCaps, PDSDRIVERCAPS,pDsDrvCaps) \
124 ICOM_METHOD6(HRESULT,CreateSoundBuffer, LPWAVEFORMATEX,pwfx,DWORD,dwFlags,DWORD,dwCardAddress,LPDWORD,pdwcbBufferSize,LPBYTE*,ppbBuffer,LPVOID*,ppvObj) \
125 ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, PIDSDRIVERBUFFER,pIDsDriverBuffer,LPVOID*,ppvObj)
126 #define IDsDriver_IMETHODS \
127 IUnknown_METHODS \
128 IDsDriver_METHODS
129 ICOM_DEFINE(IDsDriver,IUnknown)
130 #undef ICOM_INTERFACE
132 /*** IUnknown methods ***/
133 #define IDsDriver_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
134 #define IDsDriver_AddRef(p) ICOM_CALL (AddRef,p)
135 #define IDsDriver_Release(p) ICOM_CALL (Release,p)
136 /*** IDsDriver methods ***/
137 #define IDsDriver_GetDriverDesc(p,a) ICOM_CALL1(GetDriverDesc,p,a)
138 #define IDsDriver_Open(p) ICOM_CALL (Open,p)
139 #define IDsDriver_Close(p) ICOM_CALL (Close,p)
140 #define IDsDriver_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
141 #define IDsDriver_CreateSoundBuffer(p,a,b,c,d,e,f) ICOM_CALL6(CreateSoundBuffer,p,a,b,c,d,e,f)
142 #define IDsDriver_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b)
144 /*****************************************************************************
145 * IDsDriverBuffer interface
147 #define ICOM_INTERFACE IDsDriverBuffer
148 #define IDsDriverBuffer_METHODS \
149 ICOM_METHOD7(HRESULT,Lock, LPVOID*,ppvAudio1,LPDWORD,pdwLen1,LPVOID*,pdwAudio2,LPDWORD,pdwLen2,DWORD,dwWritePosition,DWORD,dwWriteLen,DWORD,dwFlags) \
150 ICOM_METHOD4(HRESULT,Unlock, LPVOID,pvAudio1,DWORD,dwLen1,LPVOID,pvAudio2,DWORD,dwLen2) \
151 ICOM_METHOD1(HRESULT,SetFormat, LPWAVEFORMATEX,pwfxToSet) \
152 ICOM_METHOD1(HRESULT,SetFrequency, DWORD,dwFrequency) \
153 ICOM_METHOD1(HRESULT,SetVolumePan, PDSVOLUMEPAN,pDsVolumePan) \
154 ICOM_METHOD1(HRESULT,SetPosition, DWORD,dwNewPosition) \
155 ICOM_METHOD2(HRESULT,GetPosition, LPDWORD,lpdwCurrentPlayCursor,LPDWORD,lpdwCurrentWriteCursor) \
156 ICOM_METHOD3(HRESULT,Play, DWORD,dwReserved1,DWORD,dwReserved2,DWORD,dwFlags) \
157 ICOM_METHOD (HRESULT,Stop)
158 #define IDsDriverBuffer_IMETHODS \
159 IUnknown_METHODS \
160 IDsDriverBuffer_METHODS
161 ICOM_DEFINE(IDsDriverBuffer,IUnknown)
162 #undef ICOM_INTERFACE
164 /*** IUnknown methods ***/
165 #define IDsDriverBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
166 #define IDsDriverBuffer_AddRef(p) ICOM_CALL (AddRef,p)
167 #define IDsDriverBuffer_Release(p) ICOM_CALL (Release,p)
168 /*** IDsDriverBuffer methods ***/
169 #define IDsDriverBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
170 #define IDsDriverBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
171 #define IDsDriverBuffer_SetFormat(p,a) ICOM_CALL1(SetFormat,p,a)
172 #define IDsDriverBuffer_SetFrequency(p,a) ICOM_CALL1(SetFrequency,p,a)
173 #define IDsDriverBuffer_SetVolumePan(p,a) ICOM_CALL1(SetVolumePan,p,a)
174 #define IDsDriverBuffer_SetPosition(p,a) ICOM_CALL1(SetPosition,p,a)
175 #define IDsDriverBuffer_GetPosition(p,a,b) ICOM_CALL2(GetPosition,p,a,b)
176 #define IDsDriverBuffer_Play(p,a,b,c) ICOM_CALL3(Play,p,a,b,c)
177 #define IDsDriverBuffer_Stop(p) ICOM_CALL (Stop,p)
179 /*****************************************************************************
180 * IDsDriverPropertySet interface
182 #define ICOM_INTERFACE IDsDriverPropertySet
183 #define IDsDriverPropertySet_METHODS \
184 ICOM_METHOD6(HRESULT,Get, PDSPROPERTY,pDsProperty,LPVOID,pPropertyParams,ULONG,cbPropertyParams,LPVOID,pPropertyData,ULONG,cbPropertyData,PULONG,pcbReturnedData) \
185 ICOM_METHOD5(HRESULT,Set, PDSPROPERTY,pDsProperty,LPVOID,pPropertyParams,ULONG,cbPropertyParams,LPVOID,pPropertyData,ULONG,cbPropertyData) \
186 ICOM_METHOD3(HRESULT,QuerySupport, REFGUID,PropertySetId,ULONG,PropertyId,PULONG,pSupport)
187 #define IDsDriverPropertySet_IMETHODS \
188 IUnknown_METHODS \
189 IDsDriverPropertySet_METHODS
190 ICOM_DEFINE(IDsDriverPropertySet,IUnknown)
191 #undef ICOM_INTERFACE
193 /*** IUnknown methods ***/
194 #define IDsDriverPropertySet_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
195 #define IDsDriverPropertySet_AddRef(p) ICOM_CALL (AddRef,p)
196 #define IDsDriverPropertySet_Release(p) ICOM_CALL (Release,p)
197 /*** IDsDriverPropertySet methods ***/
198 #define IDsDriverPropertySet_Get(p,a,b,c,d,e,f) ICOM_CALL6(Get,p,a,b,c,d,e,f)
199 #define IDsDriverPropertySet_Set(p,a,b,c,d,e) ICOM_CALL5(Set,p,a,b,c,d,e)
200 #define IDsDriverPropertySet_QuerySupport(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c)
202 /* Defined property sets */
203 DEFINE_GUID(DSPROPSETID_DirectSound3DListener, 0x6D047B40, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
204 typedef enum
206 DSPROPERTY_DIRECTSOUND3DLISTENER_ALL,
207 DSPROPERTY_DIRECTSOUND3DLISTENER_POSITION,
208 DSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY,
209 DSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION,
210 DSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR,
211 DSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR,
212 DSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR,
213 DSPROPERTY_DIRECTSOUND3DLISTENER_BATCH,
214 DSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION
215 } DSPROPERTY_DIRECTSOUND3DLISTENER;
217 DEFINE_GUID(DSPROPSETID_DirectSound3DBuffer, 0x6D047B41, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
218 typedef enum
220 DSPROPERTY_DIRECTSOUND3DBUFFER_ALL,
221 DSPROPERTY_DIRECTSOUND3DBUFFER_POSITION,
222 DSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY,
223 DSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES,
224 DSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION,
225 DSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME,
226 DSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE,
227 DSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE,
228 DSPROPERTY_DIRECTSOUND3DBUFFER_MODE
229 } DSPROPERTY_DIRECTSOUND3DBUFFER;
231 DEFINE_GUID(DSPROPSETID_DirectSoundSpeakerConfig, 0x6D047B42, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
232 typedef enum
234 DSPROPERTY_DIRECTSOUNDSPEAKERCONFIG_SPEAKERCONFIG
235 } DSPROPERTY_DIRECTSOUNDSPEAKERCONFIG;
237 #ifdef __cplusplus
238 } /* extern "C" */
239 #endif
241 #endif /* __WINE_DSDRIVER_H */