@@ -273,20 +273,20 @@ class Delay : public AudioEffect {
273
273
274
274
void setDepth (float value) {
275
275
depth = value;
276
- if (depth > 1.0 )
277
- depth = 1.0 ;
278
- if (depth < 0 )
279
- depth = 0.0 ;
276
+ if (depth > 1 .0f )
277
+ depth = 1 .0f ;
278
+ if (depth < 0 . 0f )
279
+ depth = 0 .0f ;
280
280
}
281
281
282
282
float getDepth () { return depth; }
283
283
284
284
void setFeedback (float feed) {
285
285
feedback = feed;
286
- if (feedback > 1.0 )
287
- feedback = 1.0 ;
288
- if (feedback < 0 )
289
- feedback = 0.0 ;
286
+ if (feedback > 1 .0f )
287
+ feedback = 1 .0f ;
288
+ if (feedback < 0 . 0f )
289
+ feedback = 0 .0f ;
290
290
}
291
291
292
292
float getFeedback () { return feedback; }
@@ -306,7 +306,7 @@ class Delay : public AudioEffect {
306
306
int32_t delayed_value = buffer[delay_line_index];
307
307
308
308
// Mix the above with current audio and write the results back to output
309
- int32_t out = ((1.0 - depth) * input) + (depth * delayed_value);
309
+ int32_t out = ((1 .0f - depth) * input) + (depth * delayed_value);
310
310
311
311
// Update each delay line
312
312
buffer[delay_line_index] = clip (feedback * (delayed_value + input));
@@ -322,7 +322,7 @@ class Delay : public AudioEffect {
322
322
323
323
protected:
324
324
Vector<effect_t > buffer{0 };
325
- float feedback = 0.0 , duration = 0.0 , sampleRate = 0.0 , depth = 0.0 ;
325
+ float feedback = 0 .0f , duration = 0 .0f , sampleRate = 0 .0f , depth = 0 .0f ;
326
326
size_t delay_len_samples = 0 ;
327
327
size_t delay_line_index = 0 ;
328
328
@@ -510,7 +510,7 @@ class Compressor : public AudioEffect {
510
510
511
511
// / Defines the compression ratio from 0 to 1
512
512
void setCompressionRatio (float compressionRatio){
513
- if (compressionRatio< 1.0 ){
513
+ if (compressionRatio < 1 . 0f ){
514
514
gainreduce = compressionRatio;
515
515
}
516
516
recalculate ();
0 commit comments