diff options
| author | Be <be.0@gmx.com> | 2025-04-14 02:27:40 -0500 |
|---|---|---|
| committer | Be <be.0@gmx.com> | 2025-04-14 02:27:40 -0500 |
| commit | ff811ba810eadbed447acdbf6d5291164d75cd9d (patch) | |
| tree | d143df298f0583a8c20e403809ad736ecb08c130 /src | |
| parent | 20ccf51d2ba386d960e60b993ceaa02e3bda557c (diff) | |
| download | tangara-fw-ff811ba810eadbed447acdbf6d5291164d75cd9d.tar.gz | |
move SampleProcessor buffers to external RAM
This increases CPU usage by ~2% for the audio_conv task, which I
think is an acceptable tradeoff. The Speex resampler still
makes its own allocations in internal RAM.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tangara/audio/processor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tangara/audio/processor.cpp b/src/tangara/audio/processor.cpp index 2fa7f78e..3126f050 100644 --- a/src/tangara/audio/processor.cpp +++ b/src/tangara/audio/processor.cpp @@ -52,7 +52,7 @@ SampleProcessor::SampleProcessor(drivers::PcmBuffer& sink) : commands_(xQueueCreate(2, sizeof(Args))), source_(xStreamBufferCreateWithCaps(kSourceBufferLength + 1, sizeof(sample::Sample), - MALLOC_CAP_DMA)), + MALLOC_CAP_SPIRAM)), sink_(sink), unprocessed_samples_(0) { tasks::StartPersistent<tasks::Type::kAudioConverter>([&]() { Main(); }); @@ -354,7 +354,7 @@ Buffer::Buffer() : storage_(reinterpret_cast<sample::Sample*>( heap_caps_calloc(kSampleBufferLength, sizeof(sample::Sample), - MALLOC_CAP_DMA))), + MALLOC_CAP_SPIRAM))), buffer_(storage_, kSampleBufferLength), samples_in_buffer_() {} |
