Restored outputScale. My mistakegit add output_i2s_f32.h

pull/13/head
boblark 3 years ago
parent dfb7d25189
commit 1abb151ffd
  1. 7
      output_i2s_f32.h

@ -55,6 +55,12 @@ public:
audio_block_samples = settings.audio_block_samples; audio_block_samples = settings.audio_block_samples;
begin(); begin();
} }
// outputScale is a gain control for both left and right. If set exactly
// to 1.0f it is left as a pass-through.
void setGain(float _oscale) {
outputScale = _oscale;
}
virtual void update(void); virtual void update(void);
void begin(void); void begin(void);
void begin(bool); void begin(bool);
@ -101,6 +107,7 @@ private:
static float sample_rate_Hz; static float sample_rate_Hz;
static int audio_block_samples; static int audio_block_samples;
volatile uint8_t enabled = 1; volatile uint8_t enabled = 1;
float outputScale = 1.0f; // Quick volume control
}; };
class AudioOutputI2Sslave_F32 : public AudioOutputI2S_F32 class AudioOutputI2Sslave_F32 : public AudioOutputI2S_F32

Loading…
Cancel
Save