Playing wav files with teensy 4.1

I have a teensy 4.1 (the long one with the built in SD card reader).
Do I need an external DAC to play wav files?
If so, Is their anything special built-in to my board for I2S?
or do I use the usual Arduino I2S library?

Yes, a DAC is needed for the controllers I know.
Playing audio I suspect I2C is to slow and SPI would be faster.

@pjrc ↑ ↑

Probably best to ask on the Teensy forum.

Quick answer: Teensy 4.1 does not have a built in DAC. For audio output, it does have I2S (plus PT2811 & TDM protocols using I2S), S/PDIF, and MQS. MSQ gives pulses which you can low-pass filter with a resistor and capacitor to get a pretty good audio signal.

Normally this stuff is all used with the Teensy Audio Library, which gives you a huge toolkit of inputs, outputs, effects, filters, mixers, and other ways to play / synthesize / process sound. If you're not familiar with this library, this tutorial is the place to start.

While all the tutorial examples use I2S with an audio shield, hopefully once to see how to use the design tool in part 2, you'll understand how you can just drag any of the other outputs onto the canvas and connect your audio stream to them. As you click each output, keep an eye on the "Boards Supported" info in the left-side documentation panel.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.