aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-24 08:28:13 -0700
committerChris Robinson <[email protected]>2021-04-24 08:28:13 -0700
commitb54bb388a3dbd92518beef4bda03df5854aad1a9 (patch)
tree8cde0be5ca02b61ae81bf0c3ccdd3a2439b1923a /al
parent519672c8e54585bc6d827dd3efed943e06b3e6cd (diff)
Create a base the ALCdevice and ALCcontext structs
A base that contains the API-agnostic data, with ALCdevice and ALCcontext being for AL-specific data.
Diffstat (limited to 'al')
-rw-r--r--al/auxeffectslot.cpp8
-rw-r--r--al/buffer.cpp48
-rw-r--r--al/effect.cpp22
-rw-r--r--al/filter.cpp22
-rw-r--r--al/source.cpp22
5 files changed, 61 insertions, 61 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp
index 0b64f9da..3ee0a46e 100644
--- a/al/auxeffectslot.cpp
+++ b/al/auxeffectslot.cpp
@@ -325,7 +325,7 @@ START_API_FUNC
if UNLIKELY(n <= 0) return;
std::unique_lock<std::mutex> slotlock{context->mEffectSlotLock};
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
if(static_cast<ALuint>(n) > device->AuxiliaryEffectSlotMax-context->mNumEffectSlots)
{
context->setError(AL_OUT_OF_MEMORY, "Exceeding %u effect slot limit (%u + %d)",
@@ -571,7 +571,7 @@ START_API_FUNC
switch(param)
{
case AL_EFFECTSLOT_EFFECT:
- device = context->mDevice.get();
+ device = context->mALDevice.get();
{
std::lock_guard<std::mutex> ___{device->EffectLock};
@@ -639,7 +639,7 @@ START_API_FUNC
break;
case AL_BUFFER:
- device = context->mDevice.get();
+ device = context->mALDevice.get();
if(slot->mState == SlotState::Playing)
SETERR_RETURN(context, AL_INVALID_OPERATION,,
@@ -946,7 +946,7 @@ ALenum ALeffectslot::initEffect(ALeffect *effect, ALCcontext *context)
}
al::intrusive_ptr<EffectState> state{factory->create()};
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::unique_lock<std::mutex> statelock{device->StateLock};
state->mOutTarget = device->Dry.Buffer;
{
diff --git a/al/buffer.cpp b/al/buffer.cpp
index 6b82ce7f..906b40fc 100644
--- a/al/buffer.cpp
+++ b/al/buffer.cpp
@@ -782,7 +782,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Generating %d buffers", n);
if UNLIKELY(n <= 0) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(!EnsureBuffers(device, static_cast<ALuint>(n)))
{
@@ -822,7 +822,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Deleting %d buffers", n);
if UNLIKELY(n <= 0) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
/* First try to find any buffers that are invalid or in-use. */
@@ -862,7 +862,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if LIKELY(context)
{
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(!buffer || LookupBuffer(device, buffer))
return AL_TRUE;
@@ -883,7 +883,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -917,7 +917,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return nullptr;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -970,7 +970,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -993,7 +993,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1025,7 +1025,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1155,7 +1155,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
@@ -1175,7 +1175,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
@@ -1194,7 +1194,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
@@ -1216,7 +1216,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1278,7 +1278,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
@@ -1311,7 +1311,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1349,7 +1349,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1371,7 +1371,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
@@ -1399,7 +1399,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
@@ -1421,7 +1421,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
if UNLIKELY(!albuf)
@@ -1478,7 +1478,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
context->setError(AL_INVALID_NAME, "Invalid buffer ID %u", buffer);
@@ -1516,7 +1516,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
if UNLIKELY(!albuf)
@@ -1544,7 +1544,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1574,7 +1574,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
if UNLIKELY(!albuf)
@@ -1602,7 +1602,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
context->setError(AL_INVALID_NAME, "Invalid buffer ID %u", buffer);
@@ -1630,7 +1630,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if UNLIKELY(LookupBuffer(device, buffer) == nullptr)
context->setError(AL_INVALID_NAME, "Invalid buffer ID %u", buffer);
diff --git a/al/effect.cpp b/al/effect.cpp
index 93aa5547..645e41df 100644
--- a/al/effect.cpp
+++ b/al/effect.cpp
@@ -233,7 +233,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Generating %d effects", n);
if UNLIKELY(n <= 0) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
if(!EnsureEffects(device, static_cast<ALuint>(n)))
{
@@ -273,7 +273,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Deleting %d effects", n);
if UNLIKELY(n <= 0) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
/* First try to find any effects that are invalid. */
@@ -304,7 +304,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if LIKELY(context)
{
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
if(!effect || LookupEffect(device, effect))
return AL_TRUE;
@@ -319,7 +319,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
ALeffect *aleffect{LookupEffect(device, effect)};
@@ -369,7 +369,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
ALeffect *aleffect{LookupEffect(device, effect)};
@@ -392,7 +392,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
ALeffect *aleffect{LookupEffect(device, effect)};
@@ -415,7 +415,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
ALeffect *aleffect{LookupEffect(device, effect)};
@@ -438,7 +438,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
@@ -470,7 +470,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
@@ -493,7 +493,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
@@ -516,7 +516,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
diff --git a/al/filter.cpp b/al/filter.cpp
index 1e7edbc2..c3391193 100644
--- a/al/filter.cpp
+++ b/al/filter.cpp
@@ -408,7 +408,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Generating %d filters", n);
if UNLIKELY(n <= 0) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
if(!EnsureFilters(device, static_cast<ALuint>(n)))
{
@@ -448,7 +448,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Deleting %d filters", n);
if UNLIKELY(n <= 0) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
/* First try to find any filters that are invalid. */
@@ -479,7 +479,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if LIKELY(context)
{
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
if(!filter || LookupFilter(device, filter))
return AL_TRUE;
@@ -495,7 +495,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -536,7 +536,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -559,7 +559,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -582,7 +582,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -605,7 +605,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
const ALfilter *alfilt{LookupFilter(device, filter)};
@@ -640,7 +640,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
const ALfilter *alfilt{LookupFilter(device, filter)};
@@ -663,7 +663,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
const ALfilter *alfilt{LookupFilter(device, filter)};
@@ -686,7 +686,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
const ALfilter *alfilt{LookupFilter(device, filter)};
diff --git a/al/source.cpp b/al/source.cpp
index 20de0809..69120bac 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -183,7 +183,7 @@ void UpdateSourceProps(const ALsource *source, Voice *voice, ALCcontext *context
*/
int64_t GetSourceSampleOffset(ALsource *Source, ALCcontext *context, nanoseconds *clocktime)
{
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
const VoiceBufferItem *Current{};
uint64_t readPos{};
ALuint refcount;
@@ -222,7 +222,7 @@ int64_t GetSourceSampleOffset(ALsource *Source, ALCcontext *context, nanoseconds
*/
double GetSourceSecOffset(ALsource *Source, ALCcontext *context, nanoseconds *clocktime)
{
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
const VoiceBufferItem *Current{};
uint64_t readPos{};
ALuint refcount;
@@ -271,7 +271,7 @@ double GetSourceSecOffset(ALsource *Source, ALCcontext *context, nanoseconds *cl
*/
double GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *context)
{
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
const VoiceBufferItem *Current{};
ALuint readPos{};
ALuint readPosFrac{};
@@ -540,7 +540,7 @@ VoiceChange *GetVoiceChanger(ALCcontext *ctx)
void SendVoiceChanges(ALCcontext *ctx, VoiceChange *tail)
{
- ALCdevice *device{ctx->mDevice.get()};
+ ALCdevice *device{ctx->mALDevice.get()};
VoiceChange *oldhead{ctx->mCurrentVoiceChange.load(std::memory_order_acquire)};
while(VoiceChange *next{oldhead->mNext.load(std::memory_order_relaxed)})
@@ -1248,7 +1248,7 @@ bool SetSourcefv(ALsource *Source, ALCcontext *Context, SourceProp prop, const a
auto vpos = GetSampleOffset(Source->mQueue, prop, values[0]);
if(!vpos) SETERR_RETURN(Context, AL_INVALID_VALUE, false, "Invalid offset");
- if(SetVoiceOffset(voice, *vpos, Source, Context, Context->mDevice.get()))
+ if(SetVoiceOffset(voice, *vpos, Source, Context, Context->mALDevice.get()))
return true;
}
Source->OffsetType = prop;
@@ -1350,7 +1350,7 @@ bool SetSourcefv(ALsource *Source, ALCcontext *Context, SourceProp prop, const a
bool SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, const al::span<const int> values)
{
- ALCdevice *device{Context->mDevice.get()};
+ ALCdevice *device{Context->mALDevice.get()};
ALeffectslot *slot{nullptr};
al::deque<ALbufferQueueItem> oldlist;
std::unique_lock<std::mutex> slotlock;
@@ -1794,7 +1794,7 @@ bool GetSourcei64v(ALsource *Source, ALCcontext *Context, SourceProp prop, const
bool GetSourcedv(ALsource *Source, ALCcontext *Context, SourceProp prop, const al::span<double> values)
{
- ALCdevice *device{Context->mDevice.get()};
+ ALCdevice *device{Context->mALDevice.get()};
ClockLatency clocktime;
nanoseconds srcclock;
int ivals[MaxValues];
@@ -2174,7 +2174,7 @@ bool GetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, const a
bool GetSourcei64v(ALsource *Source, ALCcontext *Context, SourceProp prop, const al::span<int64_t> values)
{
- ALCdevice *device = Context->mDevice.get();
+ ALCdevice *device{Context->mALDevice.get()};
ClockLatency clocktime;
nanoseconds srcclock;
double dvals[MaxValues];
@@ -2332,7 +2332,7 @@ START_API_FUNC
if UNLIKELY(n <= 0) return;
std::unique_lock<std::mutex> srclock{context->mSourceLock};
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
if(static_cast<ALuint>(n) > device->SourcesMax-context->mNumSources)
{
context->setError(AL_OUT_OF_MEMORY, "Exceeding %u source limit (%u + %d)",
@@ -2924,7 +2924,7 @@ START_API_FUNC
++sources;
}
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
/* If the device is disconnected, go right to stopped. */
if UNLIKELY(!device->Connected.load(std::memory_order_acquire))
{
@@ -3302,7 +3302,7 @@ START_API_FUNC
SETERR_RETURN(context, AL_INVALID_OPERATION,, "Queueing onto static source %u", src);
/* Check for a valid Buffer, for its frequency and format */
- ALCdevice *device{context->mDevice.get()};
+ ALCdevice *device{context->mALDevice.get()};
ALbuffer *BufferFmt{nullptr};
for(auto &item : source->mQueue)
{