Hi, i am trying to get audio in to my teensy 3.1 (MK20DX256 with audio shield, Audio lib 1.3.0) via usb but it stops working after ca. 1 minute. Audio out via usb or I2S works fine.
At first the audio stream sounds ok but over time it gets more and more digital artefacts until the sound is completely distorted. After a reset the sound is back to normal for ca. 1 minute.
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioInputUSB usb1; //xy=200,69 (must set Tools > USB Type to Audio)
AudioOutputI2S i2s1; //xy=365,94
AudioConnection patchCord1(usb1, 0, i2s1, 0);
AudioConnection patchCord2(usb1, 1, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=302,184
void setup() {
AudioMemory(12);
sgtl5000_1.enable();
sgtl5000_1.volume(0.3);
}
void loop() {
// TODO: make PC's volume setting control the SGTL5000 volume...
}
At first the audio stream sounds ok but over time it gets more and more digital artefacts until the sound is completely distorted. After a reset the sound is back to normal for ca. 1 minute.
Last edited: