I am having an awful time with this issue. I haven't even gotten to the point of debugging my code. I can't seem to get things right when it comes to including the proper libraries.
I am using the latest 2.2.1 IDE. It is a clean install with minimal libraries. I have installed the latest Espressif board files. This is for a ESP32 board. I generally use Visual Studio with VisualMicro installed for code development. The program is quite far along and working as it should. I got to the point where I needed to add the ability to play a sound file to a I2S DAC amplifier. I attempted to use Phill Schatzmann's audio tool library. That's when the trouble started. Just adding the library to the project caused it to not compile. Issues with not being able to fine the WiFiClientServer or some such thing.
I then went to the Arduino IDE and loaded in the simplest example (streams-generator-i2s.ino) which uses just one library (AudioTools.h). It compiles and runs fine. I then went to the example that plays an mp3 file from memory (streams-memory_mp3_short-i2s-2.ino). It does not compile.
Here is the code:
t/**
* @file streams-memory_mp3_short-i2s-2.ino
* @author Phil Schatzmann
* @brief decode MP3 stream and output as i2s signal
* @version 0.1
* @date 2021-01-24
*
* @copyright Copyright (c) 2021
*/
#include "AudioTools.h"
#include "AudioCodecs/CodecMP3Helix.h"
#include "zero.h"
MemoryStream mp3(zero_mp3, zero_mp3_len);
I2SStream i2s; // PWM output
MP3DecoderHelix helix;
EncodedAudioStream out(&i2s, &helix); // output to decoder
StreamCopy copier(out, mp3); // copy in to out
void setup(){
Serial.begin(115200);
AudioLogger::instance().begin(Serial, AudioLogger::Info);
// begin processing
auto cfg = i2s.defaultConfig();
cfg.sample_rate = 24000;
cfg.channels = 1;
cfg.pin_data = 25;
cfg.pin_bck = 32;
cfg.pin_ws = 33;
i2s.begin(cfg);
out.begin();
sayWord();
}
void sayWord() {
Serial.println("Saying word...");
mp3.begin(); // restart source
helix.begin(); // so that we can repeatedly call this method
copier.copyAll();
helix.end(); // flush output
}
void loop(){
}
I get the following error message:
In file included from C:\Users\xxxxxxxx\AppData\Local\Temp\.arduinoIDE-unsaved2023119-13344-1t4v450.60kh\streams-memory_mp3_short-i2s-2\streams-memory_mp3_short-i2s-2.ino:13:
D:\My Documents\Arduino\libraries\arduino-audio-tools-main\src/AudioCodecs/CodecMP3Helix.h:6:10: fatal error: MP3DecoderHelix.h: No such file or directory
#include "MP3DecoderHelix.h"
^~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
I have been at this all day and making no progress. Any help would be greatly appreciated.