Rename GetReffedContext to GetContextRef
This commit is contained in:
parent
a32a3bcda8
commit
9fb91f70aa
@ -1431,12 +1431,12 @@ ALCcontext *GetLockedContext(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GetReffedContext(void)
|
* GetContextRef
|
||||||
*
|
*
|
||||||
* Returns the currently active Context, and add a reference to it without
|
* Returns the currently active Context, and adds a reference to it without
|
||||||
* locking
|
* locking
|
||||||
*/
|
*/
|
||||||
ALCcontext *GetReffedContext(void)
|
ALCcontext *GetContextRef(void)
|
||||||
{
|
{
|
||||||
ALCcontext *context;
|
ALCcontext *context;
|
||||||
|
|
||||||
|
@ -639,7 +639,7 @@ ALvoid *StartThread(ALuint (*func)(ALvoid*), ALvoid *ptr);
|
|||||||
ALuint StopThread(ALvoid *thread);
|
ALuint StopThread(ALvoid *thread);
|
||||||
|
|
||||||
ALCcontext *GetLockedContext(void);
|
ALCcontext *GetLockedContext(void);
|
||||||
ALCcontext *GetReffedContext(void);
|
ALCcontext *GetContextRef(void);
|
||||||
|
|
||||||
typedef struct RingBuffer RingBuffer;
|
typedef struct RingBuffer RingBuffer;
|
||||||
RingBuffer *CreateRingBuffer(ALsizei frame_size, ALsizei length);
|
RingBuffer *CreateRingBuffer(ALsizei frame_size, ALsizei length);
|
||||||
|
@ -45,7 +45,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
|
|||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALCdevice *Device;
|
ALCdevice *Device;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return;
|
if(!Context) return;
|
||||||
|
|
||||||
Device = Context->Device;
|
Device = Context->Device;
|
||||||
@ -123,7 +123,7 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effect
|
|||||||
ALeffectslot *EffectSlot;
|
ALeffectslot *EffectSlot;
|
||||||
ALsizei i;
|
ALsizei i;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return;
|
if(!Context) return;
|
||||||
|
|
||||||
if(n < 0)
|
if(n < 0)
|
||||||
@ -173,7 +173,7 @@ AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot)
|
|||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALboolean result;
|
ALboolean result;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return AL_FALSE;
|
if(!Context) return AL_FALSE;
|
||||||
|
|
||||||
result = (LookupEffectSlot(Context->EffectSlotMap, effectslot) ?
|
result = (LookupEffectSlot(Context->EffectSlotMap, effectslot) ?
|
||||||
|
@ -265,7 +265,7 @@ AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer)
|
|||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALboolean result;
|
ALboolean result;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return AL_FALSE;
|
if(!Context) return AL_FALSE;
|
||||||
|
|
||||||
result = ((!buffer || LookupBuffer(Context->Device->BufferMap, buffer)) ?
|
result = ((!buffer || LookupBuffer(Context->Device->BufferMap, buffer)) ?
|
||||||
|
@ -143,7 +143,7 @@ AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect)
|
|||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALboolean result;
|
ALboolean result;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return AL_FALSE;
|
if(!Context) return AL_FALSE;
|
||||||
|
|
||||||
result = ((!effect || LookupEffect(Context->Device->EffectMap, effect)) ?
|
result = ((!effect || LookupEffect(Context->Device->EffectMap, effect)) ?
|
||||||
|
@ -24,12 +24,12 @@
|
|||||||
#include "AL/alc.h"
|
#include "AL/alc.h"
|
||||||
#include "alError.h"
|
#include "alError.h"
|
||||||
|
|
||||||
AL_API ALenum AL_APIENTRY alGetError(ALvoid)
|
AL_API ALenum AL_APIENTRY alGetError(void)
|
||||||
{
|
{
|
||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALenum errorCode;
|
ALenum errorCode;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return AL_INVALID_OPERATION;
|
if(!Context) return AL_INVALID_OPERATION;
|
||||||
|
|
||||||
errorCode = ExchangeInt(&Context->LastError, AL_NO_ERROR);
|
errorCode = ExchangeInt(&Context->LastError, AL_NO_ERROR);
|
||||||
|
@ -139,7 +139,7 @@ AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter)
|
|||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALboolean result;
|
ALboolean result;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return AL_FALSE;
|
if(!Context) return AL_FALSE;
|
||||||
|
|
||||||
result = ((!filter || LookupFilter(Context->Device->FilterMap, filter)) ?
|
result = ((!filter || LookupFilter(Context->Device->FilterMap, filter)) ?
|
||||||
|
@ -61,7 +61,7 @@ AL_API ALvoid AL_APIENTRY alGenSources(ALsizei n,ALuint *sources)
|
|||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALCdevice *Device;
|
ALCdevice *Device;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return;
|
if(!Context) return;
|
||||||
|
|
||||||
Device = Context->Device;
|
Device = Context->Device;
|
||||||
@ -114,7 +114,7 @@ AL_API ALvoid AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources)
|
|||||||
ALsizei i, j;
|
ALsizei i, j;
|
||||||
ALbufferlistitem *BufferList;
|
ALbufferlistitem *BufferList;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return;
|
if(!Context) return;
|
||||||
|
|
||||||
if(n < 0)
|
if(n < 0)
|
||||||
@ -190,7 +190,7 @@ AL_API ALboolean AL_APIENTRY alIsSource(ALuint source)
|
|||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
ALboolean result;
|
ALboolean result;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return AL_FALSE;
|
if(!Context) return AL_FALSE;
|
||||||
|
|
||||||
result = (LookupSource(Context->SourceMap, source) ? AL_TRUE : AL_FALSE);
|
result = (LookupSource(Context->SourceMap, source) ? AL_TRUE : AL_FALSE);
|
||||||
|
@ -577,7 +577,7 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
|
|||||||
{
|
{
|
||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return;
|
if(!Context) return;
|
||||||
|
|
||||||
if(!Context->DeferUpdates)
|
if(!Context->DeferUpdates)
|
||||||
@ -628,7 +628,7 @@ AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void)
|
|||||||
{
|
{
|
||||||
ALCcontext *Context;
|
ALCcontext *Context;
|
||||||
|
|
||||||
Context = GetReffedContext();
|
Context = GetContextRef();
|
||||||
if(!Context) return;
|
if(!Context) return;
|
||||||
|
|
||||||
if(ExchangeInt(&Context->DeferUpdates, AL_FALSE))
|
if(ExchangeInt(&Context->DeferUpdates, AL_FALSE))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user