Teensy and Audio Shield not working

Hi Paul,

Sorry to be confusing,maybe i didn't precise i use the USB AUDIO like that,with "AUDIO" type selected instead of "serial"

AudioPlaySdWav playSdWav1; //xy=154,217
AudioOutputUSB usb1; //xy=489,212

AudioConnection patchCord1(playSdWav1, 0, usb1, 0);
AudioConnection patchCord2(playSdWav1, 1, usb1, 1);

I mean,in my PC i open Audacity to visualize in the input monitor,if something arrive (teensy input selected in audacity),if something arrives,the VU-Meters
move,but nothing comes in.

What i do is some tests to verify is the AudioPlaySdWav player gives any sound,and i never heard anything with the sd wav player,even with I2s.

Forget about asio,it was out of subject :confused:
USB output requires another module to "drive" the audio process, look at the WavFilePlayerUSB example.

I test with teensy 4.1 and his own sd card and also with the audio board sd card,

First,the WavFilePlayerUSB example doesn't gives feedback in the monitor to show the sd card response,
so i had to transpose the wiring code into the WavFilePlayer example and it's ok with that,but no audio...

AudioPlaySdWav playWav1;
AudioOutputUSB audioOutput; // must set Tools > USB Type to Audio
AudioOutputAnalog dac; // change this to AudioOutputI2S for boards without DAC output
//AudioOutputI2S I2s;
AudioConnection patchCord1(playWav1, 0, audioOutput, 0);
AudioConnection patchCord2(playWav1, 1, audioOutput, 1);
//AudioConnection patchCord3(playWav1, 0, I2s, 0);
AudioConnection patchCord4(playWav1, 0, dac, 0);

i tried as you said with another module,dac or i2s,any combinations,but you didn't precise if the other module
stands alone or have to be together with the "AudioOutputUSB audioOutput; // must set Tools > USB Type to Audio" :confused:

ok,let's say i have a teensy 4.1 with his own sdcard,and want to hear the sdcard via usb-audio into my PC,
what couldbe the wirings?
Please check which version of Teensyduino you're using. In Arduino 2.x, look in the Boards Manager (search for "teensy"). In Arduino 1.8.x, click Help > About. If you have older than 1.58, please update.

Older versions required at least 1 connection to a hardware input or output. Without such a connection, the audio library could not run. The USB input and output aren't considered a hardware connection. With those older versions, to make USB work you would need to connect to I2S even if you don't want to use it.

Starting with 1.58, if no hardware input or output is present an IntervalTimer is automatically allocated to allow the library to run.
So,to be sure i updated to 1.59 beta3,but still no sound with sd card
So,to make it simple, i take a sample player with teensy 4.1 and simplify the sketch,
The teensy 4.1 is also connected to a PCM5102A DAC.
Only the i2s output gives me a sound but nothing in my PC via USB !

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// WAV files converted to code by wav2sketch
#include "AudioSampleSnare.h" // http://www.freesound.org/people/KEVOY/sounds/82583/

AudioPlayMemory sound0;

AudioOutputUSB usb;
AudioOutputI2S i2s;
AudioOutputAnalog dac;

AudioConnection c1(sound0, 0, usb, 0);
AudioConnection c2(sound0, 0, usb, 1);

AudioConnection c3(sound0, 0, i2s, 0);
AudioConnection c4(sound0, 0, dac, 0);

AudioControlSGTL5000 audioShield;

void setup() {

// Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example

// turn on the output


void loop() {




Edit: I ive made a mistake to use a USB HUB with no alimentation,but then i plugged the power and the sound go in,but nothing
to hear with sd card!
Last edited:
hey Paul,

Seems the WAV names of the tutorial samples wasn't accepted because of the all upper case names lie "SDTEST1.WAV,
but it was not notified in the monitor,i changed it to sdnew1.WAV and it worked fine,even a stereo sample is played
and the mix name of lower case and upper case accepted like: new1ST.WAV.
i'm glad SD Wav player works now :cool: