From 8664054d44bfdbc46a75e7101c9dc7b16a267fc4 Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Tue, 3 Oct 2023 15:38:22 +0200 Subject: [PATCH] AnalogDriverESP32 correction --- .../streams-memory_mp3-analog/streams-memory_mp3-analog.ino | 2 -- src/AudioAnalog/AnalogAudioESP32.h | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/examples-stream/streams-memory_mp3-analog/streams-memory_mp3-analog.ino b/examples/examples-stream/streams-memory_mp3-analog/streams-memory_mp3-analog.ino index 0518f478fd..77bd8877a4 100644 --- a/examples/examples-stream/streams-memory_mp3-analog/streams-memory_mp3-analog.ino +++ b/examples/examples-stream/streams-memory_mp3-analog/streams-memory_mp3-analog.ino @@ -31,8 +31,6 @@ void setup(){ // begin processing auto cfg = out.defaultConfig(); out.begin(cfg); - - out.begin(); } void loop(){ diff --git a/src/AudioAnalog/AnalogAudioESP32.h b/src/AudioAnalog/AnalogAudioESP32.h index 1e9b017e09..cd5a988b9c 100644 --- a/src/AudioAnalog/AnalogAudioESP32.h +++ b/src/AudioAnalog/AnalogAudioESP32.h @@ -136,7 +136,9 @@ class AnalogDriverESP32 : public AnalogDriverBase { /// stops the I2S and unistalls the driver void end() override { LOGI(__func__); - i2s_zero_dma_buffer(port_no); + if (active) { + i2s_zero_dma_buffer(port_no); + } // close ADC if (adc_config.rx_tx_mode == RX_MODE){