diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-08 11:36:10 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-08 11:36:10 +1000 |
| commit | 6c99f9f2fee0928987fe944c8ed29878064df87a (patch) | |
| tree | 644c89eb56881e29bbe5627b0e0842b3adfedca4 /src/audio/fatfs_audio_input.cpp | |
| parent | 49f82d2f3d31f5ecb26f1f45d091e346da515314 (diff) | |
| download | tangara-fw-6c99f9f2fee0928987fe944c8ed29878064df87a.tar.gz | |
Fix resampler issue, do a little performance tuning
Diffstat (limited to 'src/audio/fatfs_audio_input.cpp')
| -rw-r--r-- | src/audio/fatfs_audio_input.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/audio/fatfs_audio_input.cpp b/src/audio/fatfs_audio_input.cpp index 0c3ef20d..73586f09 100644 --- a/src/audio/fatfs_audio_input.cpp +++ b/src/audio/fatfs_audio_input.cpp @@ -30,6 +30,7 @@ #include "freertos/portmacro.h" #include "freertos/projdefs.h" #include "future_fetcher.hpp" +#include "idf_additions.h" #include "span.hpp" #include "stream_info.hpp" #include "tag_parser.hpp" @@ -40,8 +41,8 @@ static const char* kTag = "SRC"; namespace audio { -static constexpr UINT kFileBufferSize = 4096 * 2; -static constexpr UINT kStreamerBufferSize = 4096; +static constexpr UINT kFileBufferSize = 8 * 1024; +static constexpr UINT kStreamerBufferSize = 64 * 1024; static StreamBufferHandle_t sForwardDest = nullptr; @@ -143,7 +144,9 @@ FatfsAudioInput::FatfsAudioInput( : IAudioSource(), tag_parser_(tag_parser), has_data_(xSemaphoreCreateBinary()), - streamer_buffer_(xStreamBufferCreate(kStreamerBufferSize, 1)), + streamer_buffer_(xStreamBufferCreateWithCaps(kStreamerBufferSize, + 1, + MALLOC_CAP_SPIRAM)), streamer_(new FileStreamer(streamer_buffer_, has_data_)), input_buffer_(new RawStream(kFileBufferSize)), source_mutex_(), |
