aboutsummaryrefslogtreecommitdiffstats
path: root/alc/voice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/voice.cpp')
-rw-r--r--alc/voice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/alc/voice.cpp b/alc/voice.cpp
index 0e92e423..7d4f638c 100644
--- a/alc/voice.cpp
+++ b/alc/voice.cpp
@@ -468,7 +468,10 @@ void DoHrtfMix(const float *samples, const ALuint DstBufferSize, DirectParams &p
ALCdevice *Device)
{
auto &HrtfSamples = Device->HrtfSourceData;
- auto &AccumSamples = Device->HrtfAccumData;
+ /* Source HRTF mixing needs to include the direct delay so it remains
+ * aligned with the direct mix's HRTF filtering.
+ */
+ float2 *AccumSamples{Device->HrtfAccumData + HRTF_DIRECT_DELAY};
/* Copy the HRTF history and new input samples into a temp buffer. */
auto src_iter = std::copy(parms.Hrtf.History.begin(), parms.Hrtf.History.end(),