diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-08 20:25:42 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-08 20:25:42 +1000 |
| commit | e1181fbe59a835ea9c93d6e067e9757e8c522d3c (patch) | |
| tree | 2fd61bb93713de8c2205b7b6d0a8c84c49832e93 /src/audio/fatfs_audio_input.cpp | |
| parent | c3f40a8cc37114365ef3ec6f2888df64e5206b39 (diff) | |
| parent | 592f231627843bc44ebaaa4506aec26da1f56499 (diff) | |
| download | tangara-fw-e1181fbe59a835ea9c93d6e067e9757e8c522d3c.tar.gz | |
Merge branch 'main' into opus
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_(), |
