aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2019-06-04 20:27:32 -0700
committerChris Robinson <chris.kcat@gmail.com>2019-06-04 20:27:32 -0700
commitb2735331c021081878ef3a6aaede39c59348f19b (patch)
treedec4d16b35bc6901ed23102ea29ee95858b39f59 /Alc
parent9d861406c06d44f4b39e25f3a4deabdf11242ea1 (diff)
Use a 16-sample base delay for the B-Format decoder IRs
Diffstat (limited to 'Alc')
-rw-r--r--Alc/hrtf.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp
index 0980dcb6..438997ad 100644
--- a/Alc/hrtf.cpp
+++ b/Alc/hrtf.cpp
@@ -332,10 +332,10 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz
};
std::transform(AmbiPoints, AmbiPoints+AmbiCount, idx.begin(), calc_idxs);
- /* For dual-band processing, add a 12-sample delay to compensate for the HF
+ /* For dual-band processing, add a 16-sample delay to compensate for the HF
* scale on the minimum-phase response.
*/
- static constexpr ALsizei base_delay{DualBand ? 12 : 0};
+ static constexpr ALsizei base_delay{DualBand ? 16 : 0};
const ALdouble xover_norm{400.0 / Hrtf->sampleRate};
BandSplitterR<double> splitter{xover_norm};
@@ -435,10 +435,10 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz
tmpres.clear();
ALsizei max_length{HRIR_LENGTH};
- /* Increase the IR size by 24 samples with dual-band processing to account
- * for the head and tail from the HF response scale.
+ /* Increase the IR size by double the base delay with dual-band processing
+ * to account for the head and tail from the HF response scale.
*/
- const ALsizei irsize{DualBand ? mini(Hrtf->irSize + base_delay*2, max_length) : Hrtf->irSize};
+ const ALsizei irsize{mini(Hrtf->irSize + base_delay*2, max_length)};
max_length = mini(max_delay-min_delay + irsize, max_length);
/* Round up to the next IR size multiple. */