1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-27 21:23:48 +00:00

[speaker, resampler, mixer] Make volume and mute getters virtual (#8391)

This commit is contained in:
Kevin Ahrendt
2025-03-12 14:34:38 -05:00
committed by GitHub
parent 266c2ef337
commit 64d1d93fe0
4 changed files with 10 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ class Speaker {
}
#endif
};
float get_volume() { return this->volume_; }
virtual float get_volume() { return this->volume_; }
virtual void set_mute_state(bool mute_state) {
this->mute_state_ = mute_state;
@@ -90,7 +90,7 @@ class Speaker {
}
#endif
}
bool get_mute_state() { return this->mute_state_; }
virtual bool get_mute_state() { return this->mute_state_; }
#ifdef USE_AUDIO_DAC
void set_audio_dac(audio_dac::AudioDac *audio_dac) { this->audio_dac_ = audio_dac; }