Multichannel mp3 player using libhelix #330
-
Hi all! I'd like to use libhelix to build a 4 channel mp3 player that will run on an esp32 WROOM 32E. So far I've been trying to add other source channels without success. Has anyone attempted this before? Can anyone point me to the right direction? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
I haven't looked into the number of supported tracks for different audio file formats and I am not sure if mp3 is supporting more then 2 tracks. Anyhow, the ESP32 is very limited and decoding 2 mp3 tracks works just fine - but I have the gut feeling that more will be difficult. Using an uncompressed audio file format e.g. WAV will not have any of this limitations, because we can just copy data. On the other side I do not see how to output the 4 tracks properly: did you plan to use the 2 I2S ports ? |
Beta Was this translation helpful? Give feedback.
-
I think 4 channels and mp3 will never work! You can't use 1 decoder for multiple inputs because - as far as I know - the decoder relies on the information from the prior segments: so you can't feed it from multiple sources and for 2 decoders there are not enough resources. So the major issue is that mp3 supports max 2 channels. Here are my recommendations:
|
Beta Was this translation helpful? Give feedback.
-
You can't use 2 AnalogAudioStream instances. ESP32 only supports one port (which must be 0)! To combine decoded audio please read this documentation. From my point of view you just hear the output from one file and the noise and glitches is coming from the fact that you are abusing the codec. ps if you would use I2S you could use 2 instances, but you would still need to assign them to different ports. |
Beta Was this translation helpful? Give feedback.
-
Why not develloping a little sequencer audio player class that read several audio mp3 or wav at a time but use only one instance of audiostream as output. |
Beta Was this translation helpful? Give feedback.
-
track = channel; Stereo has 2 channels, so if you have more input channels then output channels you need to start to mix/combine them |
Beta Was this translation helpful? Give feedback.
I think 4 channels and mp3 will never work! You can't use 1 decoder for multiple inputs because - as far as I know - the decoder relies on the information from the prior segments: so you can't feed it from multiple sources and for 2 decoders there are not enough resources. So the major issue is that mp3 supports max 2 channels.
Here are my recommendations: