aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-28 09:29:20 -0700
committerChris Robinson <[email protected]>2019-03-28 09:34:31 -0700
commitdfb81ff42de27b474d27e5d9e30c8fbe538db5ca (patch)
tree8bc8f3b53eaa6e2fc52b5d5c5d75f9dfeb69a888 /OpenAL32
parente7bfe1ebd00fe01514f590f4b143c676034fcf6e (diff)
Avoid using the HRTF history buffer as a ring buffer
The HRTF mixers now get a full input buffer with the history prepended, so the delay offsets just need to account for the start point and read forward for each sample.
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index fe3a8bdc..3226e582 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -30,6 +30,7 @@
#include "alnumeric.h"
#include "threads.h"
#include "ambidefs.h"
+#include "hrtf.h"
template<typename T, size_t N>
@@ -402,7 +403,10 @@ struct ALCdevice {
alignas(16) ALfloat SourceData[BUFFERSIZE + MAX_RESAMPLE_PADDING*2];
alignas(16) ALfloat ResampledData[BUFFERSIZE];
alignas(16) ALfloat FilteredData[BUFFERSIZE];
- alignas(16) ALfloat NfcSampleData[BUFFERSIZE];
+ union {
+ alignas(16) ALfloat HrtfSourceData[BUFFERSIZE + HRTF_HISTORY_LENGTH];
+ alignas(16) ALfloat NfcSampleData[BUFFERSIZE];
+ };
/* Mixing buffer used by the Dry mix and Real output. */
al::vector<std::array<ALfloat,BUFFERSIZE>, 16> MixBuffer;