Breaking changes in Teensyduino audio?

bigpilot

Well-known member
Have there been breaking changes in Teensyduino's audio support? I've upgraded my music player to a newer version of Teensyduino and I'm suddenly unable to playback WAV files. It's stuttering and glitching in and out on one D/A converter and another one stays completely silent.

I'm initializing the audio like so:

C++:
AudioPlaySdWav playWav1;
AudioOutputI2S i2s1;
AudioConnection patchCord1(playWav1, 0, i2s1, 0);
AudioConnection patchCord2(playWav1, 1, i2s1, 1);

I've had this working for literally years (5 years maybe) and now it suddenly ceases to work.

The CPU is a Teensy 3.1.
 
Last edited:
Have there been breaking changes in Teensyduino's audio support?

Hardly anything has changed with audio.

As a quick check, I tried running File > Examples > Audio > WavFilePlayer on a Teensy 3.2 with Rev C audio shield. I'm listening to it play music while writing this message. Here's the hardware on my workbench.

1790106296698.png


While this probably doesn't help much with whatever's going wrong, at the very least you could try running the example program on your hardware as a starting point.
 
We have updated the gcc toolchain a couple times. The most recent toolchain is pretty unforgiving about functions that a defined to return something but end without a return statement. The compiler should give a warning, so at the very least I'd suggest scrolling up and looking at any compiler warnings.

At least one other person who reported their old program for Teensy 3.x broke on the newest release turned out to be "only" a missing return, which the compiler was warning about but they ignored because it was never a real problem before. I'm probably going to change compiler flags on the next release to turn that warning into an actual compile error, since it's (sometimes) a real problem now.

If none of this helped, the next step is to pare your program down to something small enough you can post all the code here so I or anyone else can reproduce the problem. We're much better at getting to the bottom of problems we can reproduce!
 
Screenshot from 2026-09-23 20-49-17.png
Screenshot from 2026-09-23 20-51-01.png


I had it meticulously documented...but I documented it wrong. :sneaky:

Sorry for the fuss.
 
Last edited:
Back
Top