aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-12-30 19:17:33 -0800
committerChris Robinson <[email protected]>2019-12-30 19:17:33 -0800
commitd9e3f0edf6262e0812d3aa35f12132124bb4f381 (patch)
tree6edf402d802a67368b8357930125a060532c43a9 /alc
parent28d2294b0782d47f0be9e1479e7eb9ff91ae54f0 (diff)
Avoid declaring a variable early
Diffstat (limited to 'alc')
-rw-r--r--alc/hrtf.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/hrtf.cpp b/alc/hrtf.cpp
index 8d1342fd..36367002 100644
--- a/alc/hrtf.cpp
+++ b/alc/hrtf.cpp
@@ -464,12 +464,11 @@ void BuildBFormatHrtf(const HrtfStore *Hrtf, DirectHrtfState *state,
tmpres.clear();
max_delay -= min_delay;
- ALuint max_length{HRIR_LENGTH};
/* 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 ALuint irsize{minu(Hrtf->irSize + base_delay*2, max_length)};
- max_length = minu(hrir_delay_round(max_delay) + irsize, max_length);
+ const ALuint irsize{minu(Hrtf->irSize + base_delay*2, HRIR_LENGTH)};
+ const ALuint max_length{minu(hrir_delay_round(max_delay) + irsize, HRIR_LENGTH)};
TRACE("Skipped delay: %.2f, max delay: %.2f, new FIR length: %u\n",
min_delay/double{HRIR_DELAY_FRACONE}, max_delay/double{HRIR_DELAY_FRACONE},