diff options
author | Chris Robinson <[email protected]> | 2020-12-28 08:37:49 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-28 08:37:49 -0800 |
commit | 96942d7968db88f8462e9fd49e6db3e36804c1bd (patch) | |
tree | fad1c215888bbde78d87f04b596b3394216d0ac8 /alc | |
parent | aae115c35a2b1899cfcaf443aa9a6da9b7647258 (diff) |
Combine multiple functions into one
Diffstat (limited to 'alc')
-rw-r--r-- | alc/alc.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 9ac60ca1..9bfc0b48 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -2439,14 +2439,8 @@ void ALCcontext::init() { if(DefaultEffect.type != AL_EFFECT_NULL && mDevice->Type == DeviceType::Playback) { - mDefaultSlot = std::unique_ptr<ALeffectslot>{new ALeffectslot{}}; - if(mDefaultSlot->init() == AL_NO_ERROR) - aluInitEffectPanning(&mDefaultSlot->mSlot, this); - else - { - mDefaultSlot = nullptr; - ERR("Failed to initialize the default effect slot\n"); - } + mDefaultSlot = std::make_unique<ALeffectslot>(); + aluInitEffectPanning(&mDefaultSlot->mSlot, this); } EffectSlotArray *auxslots; |