Skip to content

Commit 53af601

Browse files
committed
FDK AAC Decoding test
1 parent 6e50e6e commit 53af601

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

examples/tests/codecs/test-codec-aac-fdk-dec/test-codec-aac-fdk-dec.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
// FDK AAC decoding test: psram must be active
2+
13
#include "AudioTools.h"
24
#include "AudioCodecs/CodecAACFDK.h"
35
#include "AudioLibs/AudioBoardStream.h"
46

7+
SET_LOOP_TASK_STACK_SIZE(50 * 1024);
8+
59
URLStream url("ssid","password"); // or replace with ICYStream to get metadata
610
AudioBoardStream i2s(AudioKitEs8388V1); // final output of decoded stream
711
EncodedAudioStream dec(&i2s, new AACDecoderFDK()); // Decoding stream
@@ -14,6 +18,8 @@ void setup(){
1418

1519
// setup i2s
1620
auto config = i2s.defaultConfig(TX_MODE);
21+
config.buffer_size = 1024;
22+
config.buffer_count = 20;
1723
i2s.begin(config);
1824

1925
// setup I2S based on sampling rate provided by decoder

src/AudioCodecs/CodecAACFDK.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ AudioInfoSupport *audioChangeFDK = nullptr;
2121
*/
2222
class AACDecoderFDK : public AudioDecoder {
2323
public:
24-
AACDecoderFDK(int output_buffer_size = 2048){
24+
AACDecoderFDK(int output_buffer_size = FDK_OUT_BUFFER_DEFAULT_SIZE){
2525
TRACED();
2626
dec = new aac_fdk::AACDecoderFDK(output_buffer_size);
2727
}

0 commit comments

Comments
 (0)