aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-12-23 23:00:59 -0800
committerChris Robinson <[email protected]>2019-12-23 23:00:59 -0800
commitbff6696814d96f5f493343b08ab364ac9f8dd97e (patch)
tree6bde1721553c0bc8fc30d93dbdd8f39ffb3203e6 /alc
parent16220be86eaf934287d377095b008221e5a990b5 (diff)
Avoid reading a struct field twice
Diffstat (limited to 'alc')
-rw-r--r--alc/alu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index fc3555bf..9923496f 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -1927,13 +1927,13 @@ void aluMixData(ALCdevice *device, void *OutBuffer, const ALuint NumSamples,
const al::span<FloatBufferLine> RealOut{device->RealOut.Buffer};
/* Apply front image stablization for surround sound, if applicable. */
- if(device->Stablizer)
+ if(FrontStablizer *stablizer{device->Stablizer.get()})
{
const ALuint lidx{GetChannelIdxByName(device->RealOut, FrontLeft)};
const ALuint ridx{GetChannelIdxByName(device->RealOut, FrontRight)};
const ALuint cidx{GetChannelIdxByName(device->RealOut, FrontCenter)};
- ApplyStablizer(device->Stablizer.get(), RealOut, lidx, ridx, cidx, SamplesToDo);
+ ApplyStablizer(stablizer, RealOut, lidx, ridx, cidx, SamplesToDo);
}
/* Apply compression, limiting sample amplitude if needed or desired. */