Convert stereo to 2-ch mono for DAC. #2161
-
Hardware: 2 x ICS-43434 mics, ESP32, HiLetgo PCM5102 DAC, audio amp. I have the mics connected to I2S port 0 on an ESP32 and the goal is to balance the L/R mics and convert to a mono stream that feeds a 2-ch DAC on I2S port 1. 2 x mics input -> Equalizer -> Volume/balance -> convert stereo to mono -> 2-ch DAC This works fine except sounds come out on left speaker only, even though I had config_out.channels=2. Tried wrapping a 2-ch FormatConverterStream around the mono stream but compiler disallowed copy constructor. Have tried other classes mentioned in wiki but due to my lack of knowledge I have no success. Would appreciate some pointers on the correct way to convert the mono stream to |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Check the documentation of the FormatConverterStream: you are converting to mono! I also think your sketch has some bug, since you are setting up some objects with the wrong channel information: all before the converter is mono, so you should use info_mono! |
Beta Was this translation helpful? Give feedback.
-
I'll check again but I'm quite sure my mics are stereo. I configured the ICS-43434 mics as per documentation ie left SEL tied to GND, right SEL tied to VCC. This allows audio to come into ESP32 as stereo. I'm using FormatConverterStream to mix the L/R mic signals and then output mono to both channels of the DAC. The end-goal is to have the mono sound coming out from left and right speakers. But I'm stuck at the stage of trying to duplicate the mono output to both DAC channels. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I committed a correction to support FormatConverterStream stereoToMonoConverter(monoToStereoConverter); now as well |
Beta Was this translation helpful? Give feedback.
Check the documentation of the FormatConverterStream: you are converting to mono!
So the sketch is absolutley doing what you specified...
I also think your sketch has some bug, since you are setting up some objects with the wrong channel information: all before the converter is mono, so you should use info_mono!