You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS: onAudioChunks and live waveform get no data when recording again after stopping a paused recording #527
Describe the bug
On iOS, stopping a recording while it is paused breaks the next recording. record() succeeds and the state is recording, but onAudioChunks never fires and the live waveform stays flat. The recording after that works again, so the failures alternate: works, flat, works, flat.
To Reproduce
recorderController.record(...) and listen to onAudioChunks. Chunks arrive.
recorderController.pause().
recorderController.stop().
recorderController.record(...) again. The state is recording, but no onAudioChunks event arrives and the waveform stays flat.
Repeat steps 2–4. The next recording works, the one after it is silent again, and so on.
Expected behavior
Every recording started with record() delivers onAudioChunks events, whether or not the previous one was stopped while paused.
Smartphone (please complete the following information):
Device: iPhone 13 simulator
OS: iOS 18.1
Version: main (2.1.0 unreleased), 16 kHz AAC, overrideAudioSession: true
Screenshots
Recordings that got audio (each cycle records for 1.5 s; a cycle fails when no onAudioChunks event arrives):
Scenario
main
record → stop → record
10/10
record → pause → stop → record
3/6 (2nd, 4th, 6th silent)
Additional context RecorderBytesStreamEngine keeps a paused flag that pause() and resume() toggle. stop() (detach()) never resets it. Stopping while paused leaves the flag true, so the next recording's input tap drops every buffer. Pausing that silent recording toggles the flag back to false, which is why the one after it works.
macOS is not affected: its recorder sets isPaused explicitly and clears it on start and stop.
Related: #505 reports the same symptom after record → stop → record, but that sequence didn't reproduce here (10/10), so this is tracked separately.
Activity