I recently bought a classic ESP32 for the Bluetooth, WiFi and ESPECIALLY... the DAC
I'm experimenting with audio right now and i want to see a method to stream continuously trough the USB a PCM audio or the classic NES style of DPCM, and then play it trough the DAC of the ESP32, I need to say that I don't have any I2S module or anything, I bought the ESP32 for its current capabilities and ESPECIALLY the DAC
That sounds like an interesting project that would be a lot of fun! However, Please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it along with an annotated schematic and an explanation of what’s not working properly. There is also a for hire section if you want to pay for it.
Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working. That includes a preliminary schematic that you drew.
Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Clear Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential. I will assume the processor is a UNO. Many times the processor is stated as ESP32, please state which one and post a link to it.
Reference Resources: For additional help, check out useful links and tutorials: Useful Links on Arduino Forum. Of course one of the better sources of information (in my opinion) is the Arduino Cookbook. Skim it cover to cover and stop on any project that interests you.
I'm curious why you chose that topology. I would have gone with digital audio. Run I2S from the ESP32 to an I2S, (Class D) amplifier. That gets you stereo sound and a noise-free digital connection to the amp.
presumaly simple and low-tech. Seems the OP is just trying to study audio coding.
the phone company uses mu-law codecs which non-linearly compressed ~14-bit value to 8-bits using 64-kbit data to carry voice. These other encoding methods probably also expect a similar range a values i.e. ~14+-bits.
For really big sound (20W / channel), I used an Infineon Eval Board with their Class D I2S amp on it. That board seems to be discontinued, but they may have a replacement.