diff --git a/include/STTypes.h b/include/STTypes.h index 03dea9e..26e9af7 100644 --- a/include/STTypes.h +++ b/include/STTypes.h @@ -56,8 +56,9 @@ typedef unsigned long ulong; namespace soundtouch { - /// Max allowed number of channels - #define SOUNDTOUCH_MAX_CHANNELS 16 + /// Max allowed number of channels. This is not a hard limit but to have some + /// maximum value for argument sanity checks -- can be increased if necessary + #define SOUNDTOUCH_MAX_CHANNELS 32 /// Activate these undef's to overrule the possible sampletype /// setting inherited from some other header file: diff --git a/source/SoundTouch/FIRFilter.cpp b/source/SoundTouch/FIRFilter.cpp index 4cd330e..20f9311 100644 --- a/source/SoundTouch/FIRFilter.cpp +++ b/source/SoundTouch/FIRFilter.cpp @@ -155,7 +155,7 @@ uint FIRFilter::evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uin assert(src != nullptr); assert(dest != nullptr); assert(filterCoeffs != nullptr); - assert(numChannels < 16); + assert(numChannels <= SOUNDTOUCH_MAX_CHANNELS); // hint compiler autovectorization that loop length is divisible by 8 int ilength = length & -8;