Help configuring PlatformIO project for Teensy Audio

ltf

Member
Hi,
I've used PlatformIO without issues for several Teensy projects already, but this time I have an issue configuring a basic project using the Teensy Audio library.
(Note that the issue is not my code, it works uploaded from the Arduino IDE.)
The AudioOutputUSB class I'm trying to use is said to be undefined and I can see in "usb_audio.h" that the AUDIO_INTERFACE macro is indeed not defined, explaining the problem.
I thought adding the build flag USB_AUDIO was supposed to define this flag, but it does not. I've also tried other flags (commented out below) that come up in answers I found here and there, but without success. Here is the platformio.in file:
[env:teensy40]
framework = arduino
platform = teensy
upload_protocol = teensy-cli
board = teensy40
build_flags =
; -DUSB_INTERFACE
; -DUSB_SERIAL
-DUSB_AUDIO
lib_deps = paulstoffregen/Audio @ ^1.3
Anybody has experience with this? It might very well be a PlatformIO bug or misconfiguration, but maybe someone knows a trick.
For the record, I've reported it here as well: https://community.platformio.org/t/...endpoint-type-with-solution/895/6?u=donlencho
Thanks!
 
I have just tried it and it compiles fine if the lib_deps is commented out, using the audio lib that comes with the teensy core.
Is there a reason to have it included via lib_deps?
 
Ahum, well, thank you ! I did not try as I figured it had to be added, but indeed it is as simple as that...
Just strange that the library from the repo is not working in the same manner.
Also, for the record, this worked as well:
lib_deps = Audio @ ^1.3 ; instead of paulstoffregen/Audio @ ^1.3

Maybe the library repo should be cleaned up a bit...
Thanks again!
 
Back
Top