diff options
author | Chris Robinson <[email protected]> | 2011-07-17 02:34:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-07-17 02:34:35 -0700 |
commit | 887de0523f2f8e8b3005c2a2957becf2a7c4be56 (patch) | |
tree | 92743557a671602f04fc44372e475d5ecad8952d /Alc | |
parent | a7a1f802a80955dda90d8dfdeb7e549e541d5f01 (diff) |
Scale the delay down once for the post-stepping mix loop
Diffstat (limited to 'Alc')
-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; \ |