From 0406e3bef75bd42e310f147fc3f9589859140f3f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 10 May 2020 20:16:43 -0700 Subject: Change a couple functions into member functions --- alc/alc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'alc') diff --git a/alc/alc.cpp b/alc/alc.cpp index e7cd65b2..258d3de3 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -2230,7 +2230,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) EffectState *state{slot->Effect.State}; state->mOutTarget = device->Dry.Buffer; state->deviceUpdate(device); - UpdateEffectSlotProps(slot, context); + slot->updateProps(context); } std::unique_lock proplock{context->mPropLock}; @@ -2251,7 +2251,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) EffectState *state{slot->Effect.State}; state->mOutTarget = device->Dry.Buffer; state->deviceUpdate(device); - UpdateEffectSlotProps(slot, context); + slot->updateProps(context); } } slotlock.unlock(); @@ -2563,7 +2563,7 @@ void ALCcontext::init() if(DefaultEffect.type != AL_EFFECT_NULL && mDevice->Type == Playback) { mDefaultSlot = std::unique_ptr{new ALeffectslot{}}; - if(InitEffectSlot(mDefaultSlot.get()) == AL_NO_ERROR) + if(mDefaultSlot->init() == AL_NO_ERROR) aluInitEffectPanning(mDefaultSlot.get(), mDevice.get()); else { @@ -3462,10 +3462,10 @@ START_API_FUNC ContextList.emplace(iter, context.get()); } - if(context->mDefaultSlot) + if(ALeffectslot *slot{context->mDefaultSlot.get()}) { - if(InitializeEffect(context.get(), context->mDefaultSlot.get(), &DefaultEffect) == AL_NO_ERROR) - UpdateEffectSlotProps(context->mDefaultSlot.get(), context.get()); + if(slot->initEffect(&DefaultEffect, context.get()) == AL_NO_ERROR) + slot->updateProps(context.get()); else ERR("Failed to initialize the default effect\n"); } -- cgit v1.2.3