~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/mmdevapi/mmdevapi.h

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Copyright 2009 Maarten Lankhorst
  3  *
  4  * This library is free software; you can redistribute it and/or
  5  * modify it under the terms of the GNU Lesser General Public
  6  * License as published by the Free Software Foundation; either
  7  * version 2.1 of the License, or (at your option) any later version.
  8  *
  9  * This library is distributed in the hope that it will be useful,
 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 12  * Lesser General Public License for more details.
 13  *
 14  * You should have received a copy of the GNU Lesser General Public
 15  * License along with this library; if not, write to the Free Software
 16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 17  */
 18 
 19 #ifndef __WINE_CONFIG_H
 20 # error You must include config.h to use this header
 21 #endif
 22 
 23 extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv);
 24 extern void MMDevEnum_Free(void);
 25 
 26 extern HRESULT MMDevice_GetPropValue(const GUID *devguid, DWORD flow, REFPROPERTYKEY key, PROPVARIANT *pv);
 27 extern HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERTYKEY key, REFPROPVARIANT pv);
 28 
 29 typedef struct MMDevice {
 30     const IMMDeviceVtbl *lpVtbl;
 31     const IMMEndpointVtbl *lpEndpointVtbl;
 32     LONG ref;
 33 
 34     CRITICAL_SECTION crst;
 35 
 36     EDataFlow flow;
 37     DWORD state;
 38     GUID devguid;
 39     WCHAR *alname;
 40     void *device, *ctx;
 41 } MMDevice;
 42 
 43 extern HRESULT AudioClient_Create(MMDevice *parent, IAudioClient **ppv);
 44 extern HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv);
 45 
 46 #ifdef HAVE_OPENAL
 47 
 48 #include "alext.h"
 49 
 50 /* All openal functions */
 51 extern int openal_loaded;
 52 #ifdef SONAME_LIBOPENAL
 53 extern LPALCCREATECONTEXT palcCreateContext;
 54 extern LPALCMAKECONTEXTCURRENT palcMakeContextCurrent;
 55 extern LPALCPROCESSCONTEXT palcProcessContext;
 56 extern LPALCSUSPENDCONTEXT palcSuspendContext;
 57 extern LPALCDESTROYCONTEXT palcDestroyContext;
 58 extern LPALCGETCURRENTCONTEXT palcGetCurrentContext;
 59 extern LPALCGETCONTEXTSDEVICE palcGetContextsDevice;
 60 extern LPALCOPENDEVICE palcOpenDevice;
 61 extern LPALCCLOSEDEVICE palcCloseDevice;
 62 extern LPALCGETERROR palcGetError;
 63 extern LPALCISEXTENSIONPRESENT palcIsExtensionPresent;
 64 extern LPALCGETPROCADDRESS palcGetProcAddress;
 65 extern LPALCGETENUMVALUE palcGetEnumValue;
 66 extern LPALCGETSTRING palcGetString;
 67 extern LPALCGETINTEGERV palcGetIntegerv;
 68 extern LPALCCAPTUREOPENDEVICE palcCaptureOpenDevice;
 69 extern LPALCCAPTURECLOSEDEVICE palcCaptureCloseDevice;
 70 extern LPALCCAPTURESTART palcCaptureStart;
 71 extern LPALCCAPTURESTOP palcCaptureStop;
 72 extern LPALCCAPTURESAMPLES palcCaptureSamples;
 73 extern LPALENABLE palEnable;
 74 extern LPALDISABLE palDisable;
 75 extern LPALISENABLED palIsEnabled;
 76 extern LPALGETSTRING palGetString;
 77 extern LPALGETBOOLEANV palGetBooleanv;
 78 extern LPALGETINTEGERV palGetIntegerv;
 79 extern LPALGETFLOATV palGetFloatv;
 80 extern LPALGETDOUBLEV palGetDoublev;
 81 extern LPALGETBOOLEAN palGetBoolean;
 82 extern LPALGETINTEGER palGetInteger;
 83 extern LPALGETFLOAT palGetFloat;
 84 extern LPALGETDOUBLE palGetDouble;
 85 extern LPALGETERROR palGetError;
 86 extern LPALISEXTENSIONPRESENT palIsExtensionPresent;
 87 extern LPALGETPROCADDRESS palGetProcAddress;
 88 extern LPALGETENUMVALUE palGetEnumValue;
 89 extern LPALLISTENERF palListenerf;
 90 extern LPALLISTENER3F palListener3f;
 91 extern LPALLISTENERFV palListenerfv;
 92 extern LPALLISTENERI palListeneri;
 93 extern LPALLISTENER3I palListener3i;
 94 extern LPALLISTENERIV palListeneriv;
 95 extern LPALGETLISTENERF palGetListenerf;
 96 extern LPALGETLISTENER3F palGetListener3f;
 97 extern LPALGETLISTENERFV palGetListenerfv;
 98 extern LPALGETLISTENERI palGetListeneri;
 99 extern LPALGETLISTENER3I palGetListener3i;
