Play wav simultaneously + asynchronously on PWM with ESP32 #1047
-
I generated some files and managed to read them on an ESP32 with PWM. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I am sorry, I don't quite understand what you are doing and what you want to achieve: files and PWM ? But I have the gut feeling that you might want to read the chapter about mixing... |
Beta Was this translation helpful? Give feedback.
-
I think you can not have multiple instances of PWMAudioOutput. But one instance supports many output pins (one pin for each channel). So you will need to write some logic to combine your different files into one output where each file goes into a separate channel. The InputMerge should help to to do this if your files are mono. If they are stereo, you will need to convert them to mono first. Or you can just implement your own logic using reads from your input and writes... Mixing is about playing your different input files at the same time on 1 speaker (for mono) or on 2 speakers (for stereo) |
Beta Was this translation helpful? Give feedback.
I am sorry, I don't quite understand what you are doing and what you want to achieve: files and PWM ?
But I have the gut feeling that you might want to read the chapter about mixing...