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

Thread: Master commit 7798d24 breaks audio library

  1. #1
    Senior Member
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    146

    Master commit 7798d24 breaks audio library

    Raised in GitHub as issue #607

    Audio/WavFilePlayer.ino example will not compile with cores 7798d24 and audio library 1c5426e

    • A complete copy of the code: Audio/examples/WavFilePlayer/WavFilePlayer.ino
    • Which Teensy board(s) are you using: Teensy 4.1
    • If other hardware is needed to reproduce the issue: n/a
    • Which version of Teensyduino: cores 7798d24 and Arduino 1.8.15 were used,
    • what Tools menu settings Teensy 4.1 / Serial + MIDI + Audio / 600MHz were chosen, and
    • which operating system was used: Windows 10.

    Error output is:
    Code:
    In file included from E:\Jonathan\Arduino\libraries\Audio/play_sd_raw.h:32:0,
                     from E:\Jonathan\Arduino\libraries\Audio/Audio.h:127,
                     from E:\Jonathan\Arduino\libraries\Audio\examples\WavFilePlayer\WavFilePlayer.ino:28:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src/SD.h:53:7: error: cannot derive from 'final' base 'File' in derived type 'SDFile'
     class SDFile : public File
           ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src/SD.h: In member function 'virtual File SDFile::openNextFile(uint8_t)':
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src/SD.h:131:41: error: no matching function for call to 'File::File(SDFile*)'
       if (file) return File(new SDFile(file));
                                             ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src/SD.h:35:0,
                     from E:\Jonathan\Arduino\libraries\Audio/play_sd_raw.h:32,
                     from E:\Jonathan\Arduino\libraries\Audio/Audio.h:127,
                     from E:\Jonathan\Arduino\libraries\Audio\examples\WavFilePlayer\WavFilePlayer.ino:28:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:130:2: note: candidate: File::File(const File&&)
      File(const File&& file) {
      ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:130:2: note:   no known conversion for argument 1 from 'SDFile*' to 'const File&&'
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:123:2: note: candidate: File::File(const File&)
      File(const File& file) {
      ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:123:2: note:   no known conversion for argument 1 from 'SDFile*' to 'const File&'
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:113:2: note: candidate: File::File(FileImpl*)
      File(FileImpl *file) {
      ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:113:2: note:   no known conversion for argument 1 from 'SDFile*' to 'FileImpl*'
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:106:12: note: candidate: constexpr File::File()
      constexpr File() : f(nullptr) { }
                ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:106:12: note:   candidate expects 0 arguments, 1 provided
    In file included from E:\Jonathan\Arduino\libraries\Audio/play_sd_raw.h:32:0,
                     from E:\Jonathan\Arduino\libraries\Audio/Audio.h:127,
                     from E:\Jonathan\Arduino\libraries\Audio\examples\WavFilePlayer\WavFilePlayer.ino:28:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src/SD.h: In member function 'virtual File SDClass::open(const char*, uint8_t)':
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src/SD.h:164:41: error: no matching function for call to 'File::File(SDFile*)'
       if (file) return File(new SDFile(file));
                                             ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src/SD.h:35:0,
                     from E:\Jonathan\Arduino\libraries\Audio/play_sd_raw.h:32,
                     from E:\Jonathan\Arduino\libraries\Audio/Audio.h:127,
                     from E:\Jonathan\Arduino\libraries\Audio\examples\WavFilePlayer\WavFilePlayer.ino:28:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:130:2: note: candidate: File::File(const File&&)
      File(const File&& file) {
      ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:130:2: note:   no known conversion for argument 1 from 'SDFile*' to 'const File&&'
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:123:2: note: candidate: File::File(const File&)
      File(const File& file) {
      ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:123:2: note:   no known conversion for argument 1 from 'SDFile*' to 'const File&'
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:113:2: note: candidate: File::File(FileImpl*)
      File(FileImpl *file) {
      ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:113:2: note:   no known conversion for argument 1 from 'SDFile*' to 'FileImpl*'
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:106:12: note: candidate: constexpr File::File()
      constexpr File() : f(nullptr) { }
                ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/FS.h:106:12: note:   candidate expects 0 arguments, 1 provided
    Multiple libraries were found for "Audio.h"
     Used: E:\Jonathan\Arduino\libraries\Audio
     Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio
    Multiple libraries were found for "SD.h"
     Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
     Not used: C:\Program Files (x86)\Arduino\libraries\SD
    Error compiling for board Teensy 4.1.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,222
    This error means you have some of the new 1.55 stuff, but other parts are still from 1.54.

    Please install 1.55-beta2, so you have a consistent set all the recent changes.

    https://forum.pjrc.com/threads/68121...no-1-55-Beta-2

    I'm running WavFilePlayer here on a Teensy 4.1 with all the latest updates (which will soon be 1.55-beta3) and it's playing nicely.

  3. #3
    Senior Member
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    146
    Thanks Paul. I've forked "cores" from your repo so I can work on dynamic audio objects, and tried to keep it up to date with your [only] master branch, but clearly that can get out of step with other parts of Teensyduino. I can't immediately see how to get hold of the rest of Teensyduino from the repo, and of course installing a beta means cores gets overwritten...

    Anyway, thanks for you valuable time, much appreciated.

    Cheers

    Jonathan

Posting Permissions

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