Teensy 4.1 Audio

bdoan

Well-known member
I am using the 4.1 with audio shield as a USB to analog audio interface.

Running Windows 10 and seeing that the Windows sound control panel volume slider does not affect the headphone output level.

Is this by design or am I doing something wrong.

Volume pot terminal (15) is not connected.
 
This works for me using an external I2S DAC:

C++:
#include <Audio.h>

AudioInputUSB usb1;
AudioAmplifier amp2;
AudioAmplifier amp1;
AudioOutputI2S i2s1;
AudioConnection patchCord1(usb1, 0, amp1, 0);
AudioConnection patchCord2(usb1, 1, amp2, 0);
AudioConnection patchCord3(amp2, 0, i2s1, 1);
AudioConnection patchCord4(amp1, 0, i2s1, 0);

void setup() {
  AudioMemory(12);
}

void loop() {
  float vol = usb1.volume();  // read PC volume setting
  amp1.gain(vol);             // set gain according to PC volume
  amp2.gain(vol);
  delay(100);
}

Paul
 
Back
Top