aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-16 17:29:32 -0700
committerChris Robinson <[email protected]>2020-04-16 17:29:32 -0700
commit27ac637a66df64c4135b77ee123d1a02076b08a0 (patch)
treefb91318537aaa071000c1f4b340ed3822c01bc12 /alc/alc.cpp
parentcf4a848fd0c42e85e5ce68e33120386d932e6375 (diff)
Remove another unnecessary return value
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 021097a3..e8c23476 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2214,21 +2214,17 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
TRACE("Fixed device latency: %" PRId64 "ns\n", int64_t{device->FixedLatency.count()});
- /* Need to delay returning failure until the Send arrays have been cleared. */
- bool update_failed{false};
FPUCtl mixer_mode{};
for(ALCcontext *context : *device->mContexts.load())
{
- if(context->mDefaultSlot && !update_failed)
+ if(ALeffectslot *slot{context->mDefaultSlot.get()})
{
- ALeffectslot *slot{context->mDefaultSlot.get()};
aluInitEffectPanning(slot, device);
EffectState *state{slot->Effect.State};
state->mOutTarget = device->Dry.Buffer;
- update_failed = !state->deviceUpdate(device);
- if(!update_failed)
- UpdateEffectSlotProps(slot, context);
+ state->deviceUpdate(device);
+ UpdateEffectSlotProps(slot, context);
}
std::unique_lock<std::mutex> proplock{context->mPropLock};
@@ -2237,7 +2233,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
std::fill_n(curarray->end(), curarray->size(), nullptr);
for(auto &sublist : context->mEffectSlotList)
{
- if(update_failed) break;
uint64_t usemask{~sublist.FreeMask};
while(usemask)
{
@@ -2249,8 +2244,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
EffectState *state{slot->Effect.State};
state->mOutTarget = device->Dry.Buffer;
- update_failed = !state->deviceUpdate(device);
- if(update_failed) break;
+ state->deviceUpdate(device);
UpdateEffectSlotProps(slot, context);
}
}
@@ -2380,8 +2374,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
UpdateAllSourceProps(context);
}
mixer_mode.leave();
- if(update_failed)
- return ALC_INVALID_DEVICE;
if(!device->Flags.get<DevicePaused>())
{