Skip to content

Commit c081206

Browse files
committed
ESP32 PDM compile error
1 parent 227c996 commit c081206

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,15 @@ class I2SDriverESP32V1 {
351351

352352
protected:
353353
i2s_pdm_tx_slot_config_t getTxSlotConfig(I2SConfigESP32V1 &cfg) {
354+
#ifdef ARDUINO
355+
return I2S_PDM_TX_SLOT_DEFAULT_CONFIG(
356+
(i2s_data_bit_width_t)cfg.bits_per_sample,
357+
(i2s_slot_mode_t)cfg.channels);
358+
#else
354359
return I2S_PDM_TX_SLOT_DAC_DEFAULT_CONFIG(
355360
(i2s_data_bit_width_t)cfg.bits_per_sample,
356361
(i2s_slot_mode_t)cfg.channels);
362+
#endif
357363
}
358364

359365
i2s_chan_config_t getChannelConfig(I2SConfigESP32V1 &cfg) {

0 commit comments

Comments
 (0)