From 7b678ba2c8dc1f6f22e544de8673489630299082 Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Mon, 3 Jun 2024 12:09:38 +0200 Subject: [PATCH] forgotten safety check (#21549) --- tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino b/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino index 20a5b459c..7b0545856 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino @@ -1052,6 +1052,10 @@ void CmndI2SI2SRtttl(void) { } void CmndI2SMicRec(void) { + if (I2SPrepareRx()) { + ResponseCmndChar("I2S Mic not configured"); + return; + } if (audio_i2s_mp3.mp3ram == nullptr){ AddLog(LOG_LEVEL_DEBUG,PSTR("I2S: try late buffer allocation for mp3 encoder")); audio_i2s_mp3.mp3ram = special_malloc(preallocateCodecSize);