Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: AudioInputAnalog pin selection broken at compile time? (Teensy4)

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    9

    AudioInputAnalog pin selection broken at compile time? (Teensy4)

    Hello, all...

    I'm trying to use the documented special constructor for AudioInputAnalog on a Teensy4, whereby I feed it a uint8 to choose which ADC-capable pin it attaches to. Like so....

    Code:
    AudioInputAnalog         light_adc(22);  //xy=88.00000381469727,389.0000171661377
    AudioInputAnalog         mic_adc;      //xy=89.00000762939453,422.4285945892334
    Documentation suggests I ought to be able to do this, but GCC fails the build like so...

    Code:
    /tmp/arduino_build_647277/sketch/Tricorder-Mk2.ino.cpp.o: In function `AudioInputAnalog::AudioInputAnalog(unsigned char)':
    /opt/Arduino/hardware/teensy/avr/libraries/Audio/input_adc.h:38: undefined reference to `AudioInputAnalog::init(unsigned char)'
    /tmp/arduino_build_647277/sketch/Tricorder-Mk2.ino.cpp.o: In function `AudioStream::AudioStream(unsigned char, audio_block_struct**)':
    /opt/Arduino/hardware/teensy/avr/cores/teensy4/AudioStream.h:129: undefined reference to `vtable for AudioInputAnalog'
    Compile works if I leave the constructor without arguments. Compile also works WITH the argument if I target a Teensy3.2, so I think it's a bug in the Teensy4 implementation of Audio.

    I am presently working from the github master branch of Audio.

    Any help would be appreciated.

    ---Ian

  2. #2
    Junior Member
    Join Date
    Jul 2013
    Posts
    9
    Ah... nevermind for now. I just read this thread (posted before mine):
    https://forum.pjrc.com/threads/58754...the-Teensy-4-0

    I guess even if pin selection didn't fail at compile time, I have no reason to believe it should work yet, but that it is forthcoming.
    I'll work another problem for a few weeks.

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •