PeakMeterMono Example Error Compiling on Teensy 4.0

Status
Not open for further replies.

FillGee

New member
Hi,
As I am venturing into using the Teensy for audio processing, I have encountered a speedbump.

I have a 3.5mm TRRS jack wired up to pin 16 (A2) on my Teensy 4.0 following the suggested circuit on the design tool (shown below).
adccircuit.png

I wanted to test the input so I loaded up the "PeakMeterMono" sketch that is included under the audio examples, but when I try to compile and run the program completed unedited, I get an "Error compiling for board Teensy 4.0".
Full error code is here:
Code:
Arduino: 1.8.10 (Windows 10), TD: 1.48, Board: "Teensy 4.0, Serial, 600 MHz, Faster, US English"

C:\Users\---\AppData\Local\Temp\arduino_build_262521\sketch\PeakMeterMono.ino.cpp.o: In function `AudioInputAnalog::AudioInputAnalog()':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/input_adc.h:37: undefined reference to `AudioInputAnalog::init(unsigned char)'

C:\Users\---\AppData\Local\Temp\arduino_build_262521\sketch\PeakMeterMono.ino.cpp.o: In function `AudioStream::AudioStream(unsigned char, audio_block_struct**)':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/AudioStream.h:130: undefined reference to `vtable for AudioInputAnalog'

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "Audio.h"
 Used: C:\Program
Multiple libraries were found for "SPI.h"
 Used: C:\Program
Multiple libraries were found for "SD.h"
 Used: C:\Users\---\Documents\Arduino\libraries\SD
 Not used: C:\Program
 Not used: C:\Program
Multiple libraries were found for "SerialFlash.h"
 Used: C:\Program
Multiple libraries were found for "Wire.h"
 Used: C:\Program
Error compiling for board Teensy 4.0.
The same error occurs anytime I try to use a sketch that contains AudioInputAnalog it seems. Is there any fix to this, or do I just need to bite the bullet and buy an audio shield to wire the 3.5mm jack to?
 
I don't think AudioInputAnalog is supported yet on the T4. In the interim maybe try a T3.5 or T3.6
 
Dang, that's what I figured but was hoping wasn't true.

This new audio project is really going to be an addon to an existing project in which I have already mounted and soldered things in place, so I would prefer to not have to change boards to a 3.5 or 3.6 and undo it all.

Regarding my final question in the original post, if I get the audio shield for the 4.0, I can simply wire the TRRS jack into the line-in inputs without any issue correct? The library seems to have a lot of examples for getting audio out of the shield but not so much documentation for getting sound into it except for through the SD card.
 
Status
Not open for further replies.
Back
Top