zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ALc.c File Reference
#include "config.h"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include <ctype.h>
#include <signal.h>
#include "alMain.h"
#include "alSource.h"
#include "alListener.h"
#include "alThunk.h"
#include "alBuffer.h"
#include "alAuxEffectSlot.h"
#include "alError.h"
#include "bs2b.h"
#include "alu.h"

Go to the source code of this file.

Macros

#define DECL(x)   { #x, (ALCvoid*)(x) }
 
#define DECL(x)   { #x, (x) }
 
#define DECL_APPEND_LIST_FUNC(type)
 
#define DEVICE_FORMAT_REQUEST   (DEVICE_CHANNELS_REQUEST|DEVICE_SAMPLE_TYPE_REQUEST)
 
#define DO_INITCONFIG()   pthread_once(&alc_config_once, alc_initconfig)
 
#define EmptyFuncs   { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
 

Typedefs

typedef struct ALCenums ALCenums
 
typedef struct ALCfunction ALCfunction
 

Functions

static void alc_cleanup (void)
 
static void alc_deinit (void)
 
static void alc_deinit_safe (void)
 
static void alc_init (void)
 
static void alc_initconfig (void)
 
ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice (ALCdevice *Device)
 
ALC_API ALCdevice *ALC_APIENTRY alcCaptureOpenDevice (const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei samples)
 
ALC_API void ALC_APIENTRY alcCaptureSamples (ALCdevice *device, ALCvoid *buffer, ALCsizei samples)
 
ALC_API void ALC_APIENTRY alcCaptureStart (ALCdevice *device)
 
ALC_API void ALC_APIENTRY alcCaptureStop (ALCdevice *device)
 
ALC_API ALCboolean ALC_APIENTRY alcCloseDevice (ALCdevice *Device)
 
void ALCcontext_DecRef (ALCcontext *context)
 
void ALCcontext_IncRef (ALCcontext *context)
 
ALC_API ALCcontext *ALC_APIENTRY alcCreateContext (ALCdevice *device, const ALCint *attrList)
 
ALC_API ALCvoid ALC_APIENTRY alcDestroyContext (ALCcontext *context)
 
void ALCdevice_DecRef (ALCdevice *device)
 
ALint64 ALCdevice_GetLatencyDefault (ALCdevice *device)
 
void ALCdevice_IncRef (ALCdevice *device)
 
void ALCdevice_LockDefault (ALCdevice *device)
 
void ALCdevice_UnlockDefault (ALCdevice *device)
 
ALC_API ALCdevice *ALC_APIENTRY alcGetContextsDevice (ALCcontext *Context)
 
ALC_API ALCcontext *ALC_APIENTRY alcGetCurrentContext (void)
 
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue (ALCdevice *device, const ALCchar *enumName)
 
ALC_API ALCenum ALC_APIENTRY alcGetError (ALCdevice *device)
 
ALC_API ALCvoid ALC_APIENTRY alcGetIntegerv (ALCdevice *device, ALCenum param, ALsizei size, ALCint *data)
 
ALC_API ALCvoid *ALC_APIENTRY alcGetProcAddress (ALCdevice *device, const ALCchar *funcName)
 
ALC_API const ALCchar *ALC_APIENTRY alcGetString (ALCdevice *Device, ALCenum param)
 
ALC_API ALCcontext *ALC_APIENTRY alcGetThreadContext (void)
 
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent (ALCdevice *device, const ALCchar *extName)
 
ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT (ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type)
 
ALC_API ALCdevice *ALC_APIENTRY alcLoopbackOpenDeviceSOFT (const ALCchar *deviceName)
 
ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent (ALCcontext *context)
 
ALC_API ALCdevice *ALC_APIENTRY alcOpenDevice (const ALCchar *deviceName)
 
ALC_API ALCvoid ALC_APIENTRY alcProcessContext (ALCcontext *Context)
 
ALC_API void ALC_APIENTRY alcRenderSamplesSOFT (ALCdevice *device, ALCvoid *buffer, ALCsizei samples)
 
