|
|
|
@ -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)), |
|
|
|
|