ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
audio_dac.h
Go to the documentation of this file.
1#pragma once
2
4#include "esphome/core/hal.h"
5
7
8class AudioDac {
9 public:
10 virtual bool set_mute_off() = 0;
11 virtual bool set_mute_on() = 0;
12 virtual bool set_volume(float volume) = 0;
13
14 virtual bool is_muted() = 0;
15 virtual float volume() = 0;
16
19 virtual void on_audio_started() {}
20
21 protected:
22 bool is_muted_{false};
23};
24
25} // namespace esphome::audio_dac
virtual bool set_mute_off()=0
virtual void on_audio_started()
Called from the main loop by the speaker driving this DAC once its audio clocks are running.
Definition audio_dac.h:19
virtual bool set_volume(float volume)=0
virtual float volume()=0
virtual bool set_mute_on()=0