1
1
#pragma once
2
- #include < stdint.h>
2
+ #include < stdint.h>
3
3
#include " AudioTools/AudioLogger.h"
4
4
#include " AudioEffects/AudioParameters.h"
5
5
@@ -18,7 +18,7 @@ class AudioEffect {
18
18
public:
19
19
AudioEffect () = default ;
20
20
virtual ~AudioEffect () = default ;
21
-
21
+
22
22
// / calculates the effect output from the input
23
23
virtual effect_t process (effect_t in) = 0;
24
24
@@ -68,12 +68,12 @@ class AudioEffect {
68
68
* @brief Boost AudioEffect
69
69
* @author Phil Schatzmann
70
70
* @copyright GPLv3
71
- *
71
+ *
72
72
*/
73
73
74
74
class Boost : public AudioEffect {
75
75
public:
76
- // / Boost Constructor: volume 0.1 - 1.0: decrease result; volume >0: increase result
76
+ // / Boost Constructor: volume 0.1 - 1.0: decrease result; volume >0: increase result
77
77
Boost (float volume=1.0 ){
78
78
effect_value = volume;
79
79
}
@@ -91,7 +91,7 @@ class Boost : public AudioEffect {
91
91
effect_t process (effect_t input){
92
92
if (!active ()) return input;
93
93
int32_t result = effect_value * input;
94
- // clip to int16_t
94
+ // clip to int16_t
95
95
return clip (result);
96
96
}
97
97
@@ -105,7 +105,7 @@ class Boost : public AudioEffect {
105
105
106
106
/* *
107
107
* @brief Distortion AudioEffect
108
- *
108
+ *
109
109
* @author Phil Schatzmann
110
110
* @copyright GPLv3
111
111
*/
@@ -115,7 +115,7 @@ class Distortion : public AudioEffect {
115
115
// / Distortion Constructor: e.g. use clipThreashold 4990 and maxInput=6500
116
116
Distortion (int16_t clipThreashold=4990 , int16_t maxInput=6500 ){
117
117
p_clip_threashold = clipThreashold;
118
- max_input = maxInput;
118
+ max_input = maxInput;
119
119
}
120
120
121
121
Distortion (const Distortion ©) = default ;
@@ -134,12 +134,12 @@ class Distortion : public AudioEffect {
134
134
135
135
int16_t maxInput (){
136
136
return max_input;
137
- }
137
+ }
138
138
139
139
effect_t process (effect_t input){
140
140
if (!active ()) return input;
141
141
// the input signal is 16bits (values from -32768 to +32768
142
- // the value of input is clipped to the distortion_threshold value
142
+ // the value of input is clipped to the distortion_threshold value
143
143
return clip (input,p_clip_threashold, max_input);
144
144
}
145
145
@@ -155,7 +155,7 @@ class Distortion : public AudioEffect {
155
155
156
156
/* *
157
157
* @brief Fuzz AudioEffect
158
- *
158
+ *
159
159
* @author Phil Schatzmann
160
160
* @copyright GPLv3
161
161
*/
@@ -247,7 +247,7 @@ class Tremolo : public AudioEffect {
247
247
float signal_depth = (100.0 - p_percent) / 100.0 ;
248
248
249
249
float tremolo_factor = tremolo_depth / rate_count_half;
250
- int32_t out = (signal_depth * input) + (tremolo_factor * count * input);
250
+ int32_t out = (signal_depth * input) + (tremolo_factor * count * input);
251
251
252
252
// saw tooth shaped counter
253
253
count+=inc;
@@ -315,7 +315,7 @@ class Delay : public AudioEffect {
315
315
// add actual input value
316
316
p_history->write (input);
317
317
// mix input with result
318
- return (value * p_percent / 100 ) + (input * (100 -p_percent)/100 );
318
+ return (value * p_percent / 100 ) + (input * (100 -p_percent)/100 );
319
319
}
320
320
321
321
Delay *clone () {
@@ -391,7 +391,7 @@ class ADSRGain : public AudioEffect {
391
391
float sustainLevel (){
392
392
return adsr->sustainLevel ();
393
393
}
394
-
394
+
395
395
void setReleaseRate (float r){
396
396
adsr->setReleaseRate (r);
397
397
}
0 commit comments