100 extern LPALGETLISTENERIV palGetListeneriv;
101 extern LPALGENSOURCES palGenSources;
102 extern LPALDELETESOURCES palDeleteSources;
103 extern LPALISSOURCE palIsSource;
104 extern LPALSOURCEF palSourcef;
105 extern LPALSOURCE3F palSource3f;
106 extern LPALSOURCEFV palSourcefv;
107 extern LPALSOURCEI palSourcei;
108 extern LPALSOURCE3I palSource3i;
109 extern LPALSOURCEIV palSourceiv;
110 extern LPALGETSOURCEF palGetSourcef;
111 extern LPALGETSOURCE3F palGetSource3f;
112 extern LPALGETSOURCEFV palGetSourcefv;
113 extern LPALGETSOURCEI palGetSourcei;
114 extern LPALGETSOURCE3I palGetSource3i;
115 extern LPALGETSOURCEIV palGetSourceiv;
116 extern LPALSOURCEPLAYV palSourcePlayv;
117 extern LPALSOURCESTOPV palSourceStopv;
118 extern LPALSOURCEREWINDV palSourceRewindv;
119 extern LPALSOURCEPAUSEV palSourcePausev;
120 extern LPALSOURCEPLAY palSourcePlay;
121 extern LPALSOURCESTOP palSourceStop;
122 extern LPALSOURCEREWIND palSourceRewind;
123 extern LPALSOURCEPAUSE palSourcePause;
124 extern LPALSOURCEQUEUEBUFFERS palSourceQueueBuffers;
125 extern LPALSOURCEUNQUEUEBUFFERS palSourceUnqueueBuffers;
126 extern LPALGENBUFFERS palGenBuffers;
127 extern LPALDELETEBUFFERS palDeleteBuffers;
128 extern LPALISBUFFER palIsBuffer;
129 extern LPALBUFFERF palBufferf;
130 extern LPALBUFFER3F palBuffer3f;
131 extern LPALBUFFERFV palBufferfv;
132 extern LPALBUFFERI palBufferi;
133 extern LPALBUFFER3I palBuffer3i;
134 extern LPALBUFFERIV palBufferiv;
135 extern LPALGETBUFFERF palGetBufferf;
136 extern LPALGETBUFFER3F palGetBuffer3f;
137 extern LPALGETBUFFERFV palGetBufferfv;
138 extern LPALGETBUFFERI palGetBufferi;
139 extern LPALGETBUFFER3I palGetBuffer3i;
140 extern LPALGETBUFFERIV palGetBufferiv;
141 extern LPALBUFFERDATA palBufferData;
142 extern LPALDOPPLERFACTOR palDopplerFactor;
143 extern LPALDOPPLERVELOCITY palDopplerVelocity;
144 extern LPALDISTANCEMODEL palDistanceModel;
145 extern LPALSPEEDOFSOUND palSpeedOfSound;
146 #else
147 #define palcCreateContext alcCreateContext
148 #define palcMakeContextCurrent alcMakeContextCurrent
149 #define palcProcessContext alcProcessContext
150 #define palcSuspendContext alcSuspendContext
151 #define palcDestroyContext alcDestroyContext
152 #define palcGetCurrentContext alcGetCurrentContext
153 #define palcGetContextsDevice alcGetContextsDevice
154 #define palcOpenDevice alcOpenDevice
155 #define palcCloseDevice alcCloseDevice
156 #define palcGetError alcGetError
157 #define palcIsExtensionPresent alcIsExtensionPresent
158 #define palcGetProcAddress alcGetProcAddress
159 #define palcGetEnumValue alcGetEnumValue
160 #define palcGetString alcGetString
161 #define palcGetIntegerv alcGetIntegerv
162 #define palcCaptureOpenDevice alcCaptureOpenDevice
163 #define palcCaptureCloseDevice alcCaptureCloseDevice
164 #define palcCaptureStart alcCaptureStart
165 #define palcCaptureStop alcCaptureStop
166 #define palcCaptureSamples alcCaptureSamples
167 #define palEnable alEnable
168 #define palDisable alDisable
169 #define palIsEnabled alIsEnabled
170 #define palGetString alGetString
171 #define palGetBooleanv alGetBooleanv
172 #define palGetIntegerv alGetIntegerv
173 #define palGetFloatv alGetFloatv
174 #define palGetDoublev alGetDoublev
175 #define palGetBoolean alGetBoolean
176 #define palGetInteger alGetInteger
177 #define palGetFloat alGetFloat
178 #define palGetDouble alGetDouble
179 #define palGetError alGetError
180 #define palIsExtensionPresent alIsExtensionPresent
181 #define palGetProcAddress alGetProcAddress
182 #define palGetEnumValue alGetEnumValue
183 #define palListenerf alListenerf
184 #define palListener3f alListener3f
185 #define palListenerfv alListenerfv
186 #define palListeneri alListeneri
187 #define palListener3i alListener3i
188 #define palListeneriv alListeneriv
189 #define palGetListenerf alGetListenerf
190 #define palGetListener3f alGetListener3f
191 #define palGetListenerfv alGetListenerfv
192 #define palGetListeneri alGetListeneri
193 #define palGetListener3i alGetListener3i
194 #define palGetListeneriv alGetListeneriv
195 #define palGenSources alGenSources
196 #define palDeleteSources alDeleteSources
197 #define palIsSource alIsSource
198 #define palSourcef alSourcef
199 #define palSource3f alSource3f
200 #define palSourcefv alSourcefv
201 #define palSourcei alSourcei
202 #define palSource3i alSource3i
203 #define palSourceiv alSourceiv
204 #define palGetSourcef alGetSourcef
205 #define palGetSource3f alGetSource3f
206 #define palGetSourcefv alGetSourcefv
207 #define palGetSourcei alGetSourcei
208 #define palGetSource3i alGetSource3i
209 #define palGetSourceiv alGetSourceiv
210 #define palSourcePlayv alSourcePlayv
211 #define palSourceStopv alSourceStopv
212 #define palSourceRewindv alSourceRewindv
213 #define palSourcePausev alSourcePausev
214 #define palSourcePlay alSourcePlay
215 #define palSourceStop alSourceStop
216 #define palSourceRewind alSourceRewind
217 #define palSourcePause alSourcePause
218 #define palSourceQueueBuffers alSourceQueueBuffers
219 #define palSourceUnqueueBuffers alSourceUnqueueBuffers
220 #define palGenBuffers alGenBuffers
221 #define palDeleteBuffers alDeleteBuffers
222 #define palIsBuffer alIsBuffer
223 #define palBufferf alBufferf
224 #define palBuffer3f alBuffer3f
225 #define palBufferfv alBufferfv
226 #define palBufferi alBufferi
227 #define palBuffer3i alBuffer3i
228 #define palBufferiv alBufferiv
229 #define palGetBufferf alGetBufferf
230 #define palGetBuffer3f alGetBuffer3f
231 #define palGetBufferfv alGetBufferfv
232 #define palGetBufferi alGetBufferi
233 #define palGetBuffer3i alGetBuffer3i
234 #define palGetBufferiv alGetBufferiv
235 #define palBufferData alBufferData
236 #define palDopplerFactor alDopplerFactor
237 #define palDopplerVelocity alDopplerVelocity
238 #define palDistanceModel alDistanceModel
239 #define palSpeedOfSound alSpeedOfSound
240 #endif
241 
242 /* OpenAL only allows for 1 single access to the device at the same time */
243 extern CRITICAL_SECTION openal_crst;
244 extern int local_contexts;
245 extern typeof(alcGetCurrentContext) *get_context;
246 extern typeof(alcMakeContextCurrent) *set_context;
247 
248 #define getALError() \
249 do { \
250     ALenum err = palGetError(); \
251     if(err != AL_NO_ERROR) \
252     { \
253         ERR(">>>>>>>>>>>> Received AL error %#x on context %p, %s:%u\n", err, get_context(), __FUNCTION__, __LINE__); \
254     } \
255 } while (0)
256 
257 #define getALCError(dev) \
258 do { \
259     ALenum err = palcGetError(dev); \
260     if(err != ALC_NO_ERROR) \
261     { \
262         ERR(">>>>>>>>>>>> Received ALC error %#x on device %p, %s:%u\n", err, dev, __FUNCTION__, __LINE__); \
263     } \
264 } while(0)
265 
266 #define setALContext(actx) \
267     do { \
268         ALCcontext *__old_ctx, *cur_ctx = actx ; \
269         if (!local_contexts) EnterCriticalSection(&openal_crst); \
270         __old_ctx = get_context(); \
271         if (__old_ctx != cur_ctx && set_context(cur_ctx) == ALC_FALSE) {\
272             ERR("Couldn't set current context!!\n"); \
273             getALCError(palcGetContextsDevice(cur_ctx)); \
274         }
275 
276 /* Only restore a NULL context if using global contexts, for TLS contexts always restore */
277 #define popALContext() \
278         if (__old_ctx != cur_ctx \
279             && (local_contexts || __old_ctx) \
280             && set_context(__old_ctx) == ALC_FALSE) { \
281             ERR("Couldn't restore old context!!\n"); \
282             getALCError(palcGetContextsDevice(__old_ctx)); \
283         } \
284         if (!local_contexts) LeaveCriticalSection(&openal_crst); \
285     } while (0)
286 
287 #endif
288 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.