diff options
-rw-r--r-- | Alc/mixer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index 665ef3f8..d68b6567 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -170,14 +170,16 @@ static void Mix_Hrtf_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ Counter--; \ } \ \ + Delay[0] >>= 16; \ + Delay[1] >>= 16; \ for(;BufferIdx < BufferSize;BufferIdx++) \ { \ value = sampler(data + pos*NumChannels + i, NumChannels, frac); \ value = lpFilter2P(DryFilter, i, value); \ \ History[Offset&SRC_HISTORY_MASK] = value; \ - left = History[(Offset-(Delay[0]>>16))&SRC_HISTORY_MASK]; \ - right = History[(Offset-(Delay[1]>>16))&SRC_HISTORY_MASK]; \ + left = History[(Offset-Delay[0])&SRC_HISTORY_MASK]; \ + right = History[(Offset-Delay[1])&SRC_HISTORY_MASK]; \ \ Values[Offset&HRIR_MASK][0] = 0.0f; \ Values[Offset&HRIR_MASK][1] = 0.0f; \ @@ -204,8 +206,8 @@ static void Mix_Hrtf_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ value = lpFilter2PC(DryFilter, i, value); \ \ History[Offset&SRC_HISTORY_MASK] = value; \ - left = History[(Offset-(Delay[0]>>16))&SRC_HISTORY_MASK]; \ - right = History[(Offset-(Delay[1]>>16))&SRC_HISTORY_MASK]; \ + left = History[(Offset-Delay[0])&SRC_HISTORY_MASK]; \ + right = History[(Offset-Delay[1])&SRC_HISTORY_MASK]; \ \ PendingClicks[FRONT_LEFT] += Values[(Offset+1)&HRIR_MASK][0] + \ Coeffs[0][0] * left; \ |