Monitoring AudioOutputUSB from Teensy 4.0

Status
Not open for further replies.

MattHood0

New member
Hi all,

Just downloaded the latest Teensyduino v1.52 beta #2, and I'm trying to get USB output working. I've modified the code below from the PT8211 sine example, and I'm trying to work out how to monitor the output.

1) Should this code work?

2) If so, how can I successfully monitor it? So far I've tried using Logic Pro X, with a channel strip taking Teensy as input and built-in speakers as output.

I'm on MacOS 10.14, with my Teensy 4.0 set to Audio+Serial+MIDI


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

// GUItool: begin automatically generated code
AudioSynthWaveform       waveform1;      //xy=110,75
AudioOutputUSB        usb1;          //xy=303,78
AudioConnection          patchCord1(waveform1, 0, usb1, 0);
AudioConnection          patchCord2(waveform1, 0, usb1, 1);
// GUItool: end automatically generated code

void setup() {
  AudioMemory(15);
  waveform1.begin(WAVEFORM_SINE);
  waveform1.frequency(440);
  waveform1.amplitude(0.99);
}

void loop() {
}

Thanks for any help.

Cheers,
Matt.
 
No.
"At least one non-USB input or output object must be present for the entire library to update."
For example add an I2S-Output object. No "AudioConnection" (Patchcord) is needed.

Thanks for that Frank, I remember reading that now but it totally slipped my mind. Much appreciated.
 
Status
Not open for further replies.
Back
Top