A2DP -> Mono -> I2S distorted #1602
-
I believe had a mono example working a while back, went on vaction, did various number of git-pulls and now there's horrible sound (distorted and about an octave or more lower) when using mono. Works fine in stereo. Any advice? PS: I saw this said only change channels = 1; (#836) `#include "AudioTools.h" I2SStream i2s; void setup() {
// cfg.i2s_format = I2S_STD_FORMAT; // PCM5102A seems obvlivious to format
} void loop() { I tried both yellow and purple PCM5102 DAC boards on this page w/same restults: Code works fine in stereo (cfg.channels = 2;) but not mono. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
In Arduino ESP32 3.0 core the I2S has changed and might therefore behave slightly differently. You can use a2dp_sink.set_mono_downmix (bool enabled) to output the same (mono) signal on the 2 i2s channels. If you want to limit the I2S signal to 1 output pin you need to convert the number of channels first! |
Beta Was this translation helpful? Give feedback.
In Arduino ESP32 3.0 core the I2S has changed and might therefore behave slightly differently.
A2DP provides stereo data, so only specifying channels = 1 in I2S will not work.
You can use a2dp_sink.set_mono_downmix (bool enabled) to output the same (mono) signal on the 2 i2s channels.
If you want to limit the I2S signal to 1 output pin you need to convert the number of channels first!