From 93ccf11fc506b95221ce0c5eddaed9e0e6c8b3b5 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 8 Aug 2023 13:47:08 +1000 Subject: Investigate and improve core pinning for resampler --- src/audio/audio_task.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/audio/audio_task.cpp') diff --git a/src/audio/audio_task.cpp b/src/audio/audio_task.cpp index 7c038730..75b44594 100644 --- a/src/audio/audio_task.cpp +++ b/src/audio/audio_task.cpp @@ -109,7 +109,10 @@ auto Timer::bytes_to_samples(uint32_t bytes) -> uint32_t { auto AudioTask::Start(IAudioSource* source, IAudioSink* sink) -> AudioTask* { AudioTask* task = new AudioTask(source, sink); - tasks::StartPersistent([=]() { task->Main(); }); + // Pin to CORE1 because codecs should be fixed point anyway, and being on + // the opposite core to the mixer maximises throughput in the worst case + // (some heavy codec like opus + resampling for bluetooth). + tasks::StartPersistent(1, [=]() { task->Main(); }); return task; } -- cgit v1.2.3