2 * OpenAL32.dll thunk. Wraps Win32 OpenAL function calls around a native
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
30 #include "wine/debug.h"
35 #elif defined(HAVE_OPENAL_AL_H)
36 #include <OpenAL/al.h>
37 #include <OpenAL/alc.h>
40 WINE_DEFAULT_DEBUG_CHANNEL(openal32
);
42 typedef struct wine_ALCcontext
{
45 ALboolean been_current
;
47 ALvoid (AL_APIENTRY
*alBufferDataStatic
)(const ALuint bid
, ALenum format
, const ALvoid
* data
, ALsizei size
, ALsizei freq
);
48 ALvoid (AL_APIENTRY
*alGenFilters
)(ALsizei n
, ALuint
* filters
);
49 ALvoid (AL_APIENTRY
*alDeleteFilters
)(ALsizei n
, const ALuint
* filters
);
50 ALboolean (AL_APIENTRY
*alIsFilter
)(ALuint fid
);
51 ALvoid (AL_APIENTRY
*alFilterf
)(ALuint fid
, ALenum param
, ALfloat value
);
52 ALvoid (AL_APIENTRY
*alFilterfv
)(ALuint fid
, ALenum param
, const ALfloat
* values
);
53 ALvoid (AL_APIENTRY
*alFilteri
)(ALuint fid
, ALenum param
, ALint value
);
54 ALvoid (AL_APIENTRY
*alFilteriv
)(ALuint fid
, ALenum param
, const ALint
* values
);
55 ALvoid (AL_APIENTRY
*alGetFilterf
)(ALuint fid
, ALenum param
, ALfloat
* value
);
56 ALvoid (AL_APIENTRY
*alGetFilterfv
)(ALuint fid
, ALenum param
, ALfloat
* values
);
57 ALvoid (AL_APIENTRY
*alGetFilteri
)(ALuint fid
, ALenum param
, ALint
* value
);
58 ALvoid (AL_APIENTRY
*alGetFilteriv
)(ALuint fid
, ALenum param
, ALint
* values
);
59 ALvoid (AL_APIENTRY
*alGenEffects
)(ALsizei n
, ALuint
* effects
);
60 ALvoid (AL_APIENTRY
*alDeleteEffects
)(ALsizei n
, const ALuint
* effects
);
61 ALboolean (AL_APIENTRY
*alIsEffect
)(ALuint eid
);
62 ALvoid (AL_APIENTRY
*alEffectf
)(ALuint eid
, ALenum param
, ALfloat value
);
63 ALvoid (AL_APIENTRY
*alEffectfv
)(ALuint eid
, ALenum param
, const ALfloat
* values
);
64 ALvoid (AL_APIENTRY
*alEffecti
)(ALuint eid
, ALenum param
, ALint value
);
65 ALvoid (AL_APIENTRY
*alEffectiv
)(ALuint eid
, ALenum param
, const ALint
* values
);
66 ALvoid (AL_APIENTRY
*alGetEffectf
)(ALuint eid
, ALenum param
, ALfloat
* value
);
67 ALvoid (AL_APIENTRY
*alGetEffectfv
)(ALuint eid
, ALenum param
, ALfloat
* values
);
68 ALvoid (AL_APIENTRY
*alGetEffecti
)(ALuint eid
, ALenum param
, ALint
* value
);
69 ALvoid (AL_APIENTRY
*alGetEffectiv
)(ALuint eid
, ALenum param
, ALint
* values
);
70 ALvoid (AL_APIENTRY
*alGenAuxiliaryEffectSlots
)(ALsizei n
, ALuint
* slots
);
71 ALvoid (AL_APIENTRY
*alDeleteAuxiliaryEffectSlots
)(ALsizei n
, const ALuint
* slots
);
72 ALboolean (AL_APIENTRY
*alIsAuxiliaryEffectSlot
)(ALuint sid
);
73 ALvoid (AL_APIENTRY
*alAuxiliaryEffectSlotf
)(ALuint sid
, ALenum param
, ALfloat value
);
74 ALvoid (AL_APIENTRY
*alAuxiliaryEffectSlotfv
)(ALuint sid
, ALenum param
, const ALfloat
* values
);
75 ALvoid (AL_APIENTRY
*alAuxiliaryEffectSloti
)(ALuint sid
, ALenum param
, ALint value
);
76 ALvoid (AL_APIENTRY
*alAuxiliaryEffectSlotiv
)(ALuint sid
, ALenum param
, const ALint
* values
);
77 ALvoid (AL_APIENTRY
*alGetAuxiliaryEffectSlotf
)(ALuint sid
, ALenum param
, ALfloat
* value
);
78 ALvoid (AL_APIENTRY
*alGetAuxiliaryEffectSlotfv
)(ALuint sid
, ALenum param
, ALfloat
* values
);
79 ALvoid (AL_APIENTRY
*alGetAuxiliaryEffectSloti
)(ALuint sid
, ALenum param
, ALint
* value
);
80 ALvoid (AL_APIENTRY
*alGetAuxiliaryEffectSlotiv
)(ALuint sid
, ALenum param
, ALint
* values
);
82 struct wine_ALCcontext
*next
;
90 static const struct FuncList ALCFuncs
[];
91 static const struct FuncList ALFuncs
[];
93 static wine_ALCcontext
*CtxList
;
94 static wine_ALCcontext
*CurrentCtx
;
96 CRITICAL_SECTION openal_cs
;
97 static CRITICAL_SECTION_DEBUG openal_cs_debug
=
100 {&openal_cs_debug
.ProcessLocksList
,
101 &openal_cs_debug
.ProcessLocksList
},
102 0, 0, {(DWORD_PTR
)(__FILE__
": openal_cs")}
104 CRITICAL_SECTION openal_cs
= {&openal_cs_debug
, -1, 0, 0, 0, 0};
106 /***********************************************************************
107 * OpenAL initialisation routine
109 BOOL WINAPI
DllMain( HINSTANCE hinst
, DWORD reason
, LPVOID reserved
)
113 case DLL_PROCESS_ATTACH
:
114 DisableThreadLibraryCalls(hinst
);
116 case DLL_PROCESS_DETACH
:
119 wine_ALCcontext
*next
= CtxList
->next
;
120 HeapFree(GetProcessHeap(), 0, CtxList
);
129 /* Validates the given context */
130 static wine_ALCcontext
*ValidateCtx(ALCcontext
*ctx
)
132 wine_ALCcontext
*cur
= CtxList
;
134 while(cur
!= NULL
&& cur
->ctx
!= ctx
)
140 /***********************************************************************
141 * OpenAL thunk routines
144 /* OpenAL ALC 1.0 functions */
145 ALCcontext
* CDECL
wine_alcCreateContext(ALCdevice
*device
, const ALCint
* attrlist
)
147 wine_ALCcontext
*ctx
;
149 ctx
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(wine_ALCcontext
));
152 ERR("Out of memory!\n");
156 ctx
->ctx
= alcCreateContext(device
, attrlist
);
159 HeapFree(GetProcessHeap(), 0, ctx
);
160 WARN("Failed to create new context\n");
163 TRACE("Created new context %p\n", ctx
->ctx
);
165 EnterCriticalSection(&openal_cs
);
168 LeaveCriticalSection(&openal_cs
);
173 ALCboolean CDECL
wine_alcMakeContextCurrent(ALCcontext
*context
)
175 wine_ALCcontext
*ctx
= NULL
;
177 EnterCriticalSection(&openal_cs
);
178 if(context
&& !(ctx
=ValidateCtx(context
)))
179 WARN("Could not find context %p in context list\n", context
);
181 if(alcMakeContextCurrent(context
) == ALC_FALSE
)
183 WARN("Failed to make context %p current\n", context
);
184 LeaveCriticalSection(&openal_cs
);
189 if(CurrentCtx
&& !CurrentCtx
->been_current
)
191 CurrentCtx
->been_current
= AL_TRUE
;
193 #define LOADFUNC(x) CurrentCtx->x = alGetProcAddress(#x)
194 LOADFUNC(alBufferDataStatic
);
195 LOADFUNC(alGenFilters
);
196 LOADFUNC(alDeleteFilters
);
197 LOADFUNC(alIsFilter
);
199 LOADFUNC(alFilterfv
);
201 LOADFUNC(alFilteriv
);
202 LOADFUNC(alGetFilterf
);
203 LOADFUNC(alGetFilterfv
);
204 LOADFUNC(alGetFilteri
);
205 LOADFUNC(alGetFilteriv
);
206 LOADFUNC(alGenEffects
);
207 LOADFUNC(alDeleteEffects
);
208 LOADFUNC(alIsEffect
);
210 LOADFUNC(alEffectfv
);
212 LOADFUNC(alEffectiv
);
213 LOADFUNC(alGetEffectf
);
214 LOADFUNC(alGetEffectfv
);
215 LOADFUNC(alGetEffecti
);
216 LOADFUNC(alGetEffectiv
);
217 LOADFUNC(alGenAuxiliaryEffectSlots
);
218 LOADFUNC(alDeleteAuxiliaryEffectSlots
);
219 LOADFUNC(alIsAuxiliaryEffectSlot
);
220 LOADFUNC(alAuxiliaryEffectSlotf
);
221 LOADFUNC(alAuxiliaryEffectSlotfv
);
222 LOADFUNC(alAuxiliaryEffectSloti
);
223 LOADFUNC(alAuxiliaryEffectSlotiv
);
224 LOADFUNC(alGetAuxiliaryEffectSlotf
);
225 LOADFUNC(alGetAuxiliaryEffectSlotfv
);
226 LOADFUNC(alGetAuxiliaryEffectSloti
);
227 LOADFUNC(alGetAuxiliaryEffectSlotiv
);
230 LeaveCriticalSection(&openal_cs
);
235 ALvoid CDECL
wine_alcProcessContext(ALCcontext
*context
)
237 alcProcessContext(context
);
240 ALvoid CDECL
wine_alcSuspendContext(ALCcontext
*context
)
242 alcSuspendContext(context
);
245 ALvoid CDECL
wine_alcDestroyContext(ALCcontext
*context
)
247 wine_ALCcontext
**list
, *ctx
;
249 EnterCriticalSection(&openal_cs
);
252 while(*list
&& (*list
)->ctx
!= context
)
253 list
= &(*list
)->next
;
257 WARN("Could not find context %p in context list\n", context
);
258 alcDestroyContext(context
);
259 LeaveCriticalSection(&openal_cs
);
264 *list
= (*list
)->next
;
266 if(ctx
== CurrentCtx
)
269 LeaveCriticalSection(&openal_cs
);
271 HeapFree(GetProcessHeap(), 0, ctx
);
272 alcDestroyContext(context
);
275 ALCcontext
* CDECL
wine_alcGetCurrentContext(ALCvoid
)
277 ALCcontext
*ret
= NULL
;
279 EnterCriticalSection(&openal_cs
);
281 ret
= CurrentCtx
->ctx
;
282 LeaveCriticalSection(&openal_cs
);
287 ALCdevice
* CDECL
wine_alcGetContextsDevice(ALCcontext
*context
)
289 return alcGetContextsDevice(context
);
292 ALCdevice
* CDECL
wine_alcOpenDevice(const ALCchar
*devicename
)
294 if(devicename
!= NULL
&& (strcmp(devicename
, "DirectSound3D") == 0 ||
295 strcmp(devicename
, "DirectSound") == 0 ||
296 strcmp(devicename
, "Generic Hardware") == 0 ||
297 strcmp(devicename
, "Generic Software") == 0)) {
300 return alcOpenDevice(devicename
);
303 ALCboolean CDECL
wine_alcCloseDevice(ALCdevice
*device
)
305 return alcCloseDevice(device
);
308 ALCenum CDECL
wine_alcGetError(ALCdevice
*device
)
310 return alcGetError(device
);
313 ALCboolean CDECL
wine_alcIsExtensionPresent(ALCdevice
*device
, const ALCchar
*extname
)
315 return alcIsExtensionPresent(device
, extname
);
318 ALCvoid
* CDECL
wine_alcGetProcAddress(ALCdevice
*device
, const ALCchar
*funcname
)
323 /* Make sure the host implementation has the requested function */
324 proc
= alcGetProcAddress(device
, funcname
);
328 for(i
= 0;ALCFuncs
[i
].name
;i
++)
330 if(strcmp(funcname
, ALCFuncs
[i
].name
) == 0)
331 return ALCFuncs
[i
].proc
;
333 FIXME("Could not find function in list: %s\n", funcname
);
337 ALCenum CDECL
wine_alcGetEnumValue(ALCdevice
*device
, const ALCchar
*enumname
)
339 return alcGetEnumValue(device
, enumname
);
342 const ALCchar
* CDECL
wine_alcGetString(ALCdevice
*device
, ALCenum param
)
344 return alcGetString(device
, param
);
347 ALvoid CDECL
wine_alcGetIntegerv(ALCdevice
*device
, ALCenum param
, ALCsizei size
, ALCint
*dest
)
349 return alcGetIntegerv(device
, param
, size
, dest
);
353 /* OpenAL 1.0 functions */
354 ALvoid CDECL
wine_alEnable(ALenum capability
)
356 alEnable(capability
);
359 ALvoid CDECL
wine_alDisable(ALenum capability
)
361 alDisable(capability
);
364 ALboolean CDECL
wine_alIsEnabled(ALenum capability
)
366 return alIsEnabled(capability
);
369 const ALchar
* CDECL
wine_alGetString(ALenum param
)
371 return alGetString(param
);
374 ALvoid CDECL
wine_alGetBooleanv(ALenum param
, ALboolean
* data
)
376 alGetBooleanv(param
, data
);
379 ALvoid CDECL
wine_alGetIntegerv(ALenum param
, ALint
* data
)
381 alGetIntegerv(param
, data
);
384 ALvoid CDECL
wine_alGetFloatv(ALenum param
, ALfloat
* data
)
386 alGetFloatv(param
, data
);
389 ALvoid CDECL
wine_alGetDoublev(ALenum param
, ALdouble
* data
)
391 alGetDoublev(param
, data
);
394 ALboolean CDECL
wine_alGetBoolean(ALenum param
)
396 return alGetBoolean(param
);
399 ALint CDECL
wine_alGetInteger(ALenum param
)
401 return alGetInteger(param
);
404 ALfloat CDECL
wine_alGetFloat(ALenum param
)
406 return alGetFloat(param
);
409 ALdouble CDECL
wine_alGetDouble(ALenum param
)
411 return alGetDouble(param
);
414 ALenum CDECL
wine_alGetError(ALvoid
)
419 ALboolean CDECL
wine_alIsExtensionPresent(const ALchar
* extname
)
421 return alIsExtensionPresent(extname
);
424 ALvoid
* CDECL
wine_alGetProcAddress(const ALchar
* funcname
)
429 /* Make sure the host implementation has the requested function. This will
430 * also set the last AL error properly if the function should not be
431 * returned (eg. no current context). */
432 proc
= alGetProcAddress(funcname
);
436 for(i
= 0;ALFuncs
[i
].name
;i
++)
438 if(strcmp(funcname
, ALFuncs
[i
].name
) == 0)
439 return ALFuncs
[i
].proc
;
441 FIXME("Could not find function in list: %s\n", funcname
);
445 ALenum CDECL
wine_alGetEnumValue(const ALchar
* ename
)
447 return alGetEnumValue(ename
);
450 ALvoid CDECL
wine_alListenerf(ALenum param
, ALfloat value
)
452 alListenerf(param
, value
);
455 ALvoid CDECL
wine_alListener3f(ALenum param
, ALfloat value1
, ALfloat value2
, ALfloat value3
)
457 alListener3f(param
, value1
, value2
, value3
);
460 ALvoid CDECL
wine_alListenerfv(ALenum param
, const ALfloat
* values
)
462 alListenerfv(param
, values
);
465 ALvoid CDECL
wine_alListeneri(ALenum param
, ALint value
)
467 alListeneri(param
, value
);
470 ALvoid CDECL
wine_alGetListenerf(ALenum param
, ALfloat
* value
)
472 alGetListenerf(param
, value
);
475 ALvoid CDECL
wine_alGetListener3f(ALenum param
, ALfloat
*value1
, ALfloat
*value2
, ALfloat
*value3
)
477 alGetListener3f(param
, value1
, value2
, value3
);
480 ALvoid CDECL
wine_alGetListenerfv(ALenum param
, ALfloat
* values
)
482 alGetListenerfv(param
, values
);
485 ALvoid CDECL
wine_alGetListeneri(ALenum param
, ALint
* value
)
487 alGetListeneri(param
, value
);
490 ALvoid CDECL
wine_alGetListeneriv(ALenum param
, ALint
* values
)
492 alGetListeneriv(param
, values
);
495 ALvoid CDECL
wine_alGenSources(ALsizei n
, ALuint
* sources
)
497 alGenSources(n
, sources
);
500 ALvoid CDECL
wine_alDeleteSources(ALsizei n
, const ALuint
* sources
)
502 alDeleteSources(n
, sources
);
505 ALboolean CDECL
wine_alIsSource(ALuint sid
)
507 return alIsSource(sid
);
510 ALvoid CDECL
wine_alSourcef(ALuint sid
, ALenum param
, ALfloat value
)
512 alSourcef(sid
, param
, value
);
515 ALvoid CDECL
wine_alSource3f(ALuint sid
, ALenum param
, ALfloat value1
, ALfloat value2
, ALfloat value3
)
517 alSource3f(sid
, param
, value1
, value2
, value3
);
520 ALvoid CDECL
wine_alSourcefv(ALuint sid
, ALenum param
, const ALfloat
* values
)
522 alSourcefv(sid
, param
, values
);
525 ALvoid CDECL
wine_alSourcei(ALuint sid
, ALenum param
, ALint value
)
527 alSourcei(sid
, param
, value
);
530 ALvoid CDECL
wine_alGetSourcef(ALuint sid
, ALenum param
, ALfloat
* value
)
532 alGetSourcef(sid
, param
, value
);
535 ALvoid CDECL
wine_alGetSource3f(ALuint sid
, ALenum param
, ALfloat
* value1
, ALfloat
* value2
, ALfloat
* value3
)
537 alGetSource3f(sid
, param
, value1
, value2
, value3
);
540 ALvoid CDECL
wine_alGetSourcefv(ALuint sid
, ALenum param
, ALfloat
* values
)
542 alGetSourcefv(sid
, param
, values
);
545 ALvoid CDECL
wine_alGetSourcei(ALuint sid
, ALenum param
, ALint
* value
)
547 alGetSourcei(sid
, param
, value
);
550 ALvoid CDECL
wine_alGetSourceiv(ALuint sid
, ALenum param
, ALint
* values
)
552 alGetSourceiv(sid
, param
, values
);
555 ALvoid CDECL
wine_alSourcePlayv(ALsizei ns
, const ALuint
*sids
)
557 alSourcePlayv(ns
, sids
);
560 ALvoid CDECL
wine_alSourceStopv(ALsizei ns
, const ALuint
*sids
)
562 alSourceStopv(ns
, sids
);
565 ALvoid CDECL
wine_alSourceRewindv(ALsizei ns
, const ALuint
*sids
)
567 alSourceRewindv(ns
, sids
);
570 ALvoid CDECL
wine_alSourcePausev(ALsizei ns
, const ALuint
*sids
)
572 alSourcePausev(ns
, sids
);
575 ALvoid CDECL
wine_alSourcePlay(ALuint sid
)
580 ALvoid CDECL
wine_alSourceStop(ALuint sid
)
585 ALvoid CDECL
wine_alSourceRewind(ALuint sid
)
590 ALvoid CDECL
wine_alSourcePause(ALuint sid
)
595 ALvoid CDECL
wine_alSourceQueueBuffers(ALuint sid
, ALsizei numEntries
, const ALuint
*bids
)
597 alSourceQueueBuffers(sid
, numEntries
, bids
);
600 ALvoid CDECL
wine_alSourceUnqueueBuffers(ALuint sid
, ALsizei numEntries
, ALuint
*bids
)
602 alSourceUnqueueBuffers(sid
, numEntries
, bids
);
605 ALvoid CDECL
wine_alGenBuffers(ALsizei n
, ALuint
* buffers
)
607 alGenBuffers(n
, buffers
);
610 ALvoid CDECL
wine_alDeleteBuffers(ALsizei n
, const ALuint
* buffers
)
612 alDeleteBuffers(n
, buffers
);
615 ALboolean CDECL
wine_alIsBuffer(ALuint bid
)
617 return alIsBuffer(bid
);
620 ALvoid CDECL
wine_alBufferData(ALuint bid
, ALenum format
, const ALvoid
* data
, ALsizei size
, ALsizei freq
)
622 alBufferData(bid
, format
, data
, size
, freq
);
625 ALvoid CDECL
wine_alBufferDataStatic(const ALuint bid
, ALenum format
, const ALvoid
* data
, ALsizei size
, ALsizei freq
)
627 CurrentCtx
->alBufferDataStatic(bid
, format
, data
, size
, freq
);
630 ALvoid CDECL
wine_alGetBufferf(ALuint bid
, ALenum param
, ALfloat
* value
)
632 alGetBufferf(bid
, param
, value
);
635 ALvoid CDECL
wine_alGetBufferfv(ALuint bid
, ALenum param
, ALfloat
* values
)
637 alGetBufferfv(bid
, param
, values
);
640 ALvoid CDECL
wine_alGetBufferi(ALuint bid
, ALenum param
, ALint
* value
)
642 alGetBufferi(bid
, param
, value
);
645 ALvoid CDECL
wine_alGetBufferiv(ALuint bid
, ALenum param
, ALint
* values
)
647 alGetBufferiv(bid
, param
, values
);
650 ALvoid CDECL
wine_alDopplerFactor(ALfloat value
)
652 alDopplerFactor(value
);
655 ALvoid CDECL
wine_alDopplerVelocity(ALfloat value
)
657 alDopplerVelocity(value
);
660 ALvoid CDECL
wine_alDistanceModel(ALenum distanceModel
)
662 alDistanceModel(distanceModel
);
666 /* OpenAL ALC 1.1 functions */
667 ALCdevice
* CDECL
wine_alcCaptureOpenDevice(const ALCchar
*devicename
, ALCuint frequency
, ALCenum format
, ALCsizei buffersize
)
669 return alcCaptureOpenDevice(devicename
, frequency
, format
, buffersize
);
672 ALCboolean CDECL
wine_alcCaptureCloseDevice(ALCdevice
*device
)
674 return alcCaptureCloseDevice(device
);
677 ALCvoid CDECL
wine_alcCaptureStart(ALCdevice
*device
)
679 alcCaptureStart(device
);
682 ALCvoid CDECL
wine_alcCaptureStop(ALCdevice
*device
)
684 alcCaptureStop(device
);
687 ALCvoid CDECL
wine_alcCaptureSamples(ALCdevice
*device
, ALCvoid
*buffer
, ALCsizei samples
)
689 alcCaptureSamples(device
, buffer
, samples
);
692 /* OpenAL 1.1 functions */
693 ALvoid CDECL
wine_alListener3i(ALenum param
, ALint value1
, ALint value2
, ALint value3
)
695 alListener3i(param
, value1
, value2
, value3
);
698 ALvoid CDECL
wine_alListeneriv(ALenum param
, const ALint
* values
)
700 alListeneriv(param
, values
);
703 ALvoid CDECL
wine_alGetListener3i(ALenum param
, ALint
*value1
, ALint
*value2
, ALint
*value3
)
705 alGetListener3i(param
, value1
, value2
, value3
);
708 ALvoid CDECL
wine_alSource3i(ALuint sid
, ALenum param
, ALint value1
, ALint value2
, ALint value3
)
710 alSource3i(sid
, param
, value1
, value2
, value3
);
713 ALvoid CDECL
wine_alSourceiv(ALuint sid
, ALenum param
, const ALint
* values
)
715 alSourceiv(sid
, param
, values
);
718 ALvoid CDECL
wine_alGetSource3i(ALuint sid
, ALenum param
, ALint
* value1
, ALint
* value2
, ALint
* value3
)
720 alGetSource3i(sid
, param
, value1
, value2
, value3
);
723 ALvoid CDECL
wine_alBufferf(ALuint bid
, ALenum param
, ALfloat value
)
725 alBufferf(bid
, param
, value
);
728 ALvoid CDECL
wine_alBuffer3f(ALuint bid
, ALenum param
, ALfloat value1
, ALfloat value2
, ALfloat value3
)
730 alBuffer3f(bid
, param
, value1
, value2
, value3
);
733 ALvoid CDECL
wine_alBufferfv(ALuint bid
, ALenum param
, const ALfloat
* values
)
735 alBufferfv(bid
, param
, values
);
738 ALvoid CDECL
wine_alBufferi(ALuint bid
, ALenum param
, ALint value
)
740 alBufferi(bid
, param
, value
);
743 ALvoid CDECL
wine_alBuffer3i(ALuint bid
, ALenum param
, ALint value1
, ALint value2
, ALint value3
)
745 alBuffer3i(bid
, param
, value1
, value2
, value3
);
748 ALvoid CDECL
wine_alBufferiv(ALuint bid
, ALenum param
, const ALint
* values
)
750 alBufferiv(bid
, param
, values
);
753 ALvoid CDECL
wine_alGetBuffer3f(ALuint bid
, ALenum param
, ALfloat
* value1
, ALfloat
* value2
, ALfloat
* value3
)
755 alGetBuffer3f(bid
, param
, value1
, value2
, value3
);
758 ALvoid CDECL
wine_alGetBuffer3i(ALuint bid
, ALenum param
, ALint
* value1
, ALint
* value2
, ALint
* value3
)
760 alGetBuffer3i(bid
, param
, value1
, value2
, value3
);
763 ALvoid CDECL
wine_alSpeedOfSound(ALfloat value
)
765 alSpeedOfSound(value
);
768 /* OpenAL EFX extension functions */
769 ALvoid CDECL
wine_alGenFilters(ALsizei n
, ALuint
* filters
)
771 CurrentCtx
->alGenFilters(n
, filters
);
774 ALvoid CDECL
wine_alDeleteFilters(ALsizei n
, const ALuint
* filters
)
776 CurrentCtx
->alDeleteFilters(n
, filters
);
779 ALboolean CDECL
wine_alIsFilter(ALuint fid
)
781 return CurrentCtx
->alIsFilter(fid
);
784 ALvoid CDECL
wine_alFilterf(ALuint fid
, ALenum param
, ALfloat value
)
786 CurrentCtx
->alFilterf(fid
, param
, value
);
789 ALvoid CDECL
wine_alFilterfv(ALuint fid
, ALenum param
, const ALfloat
* values
)
791 CurrentCtx
->alFilterfv(fid
, param
, values
);
794 ALvoid CDECL
wine_alFilteri(ALuint fid
, ALenum param
, ALint value
)
796 CurrentCtx
->alFilteri(fid
, param
, value
);
799 ALvoid CDECL
wine_alFilteriv(ALuint fid
, ALenum param
, const ALint
* values
)
801 CurrentCtx
->alFilteriv(fid
, param
, values
);
804 ALvoid CDECL
wine_alGetFilterf(ALuint fid
, ALenum param
, ALfloat
* value
)
806 CurrentCtx
->alGetFilterf(fid
, param
, value
);
809 ALvoid CDECL
wine_alGetFilterfv(ALuint fid
, ALenum param
, ALfloat
* values
)
811 CurrentCtx
->alGetFilterfv(fid
, param
, values
);
814 ALvoid CDECL
wine_alGetFilteri(ALuint fid
, ALenum param
, ALint
* value
)
816 CurrentCtx
->alGetFilteri(fid
, param
, value
);
819 ALvoid CDECL
wine_alGetFilteriv(ALuint fid
, ALenum param
, ALint
* values
)
821 CurrentCtx
->alGetFilteriv(fid
, param
, values
);
825 ALvoid CDECL
wine_alGenEffects(ALsizei n
, ALuint
* effects
)
827 CurrentCtx
->alGenEffects(n
, effects
);
830 ALvoid CDECL
wine_alDeleteEffects(ALsizei n
, const ALuint
* effects
)
832 CurrentCtx
->alDeleteEffects(n
, effects
);
835 ALboolean CDECL
wine_alIsEffect(ALuint eid
)
837 return CurrentCtx
->alIsEffect(eid
);
840 ALvoid CDECL
wine_alEffectf(ALuint eid
, ALenum param
, ALfloat value
)
842 CurrentCtx
->alEffectf(eid
, param
, value
);
845 ALvoid CDECL
wine_alEffectfv(ALuint eid
, ALenum param
, const ALfloat
* values
)
847 CurrentCtx
->alEffectfv(eid
, param
, values
);
850 ALvoid CDECL
wine_alEffecti(ALuint eid
, ALenum param
, ALint value
)
852 CurrentCtx
->alEffecti(eid
, param
, value
);
855 ALvoid CDECL
wine_alEffectiv(ALuint eid
, ALenum param
, const ALint
* values
)
857 CurrentCtx
->alEffectiv(eid
, param
, values
);
860 ALvoid CDECL
wine_alGetEffectf(ALuint eid
, ALenum param
, ALfloat
* value
)
862 CurrentCtx
->alGetEffectf(eid
, param
, value
);
865 ALvoid CDECL
wine_alGetEffectfv(ALuint eid
, ALenum param
, ALfloat
* values
)
867 CurrentCtx
->alGetEffectfv(eid
, param
, values
);
870 ALvoid CDECL
wine_alGetEffecti(ALuint eid
, ALenum param
, ALint
* value
)
872 CurrentCtx
->alGetEffecti(eid
, param
, value
);
875 ALvoid CDECL
wine_alGetEffectiv(ALuint eid
, ALenum param
, ALint
* values
)
877 CurrentCtx
->alGetEffectiv(eid
, param
, values
);
881 ALvoid CDECL
wine_alGenAuxiliaryEffectSlots(ALsizei n
, ALuint
* slots
)
883 CurrentCtx
->alGenAuxiliaryEffectSlots(n
, slots
);
886 ALvoid CDECL
wine_alDeleteAuxiliaryEffectSlots(ALsizei n
, const ALuint
* slots
)
888 CurrentCtx
->alDeleteAuxiliaryEffectSlots(n
, slots
);
891 ALboolean CDECL
wine_alIsAuxiliaryEffectSlot(ALuint sid
)
893 return CurrentCtx
->alIsAuxiliaryEffectSlot(sid
);
896 ALvoid CDECL
wine_alAuxiliaryEffectSlotf(ALuint sid
, ALenum param
, ALfloat value
)
898 CurrentCtx
->alAuxiliaryEffectSlotf(sid
, param
, value
);
901 ALvoid CDECL
wine_alAuxiliaryEffectSlotfv(ALuint sid
, ALenum param
, const ALfloat
* values
)
903 CurrentCtx
->alAuxiliaryEffectSlotfv(sid
, param
, values
);
906 ALvoid CDECL
wine_alAuxiliaryEffectSloti(ALuint sid
, ALenum param
, ALint value
)
908 CurrentCtx
->alAuxiliaryEffectSloti(sid
, param
, value
);
911 ALvoid CDECL
wine_alAuxiliaryEffectSlotiv(ALuint sid
, ALenum param
, const ALint
* values
)
913 CurrentCtx
->alAuxiliaryEffectSlotiv(sid
, param
, values
);
916 ALvoid CDECL
wine_alGetAuxiliaryEffectSlotf(ALuint sid
, ALenum param
, ALfloat
* value
)
918 CurrentCtx
->alGetAuxiliaryEffectSlotf(sid
, param
, value
);
921 ALvoid CDECL
wine_alGetAuxiliaryEffectSlotfv(ALuint sid
, ALenum param
, ALfloat
* values
)
923 CurrentCtx
->alGetAuxiliaryEffectSlotfv(sid
, param
, values
);
926 ALvoid CDECL
wine_alGetAuxiliaryEffectSloti(ALuint sid
, ALenum param
, ALint
* value
)
928 CurrentCtx
->alGetAuxiliaryEffectSloti(sid
, param
, value
);
931 ALvoid CDECL
wine_alGetAuxiliaryEffectSlotiv(ALuint sid
, ALenum param
, ALint
* values
)
933 CurrentCtx
->alGetAuxiliaryEffectSlotiv(sid
, param
, values
);
937 static const struct FuncList ALCFuncs
[] = {
938 { "alcCreateContext", wine_alcCreateContext
},
939 { "alcMakeContextCurrent", wine_alcMakeContextCurrent
},
940 { "alcProcessContext", wine_alcProcessContext
},
941 { "alcSuspendContext", wine_alcSuspendContext
},
942 { "alcDestroyContext", wine_alcDestroyContext
},
943 { "alcGetCurrentContext", wine_alcGetCurrentContext
},
944 { "alcGetContextsDevice", wine_alcGetContextsDevice
},
945 { "alcOpenDevice", wine_alcOpenDevice
},
946 { "alcCloseDevice", wine_alcCloseDevice
},
947 { "alcGetError", wine_alcGetError
},
948 { "alcIsExtensionPresent", wine_alcIsExtensionPresent
},
949 { "alcGetProcAddress", wine_alcGetProcAddress
},
950 { "alcGetEnumValue", wine_alcGetEnumValue
},
951 { "alcGetString", wine_alcGetString
},
952 { "alcGetIntegerv", wine_alcGetIntegerv
},
953 { "alcCaptureOpenDevice", wine_alcCaptureOpenDevice
},
954 { "alcCaptureCloseDevice", wine_alcCaptureCloseDevice
},
955 { "alcCaptureStart", wine_alcCaptureStart
},
956 { "alcCaptureStop", wine_alcCaptureStop
},
957 { "alcCaptureSamples", wine_alcCaptureSamples
},
960 static const struct FuncList ALFuncs
[] = {
961 { "alEnable", wine_alEnable
},
962 { "alDisable", wine_alDisable
},
963 { "alIsEnabled", wine_alIsEnabled
},
964 { "alGetString", wine_alGetString
},
965 { "alGetBooleanv", wine_alGetBooleanv
},
966 { "alGetIntegerv", wine_alGetIntegerv
},
967 { "alGetFloatv", wine_alGetFloatv
},
968 { "alGetDoublev", wine_alGetDoublev
},
969 { "alGetBoolean", wine_alGetBoolean
},
970 { "alGetInteger", wine_alGetInteger
},
971 { "alGetFloat", wine_alGetFloat
},
972 { "alGetDouble", wine_alGetDouble
},
973 { "alGetError", wine_alGetError
},
974 { "alIsExtensionPresent", wine_alIsExtensionPresent
},
975 { "alGetProcAddress", wine_alGetProcAddress
},
976 { "alGetEnumValue", wine_alGetEnumValue
},
977 { "alListenerf", wine_alListenerf
},
978 { "alListener3f", wine_alListener3f
},
979 { "alListenerfv", wine_alListenerfv
},
980 { "alListeneri", wine_alListeneri
},
981 { "alListener3i", wine_alListener3i
},
982 { "alListeneriv", wine_alListeneriv
},
983 { "alGetListenerf", wine_alGetListenerf
},
984 { "alGetListener3f", wine_alGetListener3f
},
985 { "alGetListenerfv", wine_alGetListenerfv
},
986 { "alGetListeneri", wine_alGetListeneri
},
987 { "alGetListener3i", wine_alGetListener3i
},
988 { "alGetListeneriv", wine_alGetListeneriv
},
989 { "alGenSources", wine_alGenSources
},
990 { "alDeleteSources", wine_alDeleteSources
},
991 { "alIsSource", wine_alIsSource
},
992 { "alSourcef", wine_alSourcef
},
993 { "alSource3f", wine_alSource3f
},
994 { "alSourcefv", wine_alSourcefv
},
995 { "alSourcei", wine_alSourcei
},
996 { "alSource3i", wine_alSource3i
},
997 { "alSourceiv", wine_alSourceiv
},
998 { "alGetSourcef", wine_alGetSourcef
},
999 { "alGetSource3f", wine_alGetSource3f
},
1000 { "alGetSourcefv", wine_alGetSourcefv
},
1001 { "alGetSourcei", wine_alGetSourcei
},
1002 { "alGetSource3i", wine_alGetSource3i
},
1003 { "alGetSourceiv", wine_alGetSourceiv
},
1004 { "alSourcePlayv", wine_alSourcePlayv
},
1005 { "alSourceStopv", wine_alSourceStopv
},
1006 { "alSourceRewindv", wine_alSourceRewindv
},
1007 { "alSourcePausev", wine_alSourcePausev
},
1008 { "alSourcePlay", wine_alSourcePlay
},
1009 { "alSourceStop", wine_alSourceStop
},
1010 { "alSourceRewind", wine_alSourceRewind
},
1011 { "alSourcePause", wine_alSourcePause
},
1012 { "alSourceQueueBuffers", wine_alSourceQueueBuffers
},
1013 { "alSourceUnqueueBuffers", wine_alSourceUnqueueBuffers
},
1014 { "alGenBuffers", wine_alGenBuffers
},
1015 { "alDeleteBuffers", wine_alDeleteBuffers
},
1016 { "alIsBuffer", wine_alIsBuffer
},
1017 { "alBufferData", wine_alBufferData
},
1018 { "alBufferDataStatic", wine_alBufferDataStatic
},
1019 { "alBufferf", wine_alBufferf
},
1020 { "alBuffer3f", wine_alBuffer3f
},
1021 { "alBufferfv", wine_alBufferfv
},
1022 { "alBufferi", wine_alBufferi
},
1023 { "alBuffer3i", wine_alBuffer3i
},
1024 { "alBufferiv", wine_alBufferiv
},
1025 { "alGetBufferf", wine_alGetBufferf
},
1026 { "alGetBuffer3f", wine_alGetBuffer3f
},
1027 { "alGetBufferfv", wine_alGetBufferfv
},
1028 { "alGetBufferi", wine_alGetBufferi
},
1029 { "alGetBuffer3i", wine_alGetBuffer3i
},
1030 { "alGetBufferiv", wine_alGetBufferiv
},
1031 { "alDopplerFactor", wine_alDopplerFactor
},
1032 { "alDopplerVelocity", wine_alDopplerVelocity
},
1033 { "alSpeedOfSound", wine_alSpeedOfSound
},
1034 { "alDistanceModel", wine_alDistanceModel
},
1036 { "alGenFilters", wine_alGenFilters
},
1037 { "alDeleteFilters", wine_alDeleteFilters
},
1038 { "alIsFilter", wine_alIsFilter
},
1039 { "alFilterf", wine_alFilterf
},
1040 { "alFilterfv", wine_alFilterfv
},
1041 { "alFilteri", wine_alFilteri
},
1042 { "alFilteriv", wine_alFilteriv
},
1043 { "alGetFilterf", wine_alGetFilterf
},
1044 { "alGetFilterfv", wine_alGetFilterfv
},
1045 { "alGetFilteri", wine_alGetFilteri
},
1046 { "alGetFilteriv", wine_alGetFilteriv
},
1048 { "alGenEffects", wine_alGenEffects
},
1049 { "alDeleteEffects", wine_alDeleteEffects
},
1050 { "alIsEffect", wine_alIsEffect
},
1051 { "alEffectf", wine_alEffectf
},
1052 { "alEffectfv", wine_alEffectfv
},
1053 { "alEffecti", wine_alEffecti
},
1054 { "alEffectiv", wine_alEffectiv
},
1055 { "alGetEffectf", wine_alGetEffectf
},
1056 { "alGetEffectfv", wine_alGetEffectfv
},
1057 { "alGetEffecti", wine_alGetEffecti
},
1058 { "alGetEffectiv", wine_alGetEffectiv
},
1060 { "alGenAuxiliaryEffectSlots", wine_alGenAuxiliaryEffectSlots
},
1061 { "alDeleteAuxiliaryEffectSlots",wine_alDeleteAuxiliaryEffectSlots
},
1062 { "alIsAuxiliaryEffectSlot", wine_alIsAuxiliaryEffectSlot
},
1063 { "alAuxiliaryEffectSlotf", wine_alAuxiliaryEffectSlotf
},
1064 { "alAuxiliaryEffectSlotfv", wine_alAuxiliaryEffectSlotfv
},
1065 { "alAuxiliaryEffectSloti", wine_alAuxiliaryEffectSloti
},
1066 { "alAuxiliaryEffectSlotiv", wine_alAuxiliaryEffectSlotiv
},
1067 { "alGetAuxiliaryEffectSlotf", wine_alGetAuxiliaryEffectSlotf
},
1068 { "alGetAuxiliaryEffectSlotfv", wine_alGetAuxiliaryEffectSlotfv
},
1069 { "alGetAuxiliaryEffectSloti", wine_alGetAuxiliaryEffectSloti
},
1070 { "alGetAuxiliaryEffectSlotiv", wine_alGetAuxiliaryEffectSlotiv
},