Skip to content

Commit

Permalink
Don't do geometric reflections for the late reverb
Browse files Browse the repository at this point in the history
At this point, the vector all-pass is already applying a diffusion-based
scattering matrix, which the geometric reflections would compound with.
  • Loading branch information
kcat committed Feb 10, 2024
1 parent e11ea97 commit 606a970
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions alc/effects/reverb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1423,8 +1423,8 @@ inline auto VectorPartialScatter(const std::array<float,NUM_LINES> &RESTRICT in,
};
}

/* Utilizes the above, but also applies a geometric reflection on the input
* channels.
/* Utilizes the above, but also applies a line-based reflection on the input
* channels (swapping 0<->3 and 1<->2).
*/
void VectorScatterRev(const float xCoeff, const float yCoeff,
const al::span<ReverbUpdateLine,NUM_LINES> samples, const size_t count) noexcept
Expand All @@ -1434,14 +1434,8 @@ void VectorScatterRev(const float xCoeff, const float yCoeff,
for(size_t i{0u};i < count;++i)
{
std::array src{samples[0][i], samples[1][i], samples[2][i], samples[3][i]};
const std::array f{
(src[0] - src[1] - src[2] - src[3]) * 0.5f,
(src[1] - src[0] - src[2] - src[3]) * 0.5f,
(src[2] - src[0] - src[1] - src[3]) * 0.5f,
(src[3] - src[0] - src[1] - src[2] ) * 0.5f
};

src = VectorPartialScatter(f, xCoeff, yCoeff);
src = VectorPartialScatter(std::array{src[3], src[2], src[1], src[0]}, xCoeff, yCoeff);
samples[0][i] = src[0];
samples[1][i] = src[1];
samples[2][i] = src[2];
Expand Down

0 comments on commit 606a970

Please sign in to comment.