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){