teensy36.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensy36.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensy36.menu.usb.serialmidiaudio.upload_port.usbtype=USB_MIDI_AUDIO_SERIAL
teensy36.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio
teensy36.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL
teensy36.menu.usb.serialmidi16audio.upload_port.usbtype=USB_MIDI16_AUDIO_SERIAL
Is your Teensy core library up to date? With Arduino IDE this is easy to check. Have no idea what to do with PlatformIO.
I do know the Serial + MIDI + Audio type had a bug on Teensy 4.0 which was fixed with version 1.52. Probably unrelated since you're using Teensy 3.6... and 1.52 is so old.
Still, worthwhile to check that you're really using the latest core library, just in case.
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=165,171
AudioOutputUSB usb1; //xy=502,170
AudioConnection patchCord1(i2s1, 0, usb1, 0);
AudioConnection patchCord2(i2s1, 1, usb1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=314,496
// GUItool: end automatically generated code
void setup(void)
{
Serial.begin(38400);
Serial.print("running");
AudioMemory(5);
sgtl5000_1.enable();
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.volume(0.5);
}
void loop(void)
{
}
Is your Teensy core library up to date? With Arduino IDE this is easy to check. Have no idea what to do with PlatformIO.
I do know the Serial + MIDI + Audio type had a bug on Teensy 4.0 which was fixed with version 1.52. Probably unrelated since you're using Teensy 3.6... and 1.52 is so old.
Still, worthwhile to check that you're really using the latest core library, just in case.
Might be worth boosting your AudioMemory(5) up a bit? The USB audio object uses a couple of blocks per channels as buffers, so you're perilously close to starving the system of blocks for use elsewhere in the flow. Though I don't see why it would affect only the Serial+MIDI+Audio build.