Skip to content

Commit 485eca6

Browse files
committed
refactor: changed spsc strategies
1 parent 62bb5ad commit 485eca6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/react-native-audio-api/common/cpp/audioapi/core/sources/AudioFileSourceNode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ AudioFileSourceNode::AudioFileSourceNode(
5454

5555
seekOffloader_ = std::make_unique<task_offloader::TaskOffloader<
5656
OffloadedSeekRequest,
57-
spsc::OverflowStrategy::WAIT_ON_FULL,
58-
spsc::WaitStrategy::YIELD>>(
57+
spsc::OverflowStrategy::OVERWRITE_ON_FULL,
58+
spsc::WaitStrategy::ATOMIC_WAIT>>(
5959
SEEK_OFFLOADER_WORKER_COUNT, [this](OffloadedSeekRequest req) { runOffloadedSeekTask(req); });
6060

6161
isInitialized_.store(true, std::memory_order_release);

packages/react-native-audio-api/common/cpp/audioapi/core/sources/AudioFileSourceNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ class AudioFileSourceNode : public AudioNode {
141141

142142
std::unique_ptr<task_offloader::TaskOffloader<
143143
OffloadedSeekRequest,
144-
spsc::OverflowStrategy::WAIT_ON_FULL,
145-
spsc::WaitStrategy::YIELD>>
144+
spsc::OverflowStrategy::OVERWRITE_ON_FULL,
145+
spsc::WaitStrategy::ATOMIC_WAIT>>
146146
seekOffloader_;
147147
};
148148

0 commit comments

Comments
 (0)