-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00e29ca
commit 99b6a07
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
examples/tests/codecs/test-codec-aac-fdk-dec/test-codec-aac-fdk-dec.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "AudioTools.h" | ||
#include "AudioCodecs/CodecAACFDK.h" | ||
#include "AudioLibs/AudioBoardStream.h" | ||
|
||
URLStream url("ssid","password"); // or replace with ICYStream to get metadata | ||
AudioBoardStream i2s(AudioKitEs8388V1); // final output of decoded stream | ||
EncodedAudioStream dec(&i2s, new AACDecoderFDK()); // Decoding stream | ||
StreamCopy copier(dec, url); // copy url to decoder | ||
|
||
|
||
void setup(){ | ||
Serial.begin(115200); | ||
AudioLogger::instance().begin(Serial, AudioLogger::Info); | ||
|
||
// setup i2s | ||
auto config = i2s.defaultConfig(TX_MODE); | ||
i2s.begin(config); | ||
|
||
// setup I2S based on sampling rate provided by decoder | ||
dec.begin(); | ||
|
||
// aac radio | ||
url.begin("http://peacefulpiano.stream.publicradio.org/peacefulpiano.aac","audio/aac"); | ||
|
||
} | ||
|
||
void loop(){ | ||
copier.copy(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters