I2S Output of 4 Channels with an ESP32 #1536
-
Hi , I’ve try to implement the "I2S Output of 4 Channels with an ESP32" with 2 DAC (PCM5102A) and an ESP32 DEVKIT V1. but I only have sound (with a lot of glitch on DAC1) In the terminal I have that “error” : [W] AudioOutput.h : 843 – Could not write all samples Do you have an idea ? thank you
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
There have been a couple of improvements & corrections. ps. does your input data really have 4 channels ? if it is a regular stereo file you could do There should be no need for calling addNotifyAudioChange any more |
Beta Was this translation helpful? Give feedback.
-
😔 DIN and LCK was inverted on my board ...... |
Beta Was this translation helpful? Give feedback.
-
Hi @pschatzmann , I've made several test with SPI SD, SDMMC 1 bit and 4 bit, chnage of SD Card, etc... and I don't found why my file continu to be played "slowly" and with some glitch. this is my code (very close to your example. Any idea ? `#include <FS.h> int clk = 36; AudioInfo info(44100, 2, 16); void setup(){ // setup i2s
if (!SD_MMC.begin("/sdcard",false,false,40000,5)){ // split channels to different i2s ports // setup decoder // begin copy void loop(){ |
Beta Was this translation helpful? Give feedback.
-
Did you already try out this optimization ? |
Beta Was this translation helpful? Give feedback.
-
Commenting it out is the same as setting it to Warning... |
Beta Was this translation helpful? Give feedback.
-
I've almost finished my program that play stereo wave, 4 channels wave and MP3 (by switching of decoder on the fly).
It works good for MP3 and stereo wav but not for 4 channels wave. Is it a good way to do it ? |
Beta Was this translation helpful? Give feedback.
There have been a couple of improvements & corrections.
Try again with the latest version...
ps. does your input data really have 4 channels ? if it is a regular stereo file you could do
out.addOutput(i2s_1, 0, 1);
out.addOutput(i2s_2, 0, 1);
or
out.addOutput(i2s_1, 0, 0); // only left on 1
out.addOutput(i2s_2, 1, 1); // only right on 2
There should be no need for calling addNotifyAudioChange any more