From 128790ff3ded89fb590843883848f3e1d71a3344 Mon Sep 17 00:00:00 2001 From: jatin Date: Wed, 1 Nov 2023 23:24:14 -0700 Subject: [PATCH] Fixing size_t conversions for GCC --- .../dsp/chowdsp_filters/Other/chowdsp_CrossoverFilter.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/dsp/chowdsp_filters/Other/chowdsp_CrossoverFilter.h b/modules/dsp/chowdsp_filters/Other/chowdsp_CrossoverFilter.h index 2a45a4167..98a598910 100644 --- a/modules/dsp/chowdsp_filters/Other/chowdsp_CrossoverFilter.h +++ b/modules/dsp/chowdsp_filters/Other/chowdsp_CrossoverFilter.h @@ -67,20 +67,20 @@ class CrossoverFilter if constexpr (Order == 1) { - auto lowerBandBuffers = buffersOut.template first(); + auto lowerBandBuffers = buffersOut.template first<(size_t) NumBands - 1>(); lowerBandsCrossover.processBlock (bufferIn, lowerBandBuffers); BufferMath::copyBufferData (lowerBandBuffers.back(), tempBuffer); // Order-1 LR filter does not allow pointer aliasing, so we copy to a temp buffer here. highCutFilter.processBlock (tempBuffer, lowerBandBuffers.back(), buffersOut.back()); } else { - auto lowerBandBuffers = buffersOut.template first(); + auto lowerBandBuffers = buffersOut.template first<(size_t) NumBands - 1>(); lowerBandsCrossover.processBlock (bufferIn, lowerBandBuffers); highCutFilter.processBlock (lowerBandBuffers.back(), lowerBandBuffers.back(), buffersOut.back()); // an allpass LR-filter with the same crossover as the high-cut frequency // this puts the low band back in-phase with the high- and mid-bands. - for (auto [buffer, filter] : chowdsp::zip (buffersOut.template first(), apHighCutFilter)) + for (auto [buffer, filter] : chowdsp::zip (buffersOut.template first<(size_t) NumBands - 2>(), apHighCutFilter)) { filter.processBlock (buffer, buffer, tempBuffer); BufferMath::addBufferData (tempBuffer, buffer); @@ -102,7 +102,7 @@ class CrossoverFilter private: CrossoverFilter lowerBandsCrossover {}; LinkwitzRileyFilter highCutFilter {}; - std::array, NumBands - 2> apHighCutFilter {}; + std::array, (size_t) NumBands - 2> apHighCutFilter {}; Buffer tempBuffer {};