diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-09-22 09:31:21 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-09-22 21:19:19 +1000 |
| commit | cbd99b2134c6c471708deb409a4b0fcc4c31516d (patch) | |
| tree | d67872e11c82deabf4e0e72645e344d98e52ec3d /src | |
| parent | 022c222e858665054ca5cded512ae085da7939d0 (diff) | |
| download | tangara-fw-cbd99b2134c6c471708deb409a4b0fcc4c31516d.tar.gz | |
Increase sample buffer sizes
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio/audio_converter.cpp | 2 | ||||
| -rw-r--r-- | src/audio/audio_decoder.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/audio/audio_converter.cpp b/src/audio/audio_converter.cpp index 474bbd9f..88017bf1 100644 --- a/src/audio/audio_converter.cpp +++ b/src/audio/audio_converter.cpp @@ -23,7 +23,7 @@ static constexpr char kTag[] = "mixer"; -static constexpr std::size_t kSampleBufferLength = 240 * 2 * 8; +static constexpr std::size_t kSampleBufferLength = 240 * 2 * 64; static constexpr std::size_t kSourceBufferLength = kSampleBufferLength * 2 * sizeof(sample::Sample); diff --git a/src/audio/audio_decoder.cpp b/src/audio/audio_decoder.cpp index f4868daa..f9ab0f78 100644 --- a/src/audio/audio_decoder.cpp +++ b/src/audio/audio_decoder.cpp @@ -46,7 +46,7 @@ namespace audio { static const char* kTag = "audio_dec"; -static constexpr std::size_t kCodecBufferLength = 240 * 4 * 16; +static constexpr std::size_t kCodecBufferLength = 240 * 4 * 64; Timer::Timer(const codecs::ICodec::OutputFormat& format) : current_seconds_(0), @@ -91,6 +91,7 @@ Decoder::Decoder(std::shared_ptr<IAudioSource> source, codec_(), timer_(), current_format_() { + ESP_LOGI(kTag, "allocating codec buffer, %u KiB", kCodecBufferLength / 1024); codec_buffer_ = { reinterpret_cast<sample::Sample*>(heap_caps_calloc( kCodecBufferLength, sizeof(sample::Sample), MALLOC_CAP_SPIRAM)), |
