improved support for PDM microphones (SPM1423)

seems that the "swapped channel" workaround is not needed for PDM.
This commit is contained in:
Frank
2022-11-09 00:01:40 +01:00
parent 9fdc176a9e
commit 20aebf2789
2 changed files with 15 additions and 4 deletions

View File

@@ -1149,7 +1149,7 @@ class AudioReactive : public Usermod {
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
case 5:
DEBUGSR_PRINT(F("AR: I2S PDM Microphone - ")); DEBUGSR_PRINTLN(F(I2S_MIC_CHANNEL_TEXT));
audioSource = new I2SSource(SAMPLE_RATE, BLOCK_SIZE);
audioSource = new I2SSource(SAMPLE_RATE, BLOCK_SIZE, true, 1.0f/4.0f);
delay(100);
if (audioSource) audioSource->initialize(i2swsPin, i2ssdPin);
break;