static void alcSetError (ALCdevice *device, ALCenum errorCode)
 
ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext (ALCcontext *context)
 
ALC_API ALCvoid ALC_APIENTRY alcSuspendContext (ALCcontext *Context)
 
static void AppendList (const ALCchar *name, ALCchar **List, size_t *ListSize)
 
ALuint BytesFromDevFmt (enum DevFmtType type)
 
ALuint ChannelsFromDevFmt (enum DevFmtChannels chans)
 
static ALboolean DecomposeDevFormat (ALenum format, enum DevFmtChannels *chans, enum DevFmtType *type)
 
const ALCcharDevFmtChannelsString (enum DevFmtChannels chans)
 
const ALCcharDevFmtTypeString (enum DevFmtType type)
 
static ALCvoid FreeContext (ALCcontext *context)
 
static ALCvoid FreeDevice (ALCdevice *device)
 
ALCcontextGetContextRef (void)
 
static ALvoid InitContext (ALCcontext *Context)
 
static ALCboolean IsValidALCChannels (ALCenum channels)
 
static ALCboolean IsValidALCType (ALCenum type)
 
static void LockLists (void)
 
static void ProbeAllDevicesList (void)
 
static void ProbeCaptureDeviceList (void)
 
static void ProbeList (ALCchar **list, size_t *listsize, enum DevProbe type)
 
static void ReleaseContext (ALCcontext *context, ALCdevice *device)
 
static void ReleaseThreadCtx (void *ptr)
 
void SetDefaultChannelOrder (ALCdevice *device)
 
void SetDefaultWFXChannelOrder (ALCdevice *device)
 
static void UnlockLists (void)
 
static ALCenum UpdateDeviceParams (ALCdevice *device, const ALCint *attrList)
 
static ALCcontextVerifyContext (ALCcontext *context)
 
static ALCdeviceVerifyDevice (ALCdevice *device)
 

Variables

static pthread_once_t alc_config_once = PTHREAD_ONCE_INIT
 
static ALCcharalcAllDevicesList
 
static size_t alcAllDevicesListSize
 
static ALCcharalcCaptureDefaultDeviceSpecifier
 
static ALCcharalcCaptureDeviceList
 
static size_t alcCaptureDeviceListSize
 
static ALCcharalcDefaultAllDevicesSpecifier
 
static const ALCchar alcDefaultName [] = "OpenAL Soft\0"
 
static const ALCint alcEFXMajorVersion = 1
 
static const ALCint alcEFXMinorVersion = 0
 
static const ALCchar alcErrInvalidContext [] = "Invalid Context"
 
static const ALCchar alcErrInvalidDevice [] = "Invalid Device"
 
static const ALCchar alcErrInvalidEnum [] = "Invalid Enum"
 
static const ALCchar alcErrInvalidValue [] = "Invalid Value"
 
static const ALCchar alcErrOutOfMemory [] = "Out of Memory"
 
static const ALCchar alcExtensionList []
 
static const ALCfunction alcFunctions []
 
static const ALCint alcMajorVersion = 1
 
static const ALCint alcMinorVersion = 1
 
static const ALCchar alcNoDeviceExtList []
 
static const ALCchar alcNoError [] = "No Error"
 
static const ALchar alExtList []
 
static struct BackendInfo BackendList []
 
static struct BackendInfo BackendLoopback
 
static struct BackendInfo CaptureBackend
 
static ALeffect DefaultEffect
 
static ALCdevice *volatile DeviceList = NULL
 
static const ALCenums enumeration []
 
static ALCcontext *volatile GlobalContext = NULL
 
static volatile ALCenum LastNullDeviceError = ALC_NO_ERROR
 
static CRITICAL_SECTION ListLock
 
static pthread_key_t LocalContext
 
FILE * LogFile
 
enum LogLevel LogLevel = LogError
 
static struct BackendInfo PlaybackBackend
 
ALint RTPrioLevel
 
static ALCboolean TrapALCError = ALC_FALSE
 

Macro Definition Documentation

