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 {
6565 return resample_stream.readBytes (data, len);
6666 }
6767
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) {
6971 moving_average_level_percent.setSize (size);
7072 }
7173
@@ -75,6 +77,13 @@ class DynamicResamplingQueueStream : public AudioStream {
7577 resample_range = rangePercent / 100.0 ;
7678 }
7779
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+
7887 protected:
7988 PIDController pid; // p=0.005, i=0.00005, d=0.0001
8089 QueueStream<uint8_t > queue_stream;
@@ -83,8 +92,6 @@ class DynamicResamplingQueueStream : public AudioStream {
8392 ResampleStream resample_stream;
8493 float step_size = 1.0 ;
8594 float resample_range = 0 ;
86- int copy_size = 80 ;
87- int buffer_size = 0 ;
8895 float p = 0.005 ;
8996 float i = 0.00005 ;
9097 float d = 0.0001 ;
You can’t perform that action at this time.
0 commit comments