summaryrefslogtreecommitdiff
path: root/src/audio/sink_mixer.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-08 13:47:08 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-08 13:47:08 +1000
commit93ccf11fc506b95221ce0c5eddaed9e0e6c8b3b5 (patch)
treefa70d13bf2df49f9601ceaca166ef31c3f034b69 /src/audio/sink_mixer.cpp
parent6c99f9f2fee0928987fe944c8ed29878064df87a (diff)
downloadtangara-fw-93ccf11fc506b95221ce0c5eddaed9e0e6c8b3b5.tar.gz
Investigate and improve core pinning for resampler
Diffstat (limited to 'src/audio/sink_mixer.cpp')
-rw-r--r--src/audio/sink_mixer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/audio/sink_mixer.cpp b/src/audio/sink_mixer.cpp
index 5a5a8616..6c72c8b0 100644
--- a/src/audio/sink_mixer.cpp
+++ b/src/audio/sink_mixer.cpp
@@ -38,7 +38,10 @@ SinkMixer::SinkMixer(StreamBufferHandle_t dest)
input_stream_.reset(new RawStream(kSampleBufferLength));
resampled_stream_.reset(new RawStream(kSampleBufferLength));
- tasks::StartPersistent<tasks::Type::kMixer>(1, [&]() { Main(); });
+ // Pin to CORE0 because we need the FPU.
+ // FIXME: A fixed point implementation could run freely on either core,
+ // which should lead to a big performance increase.
+ tasks::StartPersistent<tasks::Type::kMixer>(0, [&]() { Main(); });
}
SinkMixer::~SinkMixer() {