Skip to content

Commit 19a6084

Browse files
committed
The conversion-warnings will continue until morale improves
1 parent e01adf1 commit 19a6084

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

include/signalsmith-basics/crunch.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ 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], int(block.length));
117-
Sample *samples = oversampler[c];
116+
oversampler.upChannel(int(c), io.input[c], int(block.length));
117+
Sample *samples = oversampler[int(c)];
118118
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], int(block.length));
125+
oversampler.downChannel(int(c), io.output[c], int(block.length));
126126
}
127127
}
128128

include/signalsmith-basics/limiter.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct LimiterSTFX : public BaseEffect {
106106
sampleRate = config.sampleRate;
107107

108108
int maxDelaySamples = std::ceil(maxDelayMs*0.001*sampleRate);
109-
multiBuffer.resize(channels, maxDelaySamples + 1);
109+
multiBuffer.resize(int(channels), maxDelaySamples + 1);
110110
channelEnvelopes.resize(channels);
111111
for (auto &e : channelEnvelopes) e.configure(maxDelaySamples);
112112
channelGains.resize(channels);
@@ -154,18 +154,18 @@ struct LimiterSTFX : public BaseEffect {
154154
envelope.releaseSlew = ln2/(releaseSamples + ln2);
155155
}
156156

157-
for (int i = 0; i < block.length; ++i) {
157+
for (int i = 0; i < int(block.length); ++i) {
158158
Sample minChannelGain = 1;
159-
for (int c = 0; c < channels; ++c) {
159+
for (size_t c = 0; c < channels; ++c) {
160160
Sample value = io.input[c][i]*smoothedPreGain.at(i);
161-
multiBuffer[c][i] = value;
161+
multiBuffer[int(c)][i] = value;
162162

163163
// maximum gain (clips output to threshold)
164164
Sample gain = thresholdAmp/std::max(thresholdAmp, std::abs(value));
165165
channelGains[c] = gain;
166166
minChannelGain = std::min(minChannelGain, gain);
167167
}
168-
for (int c = 0; c < channels; ++c) {
168+
for (size_t c = 0; c < channels; ++c) {
169169
Sample gain = channelGains[c];
170170
// blend between individual/minimum gain
171171
gain += (minChannelGain - gain)*linkChannels;
@@ -184,8 +184,8 @@ struct LimiterSTFX : public BaseEffect {
184184
}
185185

186186
Sample delayed = block.fade(i,
187-
multiBuffer[c][i - delaySamplesFrom],
188-
multiBuffer[c][i - delaySamplesTo]
187+
multiBuffer[int(c)][i - delaySamplesFrom],
188+
multiBuffer[int(c)][i - delaySamplesTo]
189189
);
190190
io.output[c][i] = delayed*gain;
191191
}
@@ -194,7 +194,7 @@ struct LimiterSTFX : public BaseEffect {
194194
}
195195

196196
private:
197-
int channels = 0;
197+
size_t channels = 0;
198198
double maxDelayMs = 0;
199199
Sample sqrtWet = 0, sqrtWetSlew = 1;
200200
signalsmith::delay::MultiBuffer<Sample> multiBuffer;

0 commit comments

Comments
 (0)