Skip to content

refactor: single promise lane for recorder and context - #1338

Merged
mdydek merged 7 commits into
mainfrom
refactor/less-threadsv2
Oct 14, 2026
Merged

mdydek merged 7 commits into
mainfrom
refactor/less-threadsv2

Conversation

@mdydek

@mdydek mdydek commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Closes #

⚠️ Breaking changes ⚠️

  • pause, resume and disableFileOutput of recorder are now async

Introduced changes

  • created a new property in the JsiPromise called executor which decides how to delegate the work, recorder and context get SerialExecutor because their promises modify the internal state and should be called sequentially
  • recorder now uses new SerialExecutor to serialize its calls, number of threads per recorder drops from 5 to 1
  • context also uses SerialExecutor because of that same purpose, number of threads per context drops from 6 to 1

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

@mdydek mdydek added the refactor Code restructuring without altering external behavior or fixing bugs label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

WPT non-regression comparison

PASS — no regressions · 0 improved section(s) · overall 3427 → 3427 (0)

Unchanged sections (28)
Spec section Base pass Head pass Delta
Processing model 1 1 0
Other 56 56 0
AnalyserNode 138 138 0
AudioBuffer 140 140 0
AudioBufferSourceNode 220 220 0
AudioContext 58 58 0
AudioNode 261 261 0
AudioParam 680 680 0
BiquadFilterNode 275 275 0
ChannelMergerNode 30 30 0
ChannelSplitterNode 7 7 0
ConstantSourceNode 64 64 0
ConvolverNode 178 178 0
DelayNode 127 127 0
DestinationNode 0 0 0
DynamicsCompressorNode 4 4 0
GainNode 15 15 0
IIRFilterNode 87 87 0
MediaElementAudioSourceNode 0 0 0
MediaStreamAudioDestinationNode 1 1 0
MediaStreamAudioSourceNode 0 0 0
OfflineAudioContext 35 35 0
OscillatorNode 104 104 0
PannerNode 727 727 0
PeriodicWave 33 33 0
ScriptProcessorNode 0 0 0
StereoPannerNode 104 104 0
WaveShaperNode 82 82 0

Baseline: 604a55c525f7ea272b7d007144418557be212213 · Candidate: f3cb27330187181bfe16b6c4953263fe4095cc71

Workflow run · this comment is updated on every push.

Comment thread packages/audiodocs/docs/inputs/audio-recorder.mdx Outdated
Comment thread packages/audiodocs/docs/inputs/audio-recorder.mdx Outdated
Comment thread packages/react-native-audio-api/common/cpp/audioapi/core/AudioContext.cpp Outdated
@mdydek
mdydek requested a review from closetcaiman October 13, 2026 07:55
mdydek and others added 2 commits October 13, 2026 16:03
…s/inputs/AudioRecorderHostObject.cpp

Co-authored-by: Marek Małek <78915323+closetcaiman@users.noreply.github.com>
@mdydek
mdydek merged commit 8910abf into main Oct 14, 2026
15 checks passed
@mdydek
mdydek deleted the refactor/less-threadsv2 branch October 14, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without altering external behavior or fixing bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants