aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/vmorpher.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-01 19:44:09 -0700
committerChris Robinson <[email protected]>2019-08-01 19:44:09 -0700
commit33bcced82a1e97811d4212195b6e6ca9cf2242b1 (patch)
tree9431019a2288668260e92cc1522ba686c04f6e0f /alc/effects/vmorpher.cpp
parent4917024c9485d5ed3362ddcb1a0d0f8ee45dfedc (diff)
Use a smart pointer for holding the context's device
Diffstat (limited to 'alc/effects/vmorpher.cpp')
-rw-r--r--alc/effects/vmorpher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/effects/vmorpher.cpp b/alc/effects/vmorpher.cpp
index 95016105..ad0f026b 100644
--- a/alc/effects/vmorpher.cpp
+++ b/alc/effects/vmorpher.cpp
@@ -209,7 +209,7 @@ ALboolean VmorpherState::deviceUpdate(const ALCdevice* /*device*/)
void VmorpherState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target)
{
- const ALCdevice *device{context->mDevice};
+ const ALCdevice *device{context->mDevice.get()};
const ALfloat frequency{static_cast<ALfloat>(device->Frequency)};
const ALfloat step{props->Vmorpher.Rate / static_cast<ALfloat>(device->Frequency)};
mStep = fastf2i(clampf(step*WAVEFORM_FRACONE, 0.0f, ALfloat{WAVEFORM_FRACONE-1}));