Moved the filterControlInterval to the global config namespace

This commit is contained in:
Paul Fd 2020-02-03 00:55:50 +01:00
parent 47ae59251b
commit d7d8bca02f
3 changed files with 8 additions and 22 deletions

View file

@ -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

View file

@ -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 <cstring>
#include <cassert>
@ -174,8 +174,8 @@ void Filter<NCh>::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];

View file

@ -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