diff --git a/CHANGELOG b/CHANGELOG index ac62aea..32d22f8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ === 1.0.14 === * Fixed several issues reported by PVS Studio static analyzer. * Fixed band characteristics report for FFTCrossover. +* Fixed sidechain buffer cleanup issue when setting the same to the previous stereo mode. === 1.0.13 === * Added insert() method to dspu::Sample class that allows to insert some zeroed diff --git a/src/main/util/Sidechain.cpp b/src/main/util/Sidechain.cpp index 8829977..e5d0fdf 100644 --- a/src/main/util/Sidechain.cpp +++ b/src/main/util/Sidechain.cpp @@ -106,6 +106,9 @@ namespace lsp void Sidechain::set_stereo_mode(sidechain_stereo_mode_t mode) { + sidechain_stereo_mode_t old = (nFlags & SCF_MIDSIDE) ? SCSM_MIDSIDE : SCSM_STEREO; + if (old == mode) + return; nFlags = lsp_setflag(nFlags, SCF_MIDSIDE, mode == SCSM_MIDSIDE); nFlags |= SCF_CLEAR; }