aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/chorus.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/chorus.cpp
parent4917024c9485d5ed3362ddcb1a0d0f8ee45dfedc (diff)
Use a smart pointer for holding the context's device
Diffstat (limited to 'alc/effects/chorus.cpp')
-rw-r--r--alc/effects/chorus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp
index 31f10c81..5966d3bd 100644
--- a/alc/effects/chorus.cpp
+++ b/alc/effects/chorus.cpp
@@ -157,7 +157,7 @@ void ChorusState::update(const ALCcontext *Context, const ALeffectslot *Slot, co
/* The LFO depth is scaled to be relative to the sample delay. Clamp the
* delay and depth to allow enough padding for resampling.
*/
- const ALCdevice *device{Context->mDevice};
+ const ALCdevice *device{Context->mDevice.get()};
const auto frequency = static_cast<ALfloat>(device->Frequency);
mDelay = maxi(float2int(props->Chorus.Delay*frequency*FRACTIONONE + 0.5f), mindelay);
mDepth = minf(props->Chorus.Depth * mDelay, static_cast<ALfloat>(mDelay - mindelay));