diff --git a/src/sfizz/Config.h b/src/sfizz/Config.h index 69bf58b9..0291c46a 100644 --- a/src/sfizz/Config.h +++ b/src/sfizz/Config.h @@ -51,6 +51,11 @@ namespace config { constexpr uint8_t numCCs { 143 }; constexpr int chunkSize { 1024 }; constexpr float defaultAmpEGRelease { 0.02f }; + /** + Minimum interval in frames between recomputations of coefficients of the + modulated filter. The lower, the more CPU resources are consumed. + */ + constexpr int filterControlInterval { 16 }; } // namespace config // Enable or disable SIMD accelerators by default diff --git a/src/sfizz/SfzFilter.cpp b/src/sfizz/SfzFilter.cpp index 35b3f210..1d936e02 100644 --- a/src/sfizz/SfzFilter.cpp +++ b/src/sfizz/SfzFilter.cpp @@ -4,8 +4,8 @@ // license. You should have receive a LICENSE.md file along with the code. // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz +#include "Config.h" #include "SfzFilter.h" -#include "SfzFilterDefs.h" #include "SfzFilterImpls.cxx" #include #include @@ -174,8 +174,8 @@ void Filter::Impl::processModulated(F &filter, const float *const in[NCh], while (frame < nframes) { unsigned current = nframes - frame; - if (current > kFilterControlInterval) - current = kFilterControlInterval; + if (current > config::filterControlInterval) + current = config::filterControlInterval; const float *current_in[NCh]; float *current_out[NCh]; diff --git a/src/sfizz/SfzFilterDefs.h b/src/sfizz/SfzFilterDefs.h deleted file mode 100644 index 85a219a6..00000000 --- a/src/sfizz/SfzFilterDefs.h +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: BSD-2-Clause - -// This code is part of the sfizz library and is licensed under a BSD 2-clause -// license. You should have receive a LICENSE.md file along with the code. -// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz - -#pragma once - -namespace sfz { - -enum { - /** - Minimum interval in frames between recomputations of coefficients of the - modulated filter. The lower, the more CPU resources are consumed. - */ - kFilterControlInterval = 16, -}; - -} // namespace sfz