aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
Diffstat (limited to 'al')
-rw-r--r--al/auxeffectslot.cpp10
-rw-r--r--al/buffer.cpp40
-rw-r--r--al/effect.cpp22
-rw-r--r--al/event.cpp3
-rw-r--r--al/filter.cpp22
-rw-r--r--al/source.cpp32
6 files changed, 64 insertions, 65 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp
index b4e93858..912765fc 100644
--- a/al/auxeffectslot.cpp
+++ b/al/auxeffectslot.cpp
@@ -114,7 +114,7 @@ void AddActiveEffectSlots(const ALuint *slotids, ALsizei count, ALCcontext *cont
}
curarray = context->mActiveAuxSlots.exchange(newarray, std::memory_order_acq_rel);
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
while((device->MixCount.load(std::memory_order_acquire)&1))
std::this_thread::yield();
delete curarray;
@@ -150,7 +150,7 @@ void RemoveActiveEffectSlots(const ALuint *slotids, ALsizei count, ALCcontext *c
}
curarray = context->mActiveAuxSlots.exchange(newarray, std::memory_order_acq_rel);
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
while((device->MixCount.load(std::memory_order_acquire)&1))
std::this_thread::yield();
delete curarray;
@@ -159,7 +159,7 @@ void RemoveActiveEffectSlots(const ALuint *slotids, ALsizei count, ALCcontext *c
ALeffectslot *AllocEffectSlot(ALCcontext *context)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{context->mEffectSlotLock};
if(context->mNumEffectSlots >= device->AuxiliaryEffectSlotMax)
{
@@ -376,7 +376,7 @@ START_API_FUNC
switch(param)
{
case AL_EFFECTSLOT_EFFECT:
- device = context->mDevice;
+ device = context->mDevice.get();
{ std::lock_guard<std::mutex> ___{device->EffectLock};
ALeffect *effect{value ? LookupEffect(device, value) : nullptr};
@@ -644,7 +644,7 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect
if(!State) return AL_OUT_OF_MEMORY;
FPUCtl mixer_mode{};
- ALCdevice *Device{Context->mDevice};
+ ALCdevice *Device{Context->mDevice.get()};
std::unique_lock<std::mutex> statelock{Device->StateLock};
State->mOutTarget = Device->Dry.Buffer;
if(State->deviceUpdate(Device) == AL_FALSE)
diff --git a/al/buffer.cpp b/al/buffer.cpp
index 173c76bd..a068399c 100644
--- a/al/buffer.cpp
+++ b/al/buffer.cpp
@@ -246,7 +246,7 @@ constexpr ALbitfieldSOFT INVALID_MAP_FLAGS{~unsigned(AL_MAP_READ_BIT_SOFT | AL_M
ALbuffer *AllocBuffer(ALCcontext *context)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
auto sublist = std::find_if(device->BufferList.begin(), device->BufferList.end(),
[](const BufferSubList &entry) noexcept -> bool
@@ -656,7 +656,7 @@ START_API_FUNC
if(UNLIKELY(n == 0))
return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
/* First try to find any buffers that are invalid or in-use. */
@@ -699,7 +699,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(LIKELY(context))
{
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(!buffer || LookupBuffer(device, buffer))
return AL_TRUE;
@@ -720,7 +720,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -754,7 +754,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return nullptr;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -806,7 +806,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -829,7 +829,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -861,7 +861,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -989,7 +989,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(UNLIKELY(LookupBuffer(device, buffer) == nullptr))
@@ -1009,7 +1009,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(UNLIKELY(LookupBuffer(device, buffer) == nullptr))
@@ -1028,7 +1028,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(UNLIKELY(LookupBuffer(device, buffer) == nullptr))
@@ -1050,7 +1050,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1085,7 +1085,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(UNLIKELY(LookupBuffer(device, buffer) == nullptr))
@@ -1115,7 +1115,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1153,7 +1153,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
@@ -1175,7 +1175,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(UNLIKELY(LookupBuffer(device, buffer) == nullptr))
@@ -1203,7 +1203,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(UNLIKELY(LookupBuffer(device, buffer) == nullptr))
@@ -1225,7 +1225,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
if(UNLIKELY(!albuf))
@@ -1270,7 +1270,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
if(UNLIKELY(LookupBuffer(device, buffer) == nullptr))
context->setError(AL_INVALID_NAME, "Invalid buffer ID %u", buffer);
@@ -1305,7 +1305,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device = context->mDevice;
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->BufferLock};
ALbuffer *albuf = LookupBuffer(device, buffer);
if(UNLIKELY(!albuf))
diff --git a/al/effect.cpp b/al/effect.cpp
index 2d72916e..15200a88 100644
--- a/al/effect.cpp
+++ b/al/effect.cpp
@@ -138,7 +138,7 @@ void InitEffectParams(ALeffect *effect, ALenum type)
ALeffect *AllocEffect(ALCcontext *context)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
auto sublist = std::find_if(device->EffectList.begin(), device->EffectList.end(),
[](const EffectSubList &entry) noexcept -> bool
@@ -269,7 +269,7 @@ START_API_FUNC
if(UNLIKELY(n == 0))
return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
/* First try to find any effects that are invalid. */
@@ -307,7 +307,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(LIKELY(context))
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
if(!effect || LookupEffect(device, effect))
return AL_TRUE;
@@ -322,7 +322,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
ALeffect *aleffect{LookupEffect(device, effect)};
@@ -372,7 +372,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.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};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
ALeffect *aleffect{LookupEffect(device, effect)};
@@ -412,7 +412,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
ALeffect *aleffect{LookupEffect(device, effect)};
@@ -432,7 +432,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
@@ -464,7 +464,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
@@ -484,7 +484,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
@@ -504,7 +504,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->EffectLock};
const ALeffect *aleffect{LookupEffect(device, effect)};
diff --git a/al/event.cpp b/al/event.cpp
index 75827b59..06a2e008 100644
--- a/al/event.cpp
+++ b/al/event.cpp
@@ -120,7 +120,6 @@ void StartEventThrd(ALCcontext *ctx)
void StopEventThrd(ALCcontext *ctx)
{
- static constexpr AsyncEvent kill_evt{EventType_KillThread};
RingBuffer *ring{ctx->mAsyncEvents.get()};
auto evt_data = ring->getWriteVector().first;
if(evt_data.len == 0)
@@ -130,7 +129,7 @@ void StopEventThrd(ALCcontext *ctx)
evt_data = ring->getWriteVector().first;
} while(evt_data.len == 0);
}
- new (evt_data.buf) AsyncEvent{kill_evt};
+ new (evt_data.buf) AsyncEvent{EventType_KillThread};
ring->writeAdvance(1);
ctx->mEventSem.post();
diff --git a/al/filter.cpp b/al/filter.cpp
index 5009daae..b52267f1 100644
--- a/al/filter.cpp
+++ b/al/filter.cpp
@@ -278,7 +278,7 @@ void InitFilterParams(ALfilter *filter, ALenum type)
ALfilter *AllocFilter(ALCcontext *context)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
auto sublist = std::find_if(device->FilterList.begin(), device->FilterList.end(),
[](const FilterSubList &entry) noexcept -> bool
@@ -410,7 +410,7 @@ START_API_FUNC
if(UNLIKELY(n == 0))
return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
/* First try to find any filters that are invalid. */
@@ -448,7 +448,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(LIKELY(context))
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
if(!filter || LookupFilter(device, filter))
return AL_TRUE;
@@ -464,7 +464,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -502,7 +502,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -522,7 +522,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -542,7 +542,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -562,7 +562,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -594,7 +594,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -614,7 +614,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
@@ -634,7 +634,7 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{device->FilterLock};
ALfilter *alfilt{LookupFilter(device, filter)};
diff --git a/al/source.cpp b/al/source.cpp
index 1e0940de..5ba36524 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -175,7 +175,7 @@ void UpdateSourceProps(const ALsource *source, ALvoice *voice, ALCcontext *conte
*/
int64_t GetSourceSampleOffset(ALsource *Source, ALCcontext *context, std::chrono::nanoseconds *clocktime)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
const ALbufferlistitem *Current;
uint64_t readPos;
ALuint refcount;
@@ -221,7 +221,7 @@ int64_t GetSourceSampleOffset(ALsource *Source, ALCcontext *context, std::chrono
*/
ALdouble GetSourceSecOffset(ALsource *Source, ALCcontext *context, std::chrono::nanoseconds *clocktime)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
const ALbufferlistitem *Current;
uint64_t readPos;
ALuint refcount;
@@ -281,7 +281,7 @@ ALdouble GetSourceSecOffset(ALsource *Source, ALCcontext *context, std::chrono::
*/
ALdouble GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *context)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
const ALbufferlistitem *Current;
ALuint readPos;
ALsizei readPosFrac;
@@ -483,7 +483,7 @@ ALboolean ApplyOffset(ALsource *Source, ALvoice *voice)
ALsource *AllocSource(ALCcontext *context)
{
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
std::lock_guard<std::mutex> _{context->mSourceLock};
if(context->mNumSources >= device->SourcesMax)
{
@@ -545,7 +545,7 @@ void FreeSource(ALCcontext *context, ALsource *source)
ALsizei lidx = id >> 6;
ALsizei slidx = id & 0x3f;
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
BackendUniqueLock backlock{*device->Backend};
if(ALvoice *voice{GetSourceVoice(source, context)})
{
@@ -1126,7 +1126,7 @@ ALboolean SetSourcefv(ALsource *Source, ALCcontext *Context, SourceProp prop, co
if(IsPlayingOrPaused(Source))
{
- ALCdevice *device{Context->mDevice};
+ ALCdevice *device{Context->mDevice.get()};
BackendLockGuard _{*device->Backend};
/* Double-check that the source is still playing while we have
* the lock.
@@ -1230,7 +1230,7 @@ ALboolean SetSourcefv(ALsource *Source, ALCcontext *Context, SourceProp prop, co
ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, const ALint *values)
{
- ALCdevice *device{Context->mDevice};
+ ALCdevice *device{Context->mDevice.get()};
ALbuffer *buffer{nullptr};
ALfilter *filter{nullptr};
ALeffectslot *slot{nullptr};
@@ -1346,7 +1346,7 @@ ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, co
if(IsPlayingOrPaused(Source))
{
- ALCdevice *device{Context->mDevice};
+ ALCdevice *device{Context->mDevice.get()};
BackendLockGuard _{*device->Backend};
if(ALvoice *voice{GetSourceVoice(Source, Context)})
{
@@ -1662,7 +1662,7 @@ ALboolean GetSourcei64v(ALsource *Source, ALCcontext *Context, SourceProp prop,
ALboolean GetSourcedv(ALsource *Source, ALCcontext *Context, SourceProp prop, ALdouble *values)
{
- ALCdevice *device{Context->mDevice};
+ ALCdevice *device{Context->mDevice.get()};
ClockLatency clocktime;
std::chrono::nanoseconds srcclock;
ALint ivals[3];
@@ -1995,7 +1995,7 @@ ALboolean GetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, AL
ALboolean GetSourcei64v(ALsource *Source, ALCcontext *Context, SourceProp prop, ALint64SOFT *values)
{
- ALCdevice *device = Context->mDevice;
+ ALCdevice *device = Context->mDevice.get();
ClockLatency clocktime;
std::chrono::nanoseconds srcclock;
ALdouble dvals[6];
@@ -2780,7 +2780,7 @@ START_API_FUNC
SETERR_RETURN(context, AL_INVALID_NAME,, "Invalid source ID %u", sources[i]);
}
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
BackendLockGuard __{*device->Backend};
/* If the device is disconnected, go right to stopped. */
if(UNLIKELY(!device->Connected.load(std::memory_order_acquire)))
@@ -3041,7 +3041,7 @@ START_API_FUNC
SETERR_RETURN(context, AL_INVALID_NAME,, "Invalid source ID %u", sources[i]);
}
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
BackendLockGuard __{*device->Backend};
auto pause_source = [&context](ALsource *source) -> void
{
@@ -3096,7 +3096,7 @@ START_API_FUNC
SETERR_RETURN(context, AL_INVALID_NAME,, "Invalid source ID %u", sources[i]);
}
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
BackendLockGuard __{*device->Backend};
auto stop_source = [&context](ALsource *source) -> void
{
@@ -3158,7 +3158,7 @@ START_API_FUNC
SETERR_RETURN(context, AL_INVALID_NAME,, "Invalid source ID %u", sources[i]);
}
- ALCdevice *device{context->mDevice};
+ ALCdevice *device{context->mDevice.get()};
BackendLockGuard __{*device->Backend};
auto rewind_source = [&context](ALsource *source) -> void
{
@@ -3207,7 +3207,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};
+ ALCdevice *device{context->mDevice.get()};
ALbuffer *BufferFmt{nullptr};
ALbufferlistitem *BufferList{source->queue};
while(BufferList)
@@ -3319,7 +3319,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};
+ ALCdevice *device{context->mDevice.get()};
ALbuffer *BufferFmt{nullptr};
ALbufferlistitem *BufferList{source->queue};
while(BufferList)