message: AudioEffectGain: add virtual to enable future UI
diff: @@ -24,7 +24,7 @@ class AudioEffectGain_F32 : public AudioStream_F32
  AudioEffectGain_F32(const AudioSettings_F32 &settings) : AudioStream_F32(1, inputQueueArray_f32) {};
  //here's the method that does all the work
  - void update(void) {
  + virtual void update(void) {
  //Serial.println("AudioEffectGain_F32: updating."); //for debugging.
  audio_block_f32_t *block;
  block = AudioStream_F32::receiveWritable_f32();
  @@ -40,28 +40,37 @@ class AudioEffectGain_F32 : public AudioStream_F32
  }
  //methods to set parameters of this module
  - float setGain(float g) { return gain = g;}
  - float setGain_dB(float gain_dB) {
  + virtual float setGain(float g) { return gain = g;}
  + virtual float setGain_dB(float gain_dB) {
  float gain = pow(10.0, gain_dB / 20.0);
  setGain(gain);
  return getGain_dB();
  }
  //increment the linear gain
  - float incrementGain_dB(float increment_dB) {
  + virtual float incrementGain_dB(float increment_dB) {
  return setGain_dB(getGain_dB() + increment_dB);
  }
  - void setSampleRate_Hz(const float _fs_Hz) {}; //unused. included for interface compatability with fancier gain algorithms
  - float getCurrentLevel_dB(void) { return 0.0; }; //meaningless. included for interface compatibility with fancier gain algorithms
  + virtual void setSampleRate_Hz(const float _fs_Hz) {}; //unused. included for interface compatability with fancier gain algorithms
  + virtual float getCurrentLevel_dB(void) { return 0.0; }; //meaningless. included for interface compatibility with fancier gain algorithms
  //methods to return information about this module
  - float getGain(void) { return gain; }
  - float getGain_dB(void) { return 20.0*log10(gain); }
  + virtual float getGain(void) { return gain; }
  + virtual float getGain_dB(void) { return 20.0*log10(gain); }
  - private:
  + protected:
  audio_block_f32_t *inputQueueArray_f32[1]; //memory pointer for the input to this module
  float gain = 1.0; //default value
  };
  +
  +/* class AudioEffectGain_F32_UI : public AudioEffectGain_F32 {
  + //GUI: inputs:1, outputs:1 //this line used for automatic generation of GUI node
  + public:
  + //constructor
  + AudioEffectGain_F32_UI(void) : AudioEffectGain_F32() {};
  + AudioEffectGain_F32_UI(const AudioSettings_F32 &settings) : AudioEffectGain_F32(settings) {};
  +}; */
  +
  #endif
  \ No newline at end of file
  