@@ -68,7 +68,7 @@ struct CrunchSTFX : public BaseEffect {
6868 config.auxInputs .resize (0 );
6969 config.auxOutputs .resize (0 );
7070
71- oversampler.resize (channels, config.maxBlockSize , oversampleHalfLatency, std::min (0.45 , 21000 /config.sampleRate ));
71+ oversampler.resize (int ( channels), int ( config.maxBlockSize ) , oversampleHalfLatency, std::min (0.45 , 21000 /config.sampleRate ));
7272 gainshapers.resize (channels);
7373 cutFilters.resize (channels);
7474 toneFilters.resize (channels);
@@ -103,7 +103,7 @@ struct CrunchSTFX : public BaseEffect {
103103 }
104104 auto outputGain = block.smooth (outputGainFrom, outputGainTo);
105105
106- for (int c = 0 ; c < channels; ++c) {
106+ for (size_t c = 0 ; c < channels; ++c) {
107107 auto &cutFilter = cutFilters[c];
108108 cutFilter.highpass (cutHz/(config.sampleRate *2 ));
109109 auto &gainshaper = gainshapers[c];
@@ -113,21 +113,21 @@ struct CrunchSTFX : public BaseEffect {
113113 auto &outputFilter = outputFilters[c];
114114 outputFilter.highpass ((10 + 40 *fuzz)/(config.sampleRate *2 )); // more aggressive when fuzz is enabled, since it's very asymmetrical
115115
116- oversampler.upChannel (c, io.input [c], block.length );
116+ oversampler.upChannel (c, io.input [c], int ( block.length ) );
117117 Sample *samples = oversampler[c];
118- for (int i = 0 ; i < block.length *2 ; ++i) {
118+ for (size_t i = 0 ; i < block.length *2 ; ++i) {
119119 double hi = i*0.5 ;
120120 Sample x = samples[i]*inputGain.at (hi);
121121 Sample gain = gainshaper (cutFilter (x))*outputGain.at (hi);
122122 Sample y = x*toneFilter (gain);
123123 samples[i] = outputFilter (y);
124124 }
125- oversampler.downChannel (c, io.output [c], block.length );
125+ oversampler.downChannel (c, io.output [c], int ( block.length ) );
126126 }
127127 }
128128
129129private:
130- int channels = 0 ;
130+ size_t channels = 0 ;
131131 signalsmith::rates::Oversampler2xFIR<Sample> oversampler;
132132 struct GainshapeADAA {
133133 Sample prevX = 0 , prevIntegral = 0 ;
0 commit comments