From 7523772886ca37cf05d0ad5b24f6d520e314242e Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 16 Oct 2023 13:52:43 +1100 Subject: Decouple play/pause from output on/off I think this was the cause of toggling play/pause making audio go away. Or at least I can't repro that bug anymore, anyway. --- src/drivers/include/i2s_dac.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/drivers/include/i2s_dac.hpp') diff --git a/src/drivers/include/i2s_dac.hpp b/src/drivers/include/i2s_dac.hpp index b61f7989..d66d9762 100644 --- a/src/drivers/include/i2s_dac.hpp +++ b/src/drivers/include/i2s_dac.hpp @@ -46,6 +46,7 @@ class I2SDac { auto Start() -> void; auto Stop() -> void; + auto SetPaused(bool) -> void; enum Channels { CHANNELS_MONO, @@ -75,6 +76,8 @@ class I2SDac { I2SDac& operator=(const I2SDac&) = delete; private: + auto set_channel(bool) -> void; + IGpios& gpio_; i2s_chan_handle_t i2s_handle_; bool i2s_active_; -- cgit v1.2.3