4-channel AAC streaming issue #1578
-
I'm trying to stream 4-channel AAC audio (16-bit, 48kHz) over WiFi to two I2S ports by trying to combine two of your examples: streams-sd_wav4-i2s Sadly my ESP32 S3 board does not have an SD card slot so I can't truly test the 4-channel wav, however the goal is to stream 4-channel compressed audio (like AAC) over WiFi. I tried multiple variations, I have to say I'm not too experienced, but for some reason when I send a stream with more than 2 channels it fails to work with AAC (or any other codec I tried, like OGG). The copier is reporting normal copies, but we're not hearing any audio, nor does the oscilloscope show any signals on WS, BCK or DATA. Is this a limitation of the AACHelix codec? Is it überhaupt possible to use a single 4-channel AAC stream, but split it up for two I2S ports? I do have access to an oscilloscope, which was quite helpful to inspect the emitted samplerates, bitdepths, etc. in this comment you suggest converting the 4-channel WAV example to AAC which we try as follows.... Device Description This is the code: #include "AudioTools.h" URLStream url("myWifi","myPassword"); AudioInfo info4(48000, 4, 16); I2SStream i2s_1; ChannelsSelectOutput out; EncodedAudioOutput decoder(&out, new AACDecoderHelix()); // Decoding stream StreamCopy copier; // copy url to decoder void setup(){ AudioLogger::instance().begin(Serial, AudioLogger::Info); // setup i2s auto config2 = i2s_2.defaultConfig(TX_MODE); out.addOutput(i2s_1, 0, 1); //out.addNotifyAudioChange(i2s_1); out.begin(info4); decoder.begin(info4); url.begin("http://192.168.129.76:8000/stream","audio/aac"); Serial.println("started..."); void loop(){ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I would not know since I have never tried: In theory AAC should support more then 2 channels. You could also try to send thee output to a CsvStream to double check... |
Beta Was this translation helpful? Give feedback.
I would not know since I have never tried: In theory AAC should support more then 2 channels.
Are you getting any error messages ? If not I suggest to have a look at the log to figure out what's going on. If info does not provide enough granularity you can try with debug.
You could also try to send thee output to a CsvStream to double check...