Skip to content

Commit

Permalink
FDK AAC Decoding test
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Sep 21, 2024
1 parent 6e50e6e commit 53af601
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// FDK AAC decoding test: psram must be active

#include "AudioTools.h"
#include "AudioCodecs/CodecAACFDK.h"
#include "AudioLibs/AudioBoardStream.h"

SET_LOOP_TASK_STACK_SIZE(50 * 1024);

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
Expand All @@ -14,6 +18,8 @@ void setup(){

// setup i2s
auto config = i2s.defaultConfig(TX_MODE);
config.buffer_size = 1024;
config.buffer_count = 20;
i2s.begin(config);

// setup I2S based on sampling rate provided by decoder
Expand Down
2 changes: 1 addition & 1 deletion src/AudioCodecs/CodecAACFDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AudioInfoSupport *audioChangeFDK = nullptr;
*/
class AACDecoderFDK : public AudioDecoder {
public:
AACDecoderFDK(int output_buffer_size = 2048){
AACDecoderFDK(int output_buffer_size = FDK_OUT_BUFFER_DEFAULT_SIZE){
TRACED();
dec = new aac_fdk::AACDecoderFDK(output_buffer_size);
}
Expand Down

0 comments on commit 53af601

Please sign in to comment.