Skip to content

Commit 426a8f7

Browse files
joextoddDamien Laidin
authored and
Damien Laidin
committed
Fix ESP32 send sample rate when configured on I2S1
1 parent 08977d9 commit 426a8f7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/ESP32Send/ESP32Send.ino

+9
Original file line numberDiff line numberDiff line change
@@ -244,5 +244,14 @@ void setupAudioOutput(int sample_rate)
244244
while (true);
245245
}
246246

247+
/*
248+
* Known Issue
249+
* The output sample rate is not correct if I2S0 is not configured
250+
* This can be removed if receiving is set up on I2S0.
251+
*/
252+
i2s_config_t i2s_config_stub = i2s_config;
253+
i2s_config_stub.bits_per_sample = I2S_BITS_PER_SAMPLE_32BIT;
254+
i2s_driver_install(I2S_NUM_0, &i2s_config_stub, 0, NULL);
255+
247256
Serial.println("Audio output driver initalised.");
248257
}

0 commit comments

Comments
 (0)