Duckminster
New member
I've got a bunch of *.wav files on SD, playing back from the SD slot on the 4.1. (AudioPlaySdWav)
Files are being triggered via MQTT, all is well, no issues. Except...
I have one file out of a dozen, that when triggered as the first file to play at anytime after the Teensy reboots, the Teensy crashes and resets. No other file does it. Play any other file on boot, then play the suspect file and it plays fine. Weird.
Since I was controlling a bunch of other DSP objects as well, I made sure I had wrapped the numerous audio calls with AudioNoInterrupts()/AudioInterrupts();
All files are converted to 44.1kHz, signed 16bit, little endian
I looked at the file's peaks, trimmed off the front end, lowered the volume... nothing. In the act of trying to repair the audio file, it was deleted and re-added to the card several times. Still crashed the Teensy if it was the first one played.
Then, looking at the list of files on the SD card, I noted it was the only file with a two character filename 'jr.wav'. All the others had at least 4 or 5 characters in the filename.
On a whim, I changed the filename to a 5-character filename, 'royer.wav'. It was my second last dart. The last was reserved for removing the file entirely and not even having it available to play.
But I didn't need to use it, renaming the file to a longer filename fixed the issue. No more crashes.
Audio file source
Files are being triggered via MQTT, all is well, no issues. Except...
I have one file out of a dozen, that when triggered as the first file to play at anytime after the Teensy reboots, the Teensy crashes and resets. No other file does it. Play any other file on boot, then play the suspect file and it plays fine. Weird.
Since I was controlling a bunch of other DSP objects as well, I made sure I had wrapped the numerous audio calls with AudioNoInterrupts()/AudioInterrupts();
All files are converted to 44.1kHz, signed 16bit, little endian
I looked at the file's peaks, trimmed off the front end, lowered the volume... nothing. In the act of trying to repair the audio file, it was deleted and re-added to the card several times. Still crashed the Teensy if it was the first one played.
Then, looking at the list of files on the SD card, I noted it was the only file with a two character filename 'jr.wav'. All the others had at least 4 or 5 characters in the filename.
On a whim, I changed the filename to a 5-character filename, 'royer.wav'. It was my second last dart. The last was reserved for removing the file entirely and not even having it available to play.
But I didn't need to use it, renaming the file to a longer filename fixed the issue. No more crashes.
Audio file source