ESPHome  2024.10.0
audio_dac.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "esphome/core/defines.h"
4 #include "esphome/core/hal.h"
5 
6 namespace esphome {
7 namespace audio_dac {
8 
9 class AudioDac {
10  public:
11  virtual bool set_mute_off() = 0;
12  virtual bool set_mute_on() = 0;
13  virtual bool set_volume(float volume) = 0;
14 
15  virtual bool is_muted() = 0;
16  virtual float volume() = 0;
17 
18  protected:
19  bool is_muted_{false};
20 };
21 
22 } // namespace audio_dac
23 } // namespace esphome
virtual bool set_mute_off()=0
virtual bool set_mute_on()=0
virtual bool set_volume(float volume)=0
virtual float volume()=0
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7