File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
name =audio-tools
2
- version =0.9.8
2
+ version =0.9.9
3
3
author =Phil Schatzmann
4
4
maintainer =Phil Schatzmann
5
5
sentence =Some useful audio processing classes
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class AudioBoardStream : public I2SCodecStream {
100
100
*/
101
101
static void actionVolumeUp (bool , int , void *) {
102
102
TRACEI ();
103
- selfAudioBoard->incrementVolume (+0.02 );
103
+ selfAudioBoard->incrementVolume (+selfAudioBoard-> actionVolumeIncrementValue () );
104
104
}
105
105
106
106
/* *
@@ -109,9 +109,10 @@ class AudioBoardStream : public I2SCodecStream {
109
109
*/
110
110
static void actionVolumeDown (bool , int , void *) {
111
111
TRACEI ();
112
- selfAudioBoard->incrementVolume (-0.02 );
112
+ selfAudioBoard->incrementVolume (-selfAudioBoard-> actionVolumeIncrementValue () );
113
113
}
114
114
115
+
115
116
/* *
116
117
* @brief Toggle start stop
117
118
*
@@ -323,10 +324,20 @@ class AudioBoardStream : public I2SCodecStream {
323
324
addVolumeActions ();
324
325
}
325
326
327
+ // / Defines the increment value used by actionVolumeDown/actionVolumeUp
328
+ void setActionVolumeIncrementValue (float value){
329
+ action_increment_value = value;
330
+ }
331
+
332
+ float actionVolumeIncrementValue () {
333
+ return action_increment_value;
334
+ }
335
+
326
336
protected:
327
337
AudioActions actions;
328
338
bool headphoneIsConnected = false ;
329
339
bool active = true ;
340
+ float action_increment_value = 0.02 ;
330
341
331
342
int getSdCsPin () {
332
343
static GpioPin sd_cs = -2 ;
You can’t perform that action at this time.
0 commit comments