Example for mp3/Opus encoding #1016
-
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 2 replies
-
I guess you are missing the necessary includes in your sketch! |
Beta Was this translation helpful? Give feedback.
-
It is definitely installd and included: Any other idea? |
Beta Was this translation helpful? Give feedback.
-
Did you try to compile the codec test sketches ? |
Beta Was this translation helpful? Give feedback.
-
Since you did not provide any test sketch for me, I created a very simple one. #include "AudioTools.h"
#include "AudioCodecs/CodecMP3LAME.h"
I2SStream out;
EncodedAudioStream decoder(&out, new MP3EncoderLAME()); // encode and write
void setup() {
Serial.begin(115200);
AudioLogger::instance().begin(Serial, AudioLogger::Info);
}
// copy the data
void loop() {
} |
Beta Was this translation helpful? Give feedback.
-
Just did and it works with that example! So it seems like I have to declare it explicitly: Compilation was succesful! Cannot thank you enough for your awesome support and work here!! |
Beta Was this translation helpful? Give feedback.
-
That's strange: If you check in the Board Manager: what ESP32 release are you using ? |
Beta Was this translation helpful? Give feedback.
-
Maybe you should use some more recent version: The current Arduino Version is 2.0.14 and if you are still using 2.0.5 you are quite some versions behind. If you check with https://github.com/platformio/platform-espressif32 the actual version is 6.4.0 |
Beta Was this translation helpful? Give feedback.
-
Opus needs to be used with a container, this is usually ogg. My recommendation would be to use ADPC. It is lean, fast, efficient on microcontrollers and it is compressing... |
Beta Was this translation helpful? Give feedback.
I guess you are missing the necessary includes in your sketch!
Check the Codec Wiki documentation: It tells you the class name and the include