Hello,
I am getting an error I have not found anywhere else online when I compile the MP3Player example sketch that comes with the SerialFlash library. I am using the Teensy 3.2 with the Prop Shield.
I have all of the above installed, possibly with the exception of <play_sd_mp3.h> from Arduino-Teensy-Codec-lib. I'm not sure if I isntalled it properly, but the error at hand should not have anything to do with that.
When I compile, I get an error that tells me that the AudioOutputAnalog does not define a type. Additionally, it tells me that 'dac1' was not declared in the scope.
I do not understand why this is happening. The only thing I can get from this is what is at face value, being that AudioOutputAnalog appears to be undefined from the included header files, so the compiler wants a type definition and is treating it as a variable name. In my Arduino IDE though the name appears orange, which I think means that it *is* actually recognised. After some google searching, it doesn't seem like this is a common issue. Nor do these libraries appear to be very well documented, as seems to be the case for many arduino files.
Also, the warning in there about multiple libraries is fine. I had duplicated the Arduino-Teensy-Codec-lib-master and just had not deleted the copy yet.
I am a newcommer to Arduino, so if something is blatantly obvious to an expirenced person, I don't see it.
Any help is appreciated.
I am getting an error I have not found anywhere else online when I compile the MP3Player example sketch that comes with the SerialFlash library. I am using the Teensy 3.2 with the Prop Shield.
Code:
// Simple MP3 file player example
//
// https://forum.pjrc.com/threads/27059-MP3-Player-Lib-with-example?p=101537&viewfull=1#post101537
//
// Requires the prop-shield and Teensy 3.2 or 3.1
// This example code is in the public domain.
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#include <play_sd_mp3.h> // https://github.com/FrankBoesing/Arduino-Teensy-Codec-lib
//#include <play_sd_aac.h>
// GUItool: begin automatically generated code
//AudioPlaySdWav playSdWav1; //xy=154,422
AudioPlaySdMp3 playMp31; //xy=154,422
AudioMixer4 mixer1; //xy=327,432
AudioOutputAnalog dac1; //xy=502,412 ###ERROR HERE###
AudioConnection patchCord1(playMp31, 0, mixer1, 0);
AudioConnection patchCord2(playMp31, 1, mixer1, 1);
AudioConnection patchCord3(mixer1, dac1);
I have all of the above installed, possibly with the exception of <play_sd_mp3.h> from Arduino-Teensy-Codec-lib. I'm not sure if I isntalled it properly, but the error at hand should not have anything to do with that.
When I compile, I get an error that tells me that the AudioOutputAnalog does not define a type. Additionally, it tells me that 'dac1' was not declared in the scope.
Code:
MP3Player:20: error: 'AudioOutputAnalog' does not name a type
AudioOutputAnalog dac1; //xy=502,412
^
MP3Player:23: error: 'dac1' was not declared in this scope
AudioConnection patchCord3(mixer1, dac1);
^
Multiple libraries were found for "play_sd_mp3.h"
Used: C:\...\Arduino\libraries\Arduino-Teensy-Codec-lib-master
Not used: C:\...\Documents\Arduino\libraries\TeensyCodec
'AudioOutputAnalog' does not name a type
I do not understand why this is happening. The only thing I can get from this is what is at face value, being that AudioOutputAnalog appears to be undefined from the included header files, so the compiler wants a type definition and is treating it as a variable name. In my Arduino IDE though the name appears orange, which I think means that it *is* actually recognised. After some google searching, it doesn't seem like this is a common issue. Nor do these libraries appear to be very well documented, as seems to be the case for many arduino files.
Also, the warning in there about multiple libraries is fine. I had duplicated the Arduino-Teensy-Codec-lib-master and just had not deleted the copy yet.
I am a newcommer to Arduino, so if something is blatantly obvious to an expirenced person, I don't see it.
Any help is appreciated.