File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ class DynamicResamplingQueueStream : public AudioStream {
65
65
return resample_stream.readBytes (data, len);
66
66
}
67
67
68
- void setMovingAvgSize (int size) {
68
+ // / Defines the number of historic %fill levels that will be used to calculate
69
+ // / the moving avg
70
+ void setMovingAvgCount (int size) {
69
71
moving_average_level_percent.setSize (size);
70
72
}
71
73
@@ -75,6 +77,13 @@ class DynamicResamplingQueueStream : public AudioStream {
75
77
resample_range = rangePercent / 100.0 ;
76
78
}
77
79
80
+ // / Define the PID parameters
81
+ void setPIDParameters (float p_value, float i_value, float d_value) {
82
+ p = p_value;
83
+ i = i_value;
84
+ d = d_value;
85
+ }
86
+
78
87
protected:
79
88
PIDController pid; // p=0.005, i=0.00005, d=0.0001
80
89
QueueStream<uint8_t > queue_stream;
@@ -83,8 +92,6 @@ class DynamicResamplingQueueStream : public AudioStream {
83
92
ResampleStream resample_stream;
84
93
float step_size = 1.0 ;
85
94
float resample_range = 0 ;
86
- int copy_size = 80 ;
87
- int buffer_size = 0 ;
88
95
float p = 0.005 ;
89
96
float i = 0.00005 ;
90
97
float d = 0.0001 ;
You can’t perform that action at this time.
0 commit comments