How to apply effetcs to a mp3 stream? #662
-
Hi, I followed the exemple on how to apply effects to any stream, though Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
Sure, you would just decode the mp3 first, how to do this is described in the documentation |
Beta Was this translation helpful? Give feedback.
-
following the example: " streams-audiokit-effects-audiokit" I tried to add effects to the "player-sd-audiokit" exemple. this is what I came up with so far: #include "AudioTools.h" const int sample_rate = 44100; Delay del(0, sample_rate); AudioSourceSD source(startFilePath, ext, PIN_AUDIO_KIT_SD_CARD_CS); AudioEffectStream effects(kit); void updateValues() { // setup output effects.addEffect(del); // setup player } Cheers |
Beta Was this translation helpful? Give feedback.
-
You got the processing chain completly wrong: if you want to use the AudioPlayer, you just send the output the the effects instead of the kit. No further data copy is necessary! : AudioPlayer player(source, effects, decoder); |
Beta Was this translation helpful? Give feedback.
-
Did you try to set the log level to warning ? |
Beta Was this translation helpful? Give feedback.
-
Updated the code to change this to a Info message instead of a warning. It just indicated that the file has finished and it's moving to the next file now... |
Beta Was this translation helpful? Give feedback.
-
Hi, I tried applying effects on a short "wav" file ( 16BIT 44100hz ) Any clue about what parameter I could try to tweak ? code used: #include "AudioTools.h" const char startFilePath = "/"; Delay del(0, sample_rate); AudioSourceSD source(startFilePath, ext, PIN_AUDIO_KIT_SD_CARD_CS); void updateValues() { // setup output effects.addEffect(del); |
Beta Was this translation helpful? Give feedback.
-
Not sure, where this could come from.
|
Beta Was this translation helpful? Give feedback.
-
I configure channel/sample.rate in the setup : cfg.channels = 1; and the artifacts disappeared. |
Beta Was this translation helpful? Give feedback.
Sure, you would just decode the mp3 first, how to do this is described in the documentation