ole32: Rename PROPSET_BLOCK_SIZE to RAW_DIRENTRY_SIZE.
[wine/testsucceed.git] / dlls / openal32 / openal.c
blob3d2bb00fd1cd1a227147f9a1a8ffdd6f5ecb9467
1 /*
2 * OpenAL32.dll thunk. Wraps Win32 OpenAL function calls around a native
3 * implementation.
5 * Copyright 2007 Nick Burns (adger44@hotmail.com)
6 * Copyright 2007,2009 Chris Robinson
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "config.h"
25 #include <stdarg.h>
26 #include <string.h>
28 #include "windef.h"
29 #include "winbase.h"
30 #include "wine/debug.h"
32 #ifdef HAVE_AL_AL_H
33 #include <AL/al.h>
34 #include <AL/alc.h>
35 #elif defined(HAVE_OPENAL_AL_H)
36 #include <OpenAL/al.h>
37 #include <OpenAL/alc.h>
38 #endif
40 WINE_DEFAULT_DEBUG_CHANNEL(openal32);
42 typedef struct wine_ALCcontext {
43 ALCcontext *ctx;
45 ALboolean been_current;
47 ALvoid (AL_APIENTRY*alGenFilters)(ALsizei n, ALuint* filters);
48 ALvoid (AL_APIENTRY*alDeleteFilters)(ALsizei n, const ALuint* filters);
49 ALboolean (AL_APIENTRY*alIsFilter)(ALuint fid);
50 ALvoid (AL_APIENTRY*alFilterf)(ALuint fid, ALenum param, ALfloat value);
51 ALvoid (AL_APIENTRY*alFilterfv)(ALuint fid, ALenum param, const ALfloat* values);
52 ALvoid (AL_APIENTRY*alFilteri)(ALuint fid, ALenum param, ALint value);
53 ALvoid (AL_APIENTRY*alFilteriv)(ALuint fid, ALenum param, const ALint* values);
54 ALvoid (AL_APIENTRY*alGetFilterf)(ALuint fid, ALenum param, ALfloat* value);
55 ALvoid (AL_APIENTRY*alGetFilterfv)(ALuint fid, ALenum param, ALfloat* values);
56 ALvoid (AL_APIENTRY*alGetFilteri)(ALuint fid, ALenum param, ALint* value);
57 ALvoid (AL_APIENTRY*alGetFilteriv)(ALuint fid, ALenum param, ALint* values);
58 ALvoid (AL_APIENTRY*alGenEffects)(ALsizei n, ALuint* effects);
59 ALvoid (AL_APIENTRY*alDeleteEffects)(ALsizei n, const ALuint* effects);
60 ALboolean (AL_APIENTRY*alIsEffect)(ALuint eid);
61 ALvoid (AL_APIENTRY*alEffectf)(ALuint eid, ALenum param, ALfloat value);
62 ALvoid (AL_APIENTRY*alEffectfv)(ALuint eid, ALenum param, const ALfloat* values);
63 ALvoid (AL_APIENTRY*alEffecti)(ALuint eid, ALenum param, ALint value);
64 ALvoid (AL_APIENTRY*alEffectiv)(ALuint eid, ALenum param, const ALint* values);
65 ALvoid (AL_APIENTRY*alGetEffectf)(ALuint eid, ALenum param, ALfloat* value);
66 ALvoid (AL_APIENTRY*alGetEffectfv)(ALuint eid, ALenum param, ALfloat* values);
67 ALvoid (AL_APIENTRY*alGetEffecti)(ALuint eid, ALenum param, ALint* value);
68 ALvoid (AL_APIENTRY*alGetEffectiv)(ALuint eid, ALenum param, ALint* values);
69 ALvoid (AL_APIENTRY*alGenAuxiliaryEffectSlots)(ALsizei n, ALuint* slots);
70 ALvoid (AL_APIENTRY*alDeleteAuxiliaryEffectSlots)(ALsizei n, const ALuint* slots);
71 ALboolean (AL_APIENTRY*alIsAuxiliaryEffectSlot)(ALuint sid);
72 ALvoid (AL_APIENTRY*alAuxiliaryEffectSlotf)(ALuint sid, ALenum param, ALfloat value);
73 ALvoid (AL_APIENTRY*alAuxiliaryEffectSlotfv)(ALuint sid, ALenum param, const ALfloat* values);
74 ALvoid (AL_APIENTRY*alAuxiliaryEffectSloti)(ALuint sid, ALenum param, ALint value);
75 ALvoid (AL_APIENTRY*alAuxiliaryEffectSlotiv)(ALuint sid, ALenum param, const ALint* values);
76 ALvoid (AL_APIENTRY*alGetAuxiliaryEffectSlotf)(ALuint sid, ALenum param, ALfloat* value);
77 ALvoid (AL_APIENTRY*alGetAuxiliaryEffectSlotfv)(ALuint sid, ALenum param, ALfloat* values);
78 ALvoid (AL_APIENTRY*alGetAuxiliaryEffectSloti)(ALuint sid, ALenum param, ALint* value);
79 ALvoid (AL_APIENTRY*alGetAuxiliaryEffectSlotiv)(ALuint sid, ALenum param, ALint* values);
81 struct wine_ALCcontext *next;
82 } wine_ALCcontext;
84 struct FuncList {
85 const char *name;
86 void *proc;
89 static const struct FuncList ALCFuncs[];
90 static const struct FuncList ALFuncs[];
92 static wine_ALCcontext *CtxList;
93 static wine_ALCcontext *CurrentCtx;
95 CRITICAL_SECTION openal_cs;
96 static CRITICAL_SECTION_DEBUG openal_cs_debug =
98 0, 0, &openal_cs,
99 {&openal_cs_debug.ProcessLocksList,
100 &openal_cs_debug.ProcessLocksList},
101 0, 0, {(DWORD_PTR)(__FILE__ ": openal_cs")}
103 CRITICAL_SECTION openal_cs = {&openal_cs_debug, -1, 0, 0, 0, 0};
105 /***********************************************************************
106 * OpenAL initialisation routine
108 BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
110 switch(reason)
112 case DLL_PROCESS_ATTACH:
113 DisableThreadLibraryCalls(hinst);
114 break;
115 case DLL_PROCESS_DETACH:
116 while(CtxList)
118 wine_ALCcontext *next = CtxList->next;
119 HeapFree(GetProcessHeap(), 0, CtxList);
120 CtxList = next;
124 return TRUE;
128 /* Validates the given context */
129 static wine_ALCcontext *ValidateCtx(ALCcontext *ctx)
131 wine_ALCcontext *cur = CtxList;
133 while(cur != NULL && cur->ctx != ctx)
134 cur = cur->next;
135 return cur;
139 /***********************************************************************
140 * OpenAL thunk routines
143 /* OpenAL ALC 1.0 functions */
144 ALCcontext* CDECL wine_alcCreateContext(ALCdevice *device, const ALCint* attrlist)
146 wine_ALCcontext *ctx;
148 ctx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(wine_ALCcontext));
149 if(!ctx)
151 ERR("Out of memory!\n");
152 return NULL;
155 ctx->ctx = alcCreateContext(device, attrlist);
156 if(!ctx->ctx)
158 HeapFree(GetProcessHeap(), 0, ctx);
159 WARN("Failed to create new context\n");
160 return NULL;
162 TRACE("Created new context %p\n", ctx->ctx);
164 EnterCriticalSection(&openal_cs);
165 ctx->next = CtxList;
166 CtxList = ctx;
167 LeaveCriticalSection(&openal_cs);
169 return ctx->ctx;
172 ALCboolean CDECL wine_alcMakeContextCurrent(ALCcontext *context)
174 wine_ALCcontext *ctx = NULL;
176 EnterCriticalSection(&openal_cs);
177 if(context && !(ctx=ValidateCtx(context)))
178 WARN("Could not find context %p in context list\n", context);
180 if(alcMakeContextCurrent(context) == ALC_FALSE)
182 WARN("Failed to make context %p current\n", context);
183 LeaveCriticalSection(&openal_cs);
184 return ALC_FALSE;
187 CurrentCtx = ctx;
188 if(CurrentCtx && !CurrentCtx->been_current)
190 CurrentCtx->been_current = AL_TRUE;
192 #define LOADFUNC(x) CurrentCtx->x = alGetProcAddress(#x)
193 LOADFUNC(alGenFilters);
194 LOADFUNC(alDeleteFilters);
195 LOADFUNC(alIsFilter);
196 LOADFUNC(alFilterf);
197 LOADFUNC(alFilterfv);
198 LOADFUNC(alFilteri);
199 LOADFUNC(alFilteriv);
200 LOADFUNC(alGetFilterf);
201 LOADFUNC(alGetFilterfv);
202 LOADFUNC(alGetFilteri);
203 LOADFUNC(alGetFilteriv);
204 LOADFUNC(alGenEffects);
205 LOADFUNC(alDeleteEffects);
206 LOADFUNC(alIsEffect);
207 LOADFUNC(alEffectf);
208 LOADFUNC(alEffectfv);
209 LOADFUNC(alEffecti);
210 LOADFUNC(alEffectiv);
211 LOADFUNC(alGetEffectf);
212 LOADFUNC(alGetEffectfv);
213 LOADFUNC(alGetEffecti);
214 LOADFUNC(alGetEffectiv);
215 LOADFUNC(alGenAuxiliaryEffectSlots);
216 LOADFUNC(alDeleteAuxiliaryEffectSlots);
217 LOADFUNC(alIsAuxiliaryEffectSlot);
218 LOADFUNC(alAuxiliaryEffectSlotf);
219 LOADFUNC(alAuxiliaryEffectSlotfv);
220 LOADFUNC(alAuxiliaryEffectSloti);
221 LOADFUNC(alAuxiliaryEffectSlotiv);
222 LOADFUNC(alGetAuxiliaryEffectSlotf);
223 LOADFUNC(alGetAuxiliaryEffectSlotfv);
224 LOADFUNC(alGetAuxiliaryEffectSloti);
225 LOADFUNC(alGetAuxiliaryEffectSlotiv);
226 #undef LOADFUNC
228 LeaveCriticalSection(&openal_cs);
230 return ALC_TRUE;
233 ALvoid CDECL wine_alcProcessContext(ALCcontext *context)
235 alcProcessContext(context);
238 ALvoid CDECL wine_alcSuspendContext(ALCcontext *context)
240 alcSuspendContext(context);
243 ALvoid CDECL wine_alcDestroyContext(ALCcontext *context)
245 wine_ALCcontext **list, *ctx;
247 EnterCriticalSection(&openal_cs);
249 list = &CtxList;
250 while(*list && (*list)->ctx != context)
251 list = &(*list)->next;
253 if(!(*list))
255 WARN("Could not find context %p in context list\n", context);
256 alcDestroyContext(context);
257 LeaveCriticalSection(&openal_cs);
258 return;
261 ctx = *list;
262 *list = (*list)->next;
264 if(ctx == CurrentCtx)
265 CurrentCtx = NULL;
267 LeaveCriticalSection(&openal_cs);
269 HeapFree(GetProcessHeap(), 0, ctx);
270 alcDestroyContext(context);
273 ALCcontext* CDECL wine_alcGetCurrentContext(ALCvoid)
275 ALCcontext *ret = NULL;
277 EnterCriticalSection(&openal_cs);
278 if(CurrentCtx)
279 ret = CurrentCtx->ctx;
280 LeaveCriticalSection(&openal_cs);
282 return ret;
285 ALCdevice* CDECL wine_alcGetContextsDevice(ALCcontext *context)
287 return alcGetContextsDevice(context);
290 ALCdevice* CDECL wine_alcOpenDevice(const ALCchar *devicename)
292 if(devicename != NULL && (strcmp(devicename, "DirectSound3D") == 0 ||
293 strcmp(devicename, "DirectSound") == 0 ||
294 strcmp(devicename, "Generic Hardware") == 0 ||
295 strcmp(devicename, "Generic Software") == 0)) {
296 devicename = NULL;
298 return alcOpenDevice(devicename);
301 ALCboolean CDECL wine_alcCloseDevice(ALCdevice *device)
303 return alcCloseDevice(device);
306 ALCenum CDECL wine_alcGetError(ALCdevice *device)
308 return alcGetError(device);
311 ALCboolean CDECL wine_alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname)
313 return alcIsExtensionPresent(device, extname);
316 ALCvoid* CDECL wine_alcGetProcAddress(ALCdevice *device, const ALCchar *funcname)
318 void *proc;
319 int i;
321 /* Make sure the host implementation has the requested function */
322 proc = alcGetProcAddress(device, funcname);
323 if(!proc)
324 return NULL;
326 for(i = 0;ALCFuncs[i].name;i++)
328 if(strcmp(funcname, ALCFuncs[i].name) == 0)
329 return ALCFuncs[i].proc;
331 FIXME("Could not find function in list: %s\n", funcname);
332 return NULL;
335 ALCenum CDECL wine_alcGetEnumValue(ALCdevice *device, const ALCchar *enumname)
337 return alcGetEnumValue(device, enumname);
340 const ALCchar* CDECL wine_alcGetString(ALCdevice *device, ALCenum param)
342 return alcGetString(device, param);
345 ALvoid CDECL wine_alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest)
347 return alcGetIntegerv(device, param, size, dest);
351 /* OpenAL 1.0 functions */
352 ALvoid CDECL wine_alEnable(ALenum capability)
354 alEnable(capability);
357 ALvoid CDECL wine_alDisable(ALenum capability)
359 alDisable(capability);
362 ALboolean CDECL wine_alIsEnabled(ALenum capability)
364 return alIsEnabled(capability);
367 const ALchar* CDECL wine_alGetString(ALenum param)
369 return alGetString(param);
372 ALvoid CDECL wine_alGetBooleanv(ALenum param, ALboolean* data)
374 alGetBooleanv(param, data);
377 ALvoid CDECL wine_alGetIntegerv(ALenum param, ALint* data)
379 alGetIntegerv(param, data);
382 ALvoid CDECL wine_alGetFloatv(ALenum param, ALfloat* data)
384 alGetFloatv(param, data);
387 ALvoid CDECL wine_alGetDoublev(ALenum param, ALdouble* data)
389 alGetDoublev(param, data);
392 ALboolean CDECL wine_alGetBoolean(ALenum param)
394 return alGetBoolean(param);
397 ALint CDECL wine_alGetInteger(ALenum param)
399 return alGetInteger(param);
402 ALfloat CDECL wine_alGetFloat(ALenum param)
404 return alGetFloat(param);
407 ALdouble CDECL wine_alGetDouble(ALenum param)
409 return alGetDouble(param);
412 ALenum CDECL wine_alGetError(ALvoid)
414 return alGetError();
417 ALboolean CDECL wine_alIsExtensionPresent(const ALchar* extname)
419 return alIsExtensionPresent(extname);
422 ALvoid* CDECL wine_alGetProcAddress(const ALchar* funcname)
424 void *proc;
425 int i;
427 /* Make sure the host implementation has the requested function. This will
428 * also set the last AL error properly if the function should not be
429 * returned (eg. no current context). */
430 proc = alGetProcAddress(funcname);
431 if(!proc)
432 return NULL;
434 for(i = 0;ALFuncs[i].name;i++)
436 if(strcmp(funcname, ALFuncs[i].name) == 0)
437 return ALFuncs[i].proc;
439 FIXME("Could not find function in list: %s\n", funcname);
440 return NULL;
443 ALenum CDECL wine_alGetEnumValue(const ALchar* ename)
445 return alGetEnumValue(ename);
448 ALvoid CDECL wine_alListenerf(ALenum param, ALfloat value)
450 alListenerf(param, value);
453 ALvoid CDECL wine_alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3)
455 alListener3f(param, value1, value2, value3);
458 ALvoid CDECL wine_alListenerfv(ALenum param, const ALfloat* values)
460 alListenerfv(param, values);
463 ALvoid CDECL wine_alListeneri(ALenum param, ALint value)
465 alListeneri(param, value);
468 ALvoid CDECL wine_alGetListenerf(ALenum param, ALfloat* value)
470 alGetListenerf(param, value);
473 ALvoid CDECL wine_alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3)
475 alGetListener3f(param, value1, value2, value3);
478 ALvoid CDECL wine_alGetListenerfv(ALenum param, ALfloat* values)
480 alGetListenerfv(param, values);
483 ALvoid CDECL wine_alGetListeneri(ALenum param, ALint* value)
485 alGetListeneri(param, value);
488 ALvoid CDECL wine_alGetListeneriv(ALenum param, ALint* values)
490 alGetListeneriv(param, values);
493 ALvoid CDECL wine_alGenSources(ALsizei n, ALuint* sources)
495 alGenSources(n, sources);
498 ALvoid CDECL wine_alDeleteSources(ALsizei n, const ALuint* sources)
500 alDeleteSources(n, sources);
503 ALboolean CDECL wine_alIsSource(ALuint sid)
505 return alIsSource(sid);
508 ALvoid CDECL wine_alSourcef(ALuint sid, ALenum param, ALfloat value)
510 alSourcef(sid, param, value);
513 ALvoid CDECL wine_alSource3f(ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3)
515 alSource3f(sid, param, value1, value2, value3);
518 ALvoid CDECL wine_alSourcefv(ALuint sid, ALenum param, const ALfloat* values)
520 alSourcefv(sid, param, values);
523 ALvoid CDECL wine_alSourcei(ALuint sid, ALenum param, ALint value)
525 alSourcei(sid, param, value);
528 ALvoid CDECL wine_alGetSourcef(ALuint sid, ALenum param, ALfloat* value)
530 alGetSourcef(sid, param, value);
533 ALvoid CDECL wine_alGetSource3f(ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3)
535 alGetSource3f(sid, param, value1, value2, value3);
538 ALvoid CDECL wine_alGetSourcefv(ALuint sid, ALenum param, ALfloat* values)
540 alGetSourcefv(sid, param, values);
543 ALvoid CDECL wine_alGetSourcei(ALuint sid, ALenum param, ALint* value)
545 alGetSourcei(sid, param, value);
548 ALvoid CDECL wine_alGetSourceiv(ALuint sid, ALenum param, ALint* values)
550 alGetSourceiv(sid, param, values);
553 ALvoid CDECL wine_alSourcePlayv(ALsizei ns, const ALuint *sids)
555 alSourcePlayv(ns, sids);
558 ALvoid CDECL wine_alSourceStopv(ALsizei ns, const ALuint *sids)
560 alSourceStopv(ns, sids);
563 ALvoid CDECL wine_alSourceRewindv(ALsizei ns, const ALuint *sids)
565 alSourceRewindv(ns, sids);
568 ALvoid CDECL wine_alSourcePausev(ALsizei ns, const ALuint *sids)
570 alSourcePausev(ns, sids);
573 ALvoid CDECL wine_alSourcePlay(ALuint sid)
575 alSourcePlay(sid);
578 ALvoid CDECL wine_alSourceStop(ALuint sid)
580 alSourceStop(sid);
583 ALvoid CDECL wine_alSourceRewind(ALuint sid)
585 alSourceRewind(sid);
588 ALvoid CDECL wine_alSourcePause(ALuint sid)
590 alSourcePause(sid);
593 ALvoid CDECL wine_alSourceQueueBuffers(ALuint sid, ALsizei numEntries, const ALuint *bids)
595 alSourceQueueBuffers(sid, numEntries, bids);
598 ALvoid CDECL wine_alSourceUnqueueBuffers(ALuint sid, ALsizei numEntries, ALuint *bids)
600 alSourceUnqueueBuffers(sid, numEntries, bids);
603 ALvoid CDECL wine_alGenBuffers(ALsizei n, ALuint* buffers)
605 alGenBuffers(n, buffers);
608 ALvoid CDECL wine_alDeleteBuffers(ALsizei n, const ALuint* buffers)
610 alDeleteBuffers(n, buffers);
613 ALboolean CDECL wine_alIsBuffer(ALuint bid)
615 return alIsBuffer(bid);
618 ALvoid CDECL wine_alBufferData(ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq)
620 alBufferData(bid, format, data, size, freq);
623 ALvoid CDECL wine_alGetBufferf(ALuint bid, ALenum param, ALfloat* value)
625 alGetBufferf(bid, param, value);
628 ALvoid CDECL wine_alGetBufferfv(ALuint bid, ALenum param, ALfloat* values)
630 alGetBufferfv(bid, param, values);
633 ALvoid CDECL wine_alGetBufferi(ALuint bid, ALenum param, ALint* value)
635 alGetBufferi(bid, param, value);
638 ALvoid CDECL wine_alGetBufferiv(ALuint bid, ALenum param, ALint* values)
640 alGetBufferiv(bid, param, values);
643 ALvoid CDECL wine_alDopplerFactor(ALfloat value)
645 alDopplerFactor(value);
648 ALvoid CDECL wine_alDopplerVelocity(ALfloat value)
650 alDopplerVelocity(value);
653 ALvoid CDECL wine_alDistanceModel(ALenum distanceModel)
655 alDistanceModel(distanceModel);
659 /* OpenAL ALC 1.1 functions */
660 ALCdevice* CDECL wine_alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize)
662 return alcCaptureOpenDevice(devicename, frequency, format, buffersize);
665 ALCboolean CDECL wine_alcCaptureCloseDevice(ALCdevice *device)
667 return alcCaptureCloseDevice(device);
670 ALCvoid CDECL wine_alcCaptureStart(ALCdevice *device)
672 alcCaptureStart(device);
675 ALCvoid CDECL wine_alcCaptureStop(ALCdevice *device)
677 alcCaptureStop(device);
680 ALCvoid CDECL wine_alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples)
682 alcCaptureSamples(device, buffer, samples);
685 /* OpenAL 1.1 functions */
686 ALvoid CDECL wine_alListener3i(ALenum param, ALint value1, ALint value2, ALint value3)
688 alListener3i(param, value1, value2, value3);
691 ALvoid CDECL wine_alListeneriv(ALenum param, const ALint* values)
693 alListeneriv(param, values);
696 ALvoid CDECL wine_alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3)
698 alGetListener3i(param, value1, value2, value3);
701 ALvoid CDECL wine_alSource3i(ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3)
703 alSource3i(sid, param, value1, value2, value3);
706 ALvoid CDECL wine_alSourceiv(ALuint sid, ALenum param, const ALint* values)
708 alSourceiv(sid, param, values);
711 ALvoid CDECL wine_alGetSource3i(ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3)
713 alGetSource3i(sid, param, value1, value2, value3);
716 ALvoid CDECL wine_alBufferf(ALuint bid, ALenum param, ALfloat value)
718 alBufferf(bid, param, value);
721 ALvoid CDECL wine_alBuffer3f(ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3)
723 alBuffer3f(bid, param, value1, value2, value3);
726 ALvoid CDECL wine_alBufferfv(ALuint bid, ALenum param, const ALfloat* values)
728 alBufferfv(bid, param, values);
731 ALvoid CDECL wine_alBufferi(ALuint bid, ALenum param, ALint value)
733 alBufferi(bid, param, value);
736 ALvoid CDECL wine_alBuffer3i(ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3)
738 alBuffer3i(bid, param, value1, value2, value3);
741 ALvoid CDECL wine_alBufferiv(ALuint bid, ALenum param, const ALint* values)
743 alBufferiv(bid, param, values);
746 ALvoid CDECL wine_alGetBuffer3f(ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3)
748 alGetBuffer3f(bid, param, value1, value2, value3);
751 ALvoid CDECL wine_alGetBuffer3i(ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3)
753 alGetBuffer3i(bid, param, value1, value2, value3);
756 ALvoid CDECL wine_alSpeedOfSound(ALfloat value)
758 alSpeedOfSound(value);
761 /* OpenAL EFX extension functions */
762 ALvoid CDECL wine_alGenFilters(ALsizei n, ALuint* filters)
764 CurrentCtx->alGenFilters(n, filters);
767 ALvoid CDECL wine_alDeleteFilters(ALsizei n, const ALuint* filters)
769 CurrentCtx->alDeleteFilters(n, filters);
772 ALboolean CDECL wine_alIsFilter(ALuint fid)
774 return CurrentCtx->alIsFilter(fid);
777 ALvoid CDECL wine_alFilterf(ALuint fid, ALenum param, ALfloat value)
779 CurrentCtx->alFilterf(fid, param, value);
782 ALvoid CDECL wine_alFilterfv(ALuint fid, ALenum param, const ALfloat* values)
784 CurrentCtx->alFilterfv(fid, param, values);
787 ALvoid CDECL wine_alFilteri(ALuint fid, ALenum param, ALint value)
789 CurrentCtx->alFilteri(fid, param, value);
792 ALvoid CDECL wine_alFilteriv(ALuint fid, ALenum param, const ALint* values)
794 CurrentCtx->alFilteriv(fid, param, values);
797 ALvoid CDECL wine_alGetFilterf(ALuint fid, ALenum param, ALfloat* value)
799 CurrentCtx->alGetFilterf(fid, param, value);
802 ALvoid CDECL wine_alGetFilterfv(ALuint fid, ALenum param, ALfloat* values)
804 CurrentCtx->alGetFilterfv(fid, param, values);
807 ALvoid CDECL wine_alGetFilteri(ALuint fid, ALenum param, ALint* value)
809 CurrentCtx->alGetFilteri(fid, param, value);
812 ALvoid CDECL wine_alGetFilteriv(ALuint fid, ALenum param, ALint* values)
814 CurrentCtx->alGetFilteriv(fid, param, values);
818 ALvoid CDECL wine_alGenEffects(ALsizei n, ALuint* effects)
820 CurrentCtx->alGenEffects(n, effects);
823 ALvoid CDECL wine_alDeleteEffects(ALsizei n, const ALuint* effects)
825 CurrentCtx->alDeleteEffects(n, effects);
828 ALboolean CDECL wine_alIsEffect(ALuint eid)
830 return CurrentCtx->alIsEffect(eid);
833 ALvoid CDECL wine_alEffectf(ALuint eid, ALenum param, ALfloat value)
835 CurrentCtx->alEffectf(eid, param, value);
838 ALvoid CDECL wine_alEffectfv(ALuint eid, ALenum param, const ALfloat* values)
840 CurrentCtx->alEffectfv(eid, param, values);
843 ALvoid CDECL wine_alEffecti(ALuint eid, ALenum param, ALint value)
845 CurrentCtx->alEffecti(eid, param, value);
848 ALvoid CDECL wine_alEffectiv(ALuint eid, ALenum param, const ALint* values)
850 CurrentCtx->alEffectiv(eid, param, values);
853 ALvoid CDECL wine_alGetEffectf(ALuint eid, ALenum param, ALfloat* value)
855 CurrentCtx->alGetEffectf(eid, param, value);
858 ALvoid CDECL wine_alGetEffectfv(ALuint eid, ALenum param, ALfloat* values)
860 CurrentCtx->alGetEffectfv(eid, param, values);
863 ALvoid CDECL wine_alGetEffecti(ALuint eid, ALenum param, ALint* value)
865 CurrentCtx->alGetEffecti(eid, param, value);
868 ALvoid CDECL wine_alGetEffectiv(ALuint eid, ALenum param, ALint* values)
870 CurrentCtx->alGetEffectiv(eid, param, values);
874 ALvoid CDECL wine_alGenAuxiliaryEffectSlots(ALsizei n, ALuint* slots)
876 CurrentCtx->alGenAuxiliaryEffectSlots(n, slots);
879 ALvoid CDECL wine_alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint* slots)
881 CurrentCtx->alDeleteAuxiliaryEffectSlots(n, slots);
884 ALboolean CDECL wine_alIsAuxiliaryEffectSlot(ALuint sid)
886 return CurrentCtx->alIsAuxiliaryEffectSlot(sid);
889 ALvoid CDECL wine_alAuxiliaryEffectSlotf(ALuint sid, ALenum param, ALfloat value)
891 CurrentCtx->alAuxiliaryEffectSlotf(sid, param, value);
894 ALvoid CDECL wine_alAuxiliaryEffectSlotfv(ALuint sid, ALenum param, const ALfloat* values)
896 CurrentCtx->alAuxiliaryEffectSlotfv(sid, param, values);
899 ALvoid CDECL wine_alAuxiliaryEffectSloti(ALuint sid, ALenum param, ALint value)
901 CurrentCtx->alAuxiliaryEffectSloti(sid, param, value);
904 ALvoid CDECL wine_alAuxiliaryEffectSlotiv(ALuint sid, ALenum param, const ALint* values)
906 CurrentCtx->alAuxiliaryEffectSlotiv(sid, param, values);
909 ALvoid CDECL wine_alGetAuxiliaryEffectSlotf(ALuint sid, ALenum param, ALfloat* value)
911 CurrentCtx->alGetAuxiliaryEffectSlotf(sid, param, value);
914 ALvoid CDECL wine_alGetAuxiliaryEffectSlotfv(ALuint sid, ALenum param, ALfloat* values)
916 CurrentCtx->alGetAuxiliaryEffectSlotfv(sid, param, values);
919 ALvoid CDECL wine_alGetAuxiliaryEffectSloti(ALuint sid, ALenum param, ALint* value)
921 CurrentCtx->alGetAuxiliaryEffectSloti(sid, param, value);
924 ALvoid CDECL wine_alGetAuxiliaryEffectSlotiv(ALuint sid, ALenum param, ALint* values)
926 CurrentCtx->alGetAuxiliaryEffectSlotiv(sid, param, values);
930 static const struct FuncList ALCFuncs[] = {
931 { "alcCreateContext", wine_alcCreateContext },
932 { "alcMakeContextCurrent", wine_alcMakeContextCurrent },
933 { "alcProcessContext", wine_alcProcessContext },
934 { "alcSuspendContext", wine_alcSuspendContext },
935 { "alcDestroyContext", wine_alcDestroyContext },
936 { "alcGetCurrentContext", wine_alcGetCurrentContext },
937 { "alcGetContextsDevice", wine_alcGetContextsDevice },
938 { "alcOpenDevice", wine_alcOpenDevice },
939 { "alcCloseDevice", wine_alcCloseDevice },
940 { "alcGetError", wine_alcGetError },
941 { "alcIsExtensionPresent", wine_alcIsExtensionPresent },
942 { "alcGetProcAddress", wine_alcGetProcAddress },
943 { "alcGetEnumValue", wine_alcGetEnumValue },
944 { "alcGetString", wine_alcGetString },
945 { "alcGetIntegerv", wine_alcGetIntegerv },
946 { "alcCaptureOpenDevice", wine_alcCaptureOpenDevice },
947 { "alcCaptureCloseDevice", wine_alcCaptureCloseDevice },
948 { "alcCaptureStart", wine_alcCaptureStart },
949 { "alcCaptureStop", wine_alcCaptureStop },
950 { "alcCaptureSamples", wine_alcCaptureSamples },
951 { NULL, NULL }
953 static const struct FuncList ALFuncs[] = {
954 { "alEnable", wine_alEnable },
955 { "alDisable", wine_alDisable },
956 { "alIsEnabled", wine_alIsEnabled },
957 { "alGetString", wine_alGetString },
958 { "alGetBooleanv", wine_alGetBooleanv },
959 { "alGetIntegerv", wine_alGetIntegerv },
960 { "alGetFloatv", wine_alGetFloatv },
961 { "alGetDoublev", wine_alGetDoublev },
962 { "alGetBoolean", wine_alGetBoolean },
963 { "alGetInteger", wine_alGetInteger },
964 { "alGetFloat", wine_alGetFloat },
965 { "alGetDouble", wine_alGetDouble },
966 { "alGetError", wine_alGetError },
967 { "alIsExtensionPresent", wine_alIsExtensionPresent },
968 { "alGetProcAddress", wine_alGetProcAddress },
969 { "alGetEnumValue", wine_alGetEnumValue },
970 { "alListenerf", wine_alListenerf },
971 { "alListener3f", wine_alListener3f },
972 { "alListenerfv", wine_alListenerfv },
973 { "alListeneri", wine_alListeneri },
974 { "alListener3i", wine_alListener3i },
975 { "alListeneriv", wine_alListeneriv },
976 { "alGetListenerf", wine_alGetListenerf },
977 { "alGetListener3f", wine_alGetListener3f },
978 { "alGetListenerfv", wine_alGetListenerfv },
979 { "alGetListeneri", wine_alGetListeneri },
980 { "alGetListener3i", wine_alGetListener3i },
981 { "alGetListeneriv", wine_alGetListeneriv },
982 { "alGenSources", wine_alGenSources },
983 { "alDeleteSources", wine_alDeleteSources },
984 { "alIsSource", wine_alIsSource },
985 { "alSourcef", wine_alSourcef },
986 { "alSource3f", wine_alSource3f },
987 { "alSourcefv", wine_alSourcefv },
988 { "alSourcei", wine_alSourcei },
989 { "alSource3i", wine_alSource3i },
990 { "alSourceiv", wine_alSourceiv },
991 { "alGetSourcef", wine_alGetSourcef },
992 { "alGetSource3f", wine_alGetSource3f },
993 { "alGetSourcefv", wine_alGetSourcefv },
994 { "alGetSourcei", wine_alGetSourcei },
995 { "alGetSource3i", wine_alGetSource3i },
996 { "alGetSourceiv", wine_alGetSourceiv },
997 { "alSourcePlayv", wine_alSourcePlayv },
998 { "alSourceStopv", wine_alSourceStopv },
999 { "alSourceRewindv", wine_alSourceRewindv },
1000 { "alSourcePausev", wine_alSourcePausev },
1001 { "alSourcePlay", wine_alSourcePlay },
1002 { "alSourceStop", wine_alSourceStop },
1003 { "alSourceRewind", wine_alSourceRewind },
1004 { "alSourcePause", wine_alSourcePause },
1005 { "alSourceQueueBuffers", wine_alSourceQueueBuffers },
1006 { "alSourceUnqueueBuffers", wine_alSourceUnqueueBuffers },
1007 { "alGenBuffers", wine_alGenBuffers },
1008 { "alDeleteBuffers", wine_alDeleteBuffers },
1009 { "alIsBuffer", wine_alIsBuffer },
1010 { "alBufferData", wine_alBufferData },
1011 { "alBufferf", wine_alBufferf },
1012 { "alBuffer3f", wine_alBuffer3f },
1013 { "alBufferfv", wine_alBufferfv },
1014 { "alBufferi", wine_alBufferi },
1015 { "alBuffer3i", wine_alBuffer3i },
1016 { "alBufferiv", wine_alBufferiv },
1017 { "alGetBufferf", wine_alGetBufferf },
1018 { "alGetBuffer3f", wine_alGetBuffer3f },
1019 { "alGetBufferfv", wine_alGetBufferfv },
1020 { "alGetBufferi", wine_alGetBufferi },
1021 { "alGetBuffer3i", wine_alGetBuffer3i },
1022 { "alGetBufferiv", wine_alGetBufferiv },
1023 { "alDopplerFactor", wine_alDopplerFactor },
1024 { "alDopplerVelocity", wine_alDopplerVelocity },
1025 { "alSpeedOfSound", wine_alSpeedOfSound },
1026 { "alDistanceModel", wine_alDistanceModel },
1028 { "alGenFilters", wine_alGenFilters },
1029 { "alDeleteFilters", wine_alDeleteFilters },
1030 { "alIsFilter", wine_alIsFilter },
1031 { "alFilterf", wine_alFilterf },
1032 { "alFilterfv", wine_alFilterfv },
1033 { "alFilteri", wine_alFilteri },
1034 { "alFilteriv", wine_alFilteriv },
1035 { "alGetFilterf", wine_alGetFilterf },
1036 { "alGetFilterfv", wine_alGetFilterfv },
1037 { "alGetFilteri", wine_alGetFilteri },
1038 { "alGetFilteriv", wine_alGetFilteriv },
1040 { "alGenEffects", wine_alGenEffects },
1041 { "alDeleteEffects", wine_alDeleteEffects },
1042 { "alIsEffect", wine_alIsEffect },
1043 { "alEffectf", wine_alEffectf },
1044 { "alEffectfv", wine_alEffectfv },
1045 { "alEffecti", wine_alEffecti },
1046 { "alEffectiv", wine_alEffectiv },
1047 { "alGetEffectf", wine_alGetEffectf },
1048 { "alGetEffectfv", wine_alGetEffectfv },
1049 { "alGetEffecti", wine_alGetEffecti },
1050 { "alGetEffectiv", wine_alGetEffectiv },
1052 { "alGenAuxiliaryEffectSlots", wine_alGenAuxiliaryEffectSlots},
1053 { "alDeleteAuxiliaryEffectSlots",wine_alDeleteAuxiliaryEffectSlots},
1054 { "alIsAuxiliaryEffectSlot", wine_alIsAuxiliaryEffectSlot },
1055 { "alAuxiliaryEffectSlotf", wine_alAuxiliaryEffectSlotf },
1056 { "alAuxiliaryEffectSlotfv", wine_alAuxiliaryEffectSlotfv },
1057 { "alAuxiliaryEffectSloti", wine_alAuxiliaryEffectSloti },
1058 { "alAuxiliaryEffectSlotiv", wine_alAuxiliaryEffectSlotiv },
1059 { "alGetAuxiliaryEffectSlotf", wine_alGetAuxiliaryEffectSlotf},
1060 { "alGetAuxiliaryEffectSlotfv", wine_alGetAuxiliaryEffectSlotfv},
1061 { "alGetAuxiliaryEffectSloti", wine_alGetAuxiliaryEffectSloti},
1062 { "alGetAuxiliaryEffectSlotiv", wine_alGetAuxiliaryEffectSlotiv},
1064 { NULL, NULL }