#define DECL (   x)    { #x, (ALCvoid*)(x) }

Definition at line 274 of file ALc.c.

#define DECL (   x)    { #x, (x) }

Definition at line 274 of file ALc.c.

#define DECL_APPEND_LIST_FUNC (   type)
Value:
void Append##type##List(const ALCchar *name) \
{ AppendList(name, &alc##type##List, &alc##type##ListSize); }
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
Definition: gl2ext.h:845
EGLImageKHR EGLint * name
Definition: eglext.h:284
char ALCchar
Definition: alc.h:42
static void AppendList(const ALCchar *name, ALCchar **List, size_t *ListSize)
Definition: ALc.c:1102

Definition at line 1123 of file ALc.c.

#define DEVICE_FORMAT_REQUEST   (DEVICE_CHANNELS_REQUEST|DEVICE_SAMPLE_TYPE_REQUEST)

Referenced by alcOpenDevice().

#define DO_INITCONFIG ( )    pthread_once(&alc_config_once, alc_initconfig)

Definition at line 1014 of file ALc.c.

Referenced by alcCaptureOpenDevice(), alcLoopbackOpenDeviceSOFT(), alcOpenDevice(), and ProbeList().

#define EmptyFuncs   { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }

OpenAL cross platform audio library Copyright (C) 1999-2007 by authors. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Or go to http://www.gnu.org/copyleft/lgpl.html

Definition at line 45 of file ALc.c.

Typedef Documentation

typedef struct ALCenums ALCenums
typedef struct ALCfunction ALCfunction

Function Documentation

static void alc_cleanup ( void  )
static

Definition at line 1020 of file ALc.c.

References ERR, free, ALCdevice_struct::next, and NULL.

Referenced by alc_deinit(), and alc_deinit_safe().

static void alc_deinit ( void  )
static
static void alc_deinit_safe ( void  )
static

Definition at line 1044 of file ALc.c.

References alc_cleanup(), DeleteCriticalSection(), FreeALConfig(), FreeHrtfs(), NULL, and ThunkExit().

Referenced by alc_deinit().

static void alc_init ( void  )
static

Definition at line 763 of file ALc.c.

References ConeScale, InitializeCriticalSection(), NULL, ReleaseThreadCtx(), str, ThunkInit(), and ZScale.

void ALCcontext_DecRef ( ALCcontext context)

Definition at line 1949 of file ALc.c.

References FreeContext(), ALCcontext_struct::ref, and TRACEREF.

Referenced by alAuxiliaryEffectSlotf(), alAuxiliaryEffectSlotfv(), alAuxiliaryEffectSloti(), alAuxiliaryEffectSlotiv(), alBuffer3f(), alBuffer3i(), alBufferData(), alBufferf(), alBufferfv(), alBufferi(), alBufferiv(), alBufferSamplesSOFT(), alBufferSubDataSOFT(), alBufferSubSamplesSOFT(), alcGetContextsDevice(), alcMakeContextCurrent(), alcSetThreadContext(), alDeferUpdatesSOFT(), alDeleteAuxiliaryEffectSlots(), alDeleteBuffers(), alDeleteEffects(), alDeleteFilters(), alDeleteSources(), alDisable(), alDistanceModel(), alDopplerFactor(), alDopplerVelocity(), alEffectf(), alEffectfv(), alEffecti(), alEffectiv(), alEnable(), alFilterf(), alFilterfv(), alFilteri(), alFilteriv(), alGenAuxiliaryEffectSlots(), alGenBuffers(), alGenEffects(), alGenFilters(), alGenSources(), alGetAuxiliaryEffectSlotf(), alGetAuxiliaryEffectSlotfv(), alGetAuxiliaryEffectSloti(), alGetAuxiliaryEffectSlotiv(), alGetBoolean(), alGetBooleanv(), alGetBuffer3f(), alGetBuffer3i(), alGetBufferf(), alGetBufferfv(), alGetBufferi(), alGetBufferiv(), alGetBufferSamplesSOFT(), alGetDouble(), alGetDoublev(), alGetEffectf(), alGetEffectfv(), alGetEffecti(), alGetEffectiv(), alGetError(), alGetFilterf(), alGetFilterfv(), alGetFilteri(), alGetFilteriv(), alGetFloat(), alGetFloatv(), alGetInteger(), alGetIntegerv(), alGetListener3f(), alGetListener3i(), alGetListenerf(), alGetListenerfv(), alGetListeneri(), alGetListeneriv(), alGetSource3dSOFT(), alGetSource3f(), alGetSource3i(), alGetSource3i64SOFT(), alGetSourcedSOFT(), alGetSourcedvSOFT(), alGetSourcef(), alGetSourcefv(), alGetSourcei(), alGetSourcei64SOFT(), alGetSourcei64vSOFT(), alGetSourceiv(), alGetString(), alIsAuxiliaryEffectSlot(), alIsBuffer(), alIsBufferFormatSupportedSOFT(), alIsEffect(), alIsEnabled(), alIsExtensionPresent(), alIsFilter(), alIsSource(), alListener3f(), alListener3i(), alListenerf(), alListenerfv(), alListeneri(), alListeneriv(), alProcessUpdatesSOFT(), alSource3dSOFT(), alSource3f(), alSource3i(), alSource3i64SOFT(), alSourcedSOFT(), alSourcedvSOFT(), alSourcef(), alSourcefv(), alSourcei(), alSourcei64SOFT(), alSourcei64vSOFT(), alSourceiv(), alSourcePausev(), alSourcePlayv(), alSourceQueueBuffers(), alSourceRewindv(), alSourceStopv(), alSourceUnqueueBuffers(), alSpeedOfSound(), ReleaseContext(), and ReleaseThreadCtx().

void ALCcontext_IncRef ( ALCcontext context)

Definition at line 1942 of file ALc.c.

References ALCcontext_struct::ref, and TRACEREF.

Referenced by GetContextRef(), and VerifyContext().

ALint64 ALCdevice_GetLatencyDefault ( ALCdevice device)

Definition at line 1285 of file ALc.c.

void ALCdevice_IncRef ( ALCdevice device)

Definition at line 1781 of file ALc.c.

References ALCdevice_struct::ref, and TRACEREF.

Referenced by alcCreateContext(), and VerifyDevice().

void ALCdevice_LockDefault ( ALCdevice device)

Definition at line 1277 of file ALc.c.

References EnterCriticalSection(), and ALCdevice_struct::Mutex.

void ALCdevice_UnlockDefault ( ALCdevice device)

Definition at line 1281 of file ALc.c.

References LeaveCriticalSection(), and ALCdevice_struct::Mutex.

ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice ( ALCcontext Context)
ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext ( void  )

Definition at line 2563 of file ALc.c.

References GlobalContext.

Referenced by CloseAL(), and main().

ALC_API ALCenum ALC_APIENTRY alcGetEnumValue ( ALCdevice device,
const ALCchar enumName 
)

Definition at line 2437 of file ALc.c.

References ALC_INVALID_VALUE, ALCdevice_DecRef(), alcSetError(), i, and VerifyDevice().

Referenced by alGetEnumValue().

ALC_API ALCenum ALC_APIENTRY alcGetError ( ALCdevice device)

Error support.

Obtain the most recent Device error.

Definition at line 2027 of file ALc.c.

References ALC_NO_ERROR, ALCdevice_DecRef(), ALCdevice_struct::LastError, and VerifyDevice().

Referenced by checkALCErrors().

ALC_API ALCvoid* ALC_APIENTRY alcGetProcAddress ( ALCdevice device,
const ALCchar funcName 
)

Definition at line 2411 of file ALc.c.

References ALC_INVALID_VALUE, ALCdevice_DecRef(), alcSetError(), i, NULL, and VerifyDevice().

Referenced by alGetProcAddress().

ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext ( void  )

Definition at line 2577 of file ALc.c.

ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent ( ALCdevice device,
const ALCchar extname 
)

Extension support.

Query for the presence of an extension, and obtain any appropriate function pointers and enum values.

Definition at line 2373 of file ALc.c.

References ALC_FALSE, ALC_INVALID_VALUE, ALC_TRUE, ALCdevice_DecRef(), alcNoDeviceExtList, alcSetError(), NULL, and VerifyDevice().

Referenced by main(), printALCInfo(), and printEFXInfo().

ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent ( ALCcontext context)

Definition at line 2590 of file ALc.c.

References ALC_FALSE, ALC_INVALID_CONTEXT, ALC_TRUE, ALCcontext_DecRef(), alcSetError(), NULL, and VerifyContext().

Referenced by CloseAL(), InitAL(), and main().

ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice ( const ALCchar devicename)

Device management.

Definition at line 2658 of file ALc.c.

References al_calloc(), AL_EFFECT_NULL, al_free(), AL_NO_ERROR, ALC_INVALID_VALUE, ALC_NO_ERROR, ALC_OUT_OF_MEMORY, ALC_TRUE, ALCdevice_OpenPlayback, alcSetError(), ALeffectState_Destroy, ALCdevice_struct::AuxiliaryEffectSlotMax, ALCdevice_struct::Bs2b, ALCdevice_struct::Bs2bLevel, ALCdevice_struct::BufferMap, clampu(), ConfigValueInt(), ConfigValueStr(), ConfigValueUInt(), ALCdevice_struct::Connected, ALCdevice_struct::ContextList, COUNTOF, CPU_CAP_SSE, CPUCapFlags, DEFAULT_OUTPUT_RATE, ALCdevice_struct::DefaultSlot, DeleteCriticalSection(), DevFmtByte, DevFmtChannelsDefault, DevFmtFloat, DevFmtInt, DevFmtMono, DevFmtQuad, DevFmtShort, DevFmtStereo, DevFmtTypeDefault, DevFmtUByte, DevFmtUInt, DevFmtUShort, DevFmtX51, DevFmtX61, DevFmtX71, DEVICE_CHANNELS_REQUEST, DEVICE_FORMAT_REQUEST, DEVICE_FREQUENCY_REQUEST, DEVICE_SAMPLE_TYPE_REQUEST, DeviceList, ALCdevice_struct::DeviceName, DO_INITCONFIG, ALCdevice_struct::EffectMap, ALeffectslot::EffectState, ERR, ALCdevice_struct::FilterMap, ALCdevice_struct::Flags, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, formats, ALCdevice_struct::Frequency, BackendInfo::Funcs, ALCdevice_struct::Funcs, i, InitEffectSlot(), InitializeCriticalSection(), InitializeEffect(), InitUIntMap(), ALCdevice_struct::LastError, MAX_SENDS, ALCdevice_struct::MaxNoOfSources, maxu(), MIN_OUTPUT_RATE, ALCdevice_struct::Mutex, BackendInfo::name, ALCdevice_struct::next, NULL, ALCdevice_struct::NumAuxSends, ALCdevice_struct::NumMonoSources, ALCdevice_struct::NumStereoSources, ALCdevice_struct::NumUpdates, Playback, PlaybackBackend, ALCdevice_struct::ref, TRACE, ALeffect::type, ALCdevice_struct::Type, and ALCdevice_struct::UpdateSize.

Referenced by InitAL(), and main().

ALC_API ALCvoid ALC_APIENTRY alcProcessContext ( ALCcontext Context)

Definition at line 2056 of file ALc.c.

ALC_API void ALC_APIENTRY alcRenderSamplesSOFT ( ALCdevice device,
ALCvoid buffer,
ALCsizei  samples 
)
ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext ( ALCcontext context)
ALC_API ALCvoid ALC_APIENTRY alcSuspendContext ( ALCcontext Context)

Definition at line 2047 of file ALc.c.

static void AppendList ( const ALCchar name,
ALCchar **  List,
size_t ListSize 
)
static

Definition at line 1102 of file ALc.c.

References ERR, memcpy, and realloc.

ALCcontext* GetContextRef ( void  )

Definition at line 1999 of file ALc.c.

References ALCcontext_IncRef(), context, GlobalContext, LockLists(), and UnlockLists().

Referenced by alAuxiliaryEffectSlotf(), alAuxiliaryEffectSlotfv(), alAuxiliaryEffectSloti(), alAuxiliaryEffectSlotiv(), alBuffer3f(), alBuffer3i(), alBufferData(), alBufferf(), alBufferfv(), alBufferi(), alBufferiv(), alBufferSamplesSOFT(), alBufferSubDataSOFT(), alBufferSubSamplesSOFT(), alDeferUpdatesSOFT(), alDeleteAuxiliaryEffectSlots(), alDeleteBuffers(), alDeleteEffects(), alDeleteFilters(), alDeleteSources(), alDisable(), alDistanceModel(), alDopplerFactor(), alDopplerVelocity(), alEffectf(), alEffectfv(), alEffecti(), alEffectiv(), alEnable(), alFilterf(), alFilterfv(), alFilteri(), alFilteriv(), alGenAuxiliaryEffectSlots(), alGenBuffers(), alGenEffects(), alGenFilters(), alGenSources(), alGetAuxiliaryEffectSlotf(), alGetAuxiliaryEffectSlotfv(), alGetAuxiliaryEffectSloti(), alGetAuxiliaryEffectSlotiv(), alGetBoolean(), alGetBooleanv(), alGetBuffer3f(), alGetBuffer3i(), alGetBufferf(), alGetBufferfv(), alGetBufferi(), alGetBufferiv(), alGetBufferSamplesSOFT(), alGetDouble(), alGetDoublev(), alGetEffectf(), alGetEffectfv(), alGetEffecti(), alGetEffectiv(), alGetError(), alGetFilterf(), alGetFilterfv(), alGetFilteri(), alGetFilteriv(), alGetFloat(), alGetFloatv(), alGetInteger(), alGetIntegerv(), alGetListener3f(), alGetListener3i(), alGetListenerf(), alGetListenerfv(), alGetListeneri(), alGetListeneriv(), alGetSource3dSOFT(), alGetSource3f(), alGetSource3i(), alGetSource3i64SOFT(), alGetSourcedSOFT(), alGetSourcedvSOFT(), alGetSourcef(), alGetSourcefv(), alGetSourcei(), alGetSourcei64SOFT(), alGetSourcei64vSOFT(), alGetSourceiv(), alGetString(), alIsAuxiliaryEffectSlot(), alIsBuffer(), alIsBufferFormatSupportedSOFT(), alIsEffect(), alIsEnabled(), alIsExtensionPresent(), alIsFilter(), alIsSource(), alListener3f(), alListener3i(), alListenerf(), alListenerfv(), alListeneri(), alListeneriv(), alProcessUpdatesSOFT(), alSource3dSOFT(), alSource3f(), alSource3i(), alSource3i64SOFT(), alSourcedSOFT(), alSourcedvSOFT(), alSourcef(), alSourcefv(), alSourcei(), alSourcei64SOFT(), alSourcei64vSOFT(), alSourceiv(), alSourcePausev(), alSourcePlayv(), alSourceQueueBuffers(), alSourceRewindv(), alSourceStopv(), alSourceUnqueueBuffers(), and alSpeedOfSound().

static ALCboolean IsValidALCChannels ( ALCenum  channels)
static
static void ProbeAllDevicesList ( void  )
static

Definition at line 1096 of file ALc.c.

References ALL_DEVICE_PROBE, and ProbeList().

Referenced by alcGetString().

static void ProbeCaptureDeviceList ( void  )
static

Definition at line 1098 of file ALc.c.

References CAPTURE_DEVICE_PROBE, and ProbeList().

Referenced by alcGetString().

static void ProbeList ( ALCchar **  list,
size_t listsize,
enum DevProbe  type 
)
static
static void ReleaseContext ( ALCcontext context,
ALCdevice device 
)
static
static void ReleaseThreadCtx ( void ptr)
static

Definition at line 1957 of file ALc.c.

References ALCcontext_DecRef(), and WARN.

Referenced by alc_init().

static ALCenum UpdateDeviceParams ( ALCdevice device,
const ALCint attrList 
)
static

Definition at line 1419 of file ALc.c.

References AL_FALSE, ALC_FALSE, ALC_FORMAT_CHANNELS_SOFT, ALC_FORMAT_TYPE_SOFT, ALC_FREQUENCY, ALC_INVALID_DEVICE, ALC_INVALID_VALUE, ALC_MAX_AUXILIARY_SENDS, ALC_NO_ERROR, ALC_STEREO_SOURCES, ALCdevice_Lock, ALCdevice_ResetPlayback, ALCdevice_StartPlayback, ALCdevice_StopPlayback, ALCdevice_Unlock, ALeffectState_DeviceUpdate, ALeffectState_Update, ALsource_Update, aluInitPanning(), UIntMap::array, ALCdevice_struct::Bs2b, bs2b_clear(), bs2b_set_level(), bs2b_set_srate(), ALCdevice_struct::Bs2bLevel, BytesFromDevFmt(), calloc, ChannelsFromDevFmt(), ConfigValueUInt(), context, ALCdevice_struct::ContextList, CPU_CAP_SSE, CPUCapFlags, ALCdevice_struct::DefaultSlot, DevFmtChannelsString(), DevFmtTypeString(), DEVICE_CHANNELS_REQUEST, DEVICE_FREQUENCY_REQUEST, DEVICE_RUNNING, DEVICE_SAMPLE_TYPE_REQUEST, DEVICE_WIDE_STEREO, ALCcontext_struct::EffectSlotMap, ALeffectslot::EffectState, ERR, ALCdevice_struct::Flags, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, free, ALCdevice_struct::Frequency, ALsource::Gain, ALsource::GainHF, GetConfigValueBool(), GetHrtf(), ALCdevice_struct::Hrtf, i, IsValidALCChannels(), IsValidALCType(), LockUIntMapRead(), Loopback, MAX_SENDS, MaxChannels, ALCdevice_struct::MaxNoOfSources, maxu(), MIN_OUTPUT_RATE, minu(), ALeffectslot::NeedsUpdate, ALsource::NeedsUpdate, ALCcontext_struct::next, NULL, ALCdevice_struct::NumAuxSends, ALCdevice_struct::NumMonoSources, ALCdevice_struct::NumStereoSources, ALCdevice_struct::NumUpdates, ALeffectslot::ref, RestoreFPUMode(), ALsource::Send, SetMixerFPUMode(), UIntMap::size, ALsource::Slot, ALCcontext_struct::SourceMap, TRACE, ALCdevice_struct::Type, UnlockUIntMapRead(), ALCdevice_struct::UpdateSize, ALCcontext_struct::UpdateSources, UIntMap::value, and WARN.

Referenced by alcCreateContext().

Variable Documentation

pthread_once_t alc_config_once = PTHREAD_ONCE_INIT
static

Definition at line 643 of file ALc.c.

ALCchar* alcAllDevicesList
static

Definition at line 603 of file ALc.c.

Referenced by alcGetString().

size_t alcAllDevicesListSize
static

Definition at line 606 of file ALc.c.

ALCchar* alcCaptureDefaultDeviceSpecifier
static

Definition at line 611 of file ALc.c.

Referenced by alcGetString().

ALCchar* alcCaptureDeviceList
static

Definition at line 604 of file ALc.c.

Referenced by alcGetString().

size_t alcCaptureDeviceListSize
static

Definition at line 607 of file ALc.c.

ALCchar* alcDefaultAllDevicesSpecifier
static

Definition at line 610 of file ALc.c.

Referenced by alcGetString().

const ALCchar alcDefaultName[] = "OpenAL Soft\0"
static

Definition at line 602 of file ALc.c.

Referenced by alcGetString().

const ALCint alcEFXMajorVersion = 1
static

Definition at line 662 of file ALc.c.

Referenced by alcGetIntegerv().

const ALCint alcEFXMinorVersion = 0
static

Definition at line 663 of file ALc.c.

Referenced by alcGetIntegerv().

const ALCchar alcErrInvalidContext[] = "Invalid Context"
static

Definition at line 591 of file ALc.c.

Referenced by alcGetString().

const ALCchar alcErrInvalidDevice[] = "Invalid Device"
static

Definition at line 590 of file ALc.c.

Referenced by alcGetString().

const ALCchar alcErrInvalidEnum[] = "Invalid Enum"
static

Definition at line 592 of file ALc.c.

Referenced by alcGetString().

const ALCchar alcErrInvalidValue[] = "Invalid Value"
static

Definition at line 593 of file ALc.c.

Referenced by alcGetString().

const ALCchar alcErrOutOfMemory[] = "Out of Memory"
static

Definition at line 594 of file ALc.c.

Referenced by alcGetString().

const ALCchar alcExtensionList[]
static
Initial value:
=
"ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE "
"ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX "
"ALC_EXT_thread_local_context ALC_SOFT_loopback"

Definition at line 655 of file ALc.c.

Referenced by alcGetString().

const ALCfunction alcFunctions[]
static

Definition at line 110 of file ALc.c.

const ALCint alcMajorVersion = 1
static

Definition at line 659 of file ALc.c.

Referenced by alcGetIntegerv().

const ALCint alcMinorVersion = 1
static

Definition at line 660 of file ALc.c.

Referenced by alcGetIntegerv().

const ALCchar alcNoDeviceExtList[]
static
Initial value:
=
"ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE "
"ALC_EXT_thread_local_context ALC_SOFT_loopback"

Definition at line 652 of file ALc.c.

Referenced by alcGetString(), and alcIsExtensionPresent().

const ALCchar alcNoError[] = "No Error"
static

Definition at line 589 of file ALc.c.

Referenced by alcGetString().

const ALchar alExtList[]
static
Initial value:
=
"AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 "
"AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW "
"AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model "
"AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data "
"AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points "
"AL_SOFT_source_latency"

Definition at line 614 of file ALc.c.

Referenced by InitContext().

struct BackendInfo BackendList[]
static

Definition at line 46 of file ALc.c.

struct BackendInfo BackendLoopback
static
Initial value:
= {
}
ALCboolean alc_loopback_init(BackendFuncs *func_list)
Definition: loopback.c:75
#define EmptyFuncs
Definition: ALc.c:45
void alc_loopback_probe(enum DevProbe type)
Definition: loopback.c:85
void alc_loopback_deinit(void)
Definition: loopback.c:81

Definition at line 88 of file ALc.c.

struct BackendInfo CaptureBackend
static

Definition at line 94 of file ALc.c.

Referenced by alc_deinit(), alc_initconfig(), alcCaptureOpenDevice(), and ProbeList().

ALeffect DefaultEffect
static

Definition at line 646 of file ALc.c.

const ALCenums enumeration[]
static

Definition at line 275 of file ALc.c.

ALCcontext* volatile GlobalContext = NULL
static

Definition at line 627 of file ALc.c.

Referenced by alcGetCurrentContext(), and GetContextRef().

volatile ALCenum LastNullDeviceError = ALC_NO_ERROR
static

Definition at line 622 of file ALc.c.

CRITICAL_SECTION ListLock
static

Definition at line 671 of file ALc.c.

pthread_key_t LocalContext
static

Definition at line 625 of file ALc.c.

FILE* LogFile

Definition at line 632 of file ALc.c.

Referenced by al_print().

Definition at line 636 of file ALc.c.

struct BackendInfo PlaybackBackend
static

Definition at line 93 of file ALc.c.

Referenced by alc_deinit(), alc_initconfig(), alcOpenDevice(), and ProbeList().

ALint RTPrioLevel

Definition at line 630 of file ALc.c.

Referenced by SetRTPriority().

ALCboolean TrapALCError = ALC_FALSE
static

Definition at line 640 of file ALc.c.