aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-02-21 03:31:24 -0800
committerChris Robinson <[email protected]>2019-02-21 03:31:24 -0800
commit462e320847de3937a5b40a4ed22e3bd745360410 (patch)
tree5f7da09ee37b9facc7cf98885da14366f0a42c0c
parentd95e144c4836311eb6cafa607f609959f48dddd3 (diff)
Make sure the B2A matrix has enough values for the input count
-rw-r--r--Alc/effects/reverb.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index e675ee6b..20ea378a 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -71,11 +71,11 @@ namespace {
* tetrahedron, but it's close enough. Should the model be extended to 8-lines
* in the future, true opposites can be used.
*/
-constexpr alu::Matrix B2A{
- 0.288675134595f, 0.288675134595f, 0.288675134595f, 0.288675134595f,
- 0.288675134595f, -0.288675134595f, -0.288675134595f, 0.288675134595f,
- 0.288675134595f, 0.288675134595f, -0.288675134595f, -0.288675134595f,
- 0.288675134595f, -0.288675134595f, 0.288675134595f, -0.288675134595f
+alignas(16) constexpr ALfloat B2A[NUM_LINES][MAX_AMBI_CHANNELS]{
+ { 0.288675134595f, 0.288675134595f, 0.288675134595f, 0.288675134595f },
+ { 0.288675134595f, -0.288675134595f, -0.288675134595f, 0.288675134595f },
+ { 0.288675134595f, 0.288675134595f, -0.288675134595f, -0.288675134595f },
+ { 0.288675134595f, -0.288675134595f, 0.288675134595f, -0.288675134595f }
};
/* Converts A-Format to B-Format. */
@@ -1321,7 +1321,7 @@ void ReverbState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesI
for(ALsizei c{0};c < NUM_LINES;c++)
{
std::fill(std::begin(afmt[c]), std::end(afmt[c]), 0.0f);
- MixRowSamples(afmt[c], B2A[c].data(), samplesIn, numInput, base, todo);
+ MixRowSamples(afmt[c], B2A[c], samplesIn, numInput, base, todo);
}
/* Process the samples for reverb. */