Files
klubhaus-doorbell/libraries/audio-tools/examples/tests/codecs/test-mp3-helix/test-mp3-helix.ino
2026-02-16 19:05:11 -08:00

30 lines
743 B
C++

/**
* @brief Tesing the MP3DecoderHelix
*
*/
// install https://github.com/pschatzmann/arduino-libhelix.git
#include "AudioTools.h"
#include "AudioTools/AudioLibs/AudioBoardStream.h"
#include "AudioTools/AudioCodecs/CodecMP3Helix.h"
#include "BabyElephantWalk60_mp3.h"
MemoryStream mp3(BabyElephantWalk60_mp3, BabyElephantWalk60_mp3_len);
//CsvOutput<int16_t> out(Serial,2);
AudioBoardStream out(AudioKitEs8388V1);
EncodedAudioStream decoder(&out, new MP3DecoderHelix()); // output to decoder
StreamCopy copier(decoder, mp3);
void setup(){
Serial.begin(115200);
// setup I2s
out.begin(out.defaultConfig());
AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Info);
decoder.begin();
}
void loop(){
copier.copy();
}