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
record_linux: every AudioRecorder shares one parecord process, so starting or disposing any recorder kills another's capture #631
record 6.2.1, record_linux 1.3.1. record_linux 2.1.2 has the same structure (one CapturePipeline per plugin instance).
Environment
OS: Linux (Ubuntu 24.04, PipeWire)
Describe the bug
RecordLinux keeps one _parecordProcess for the whole plugin (2.x: one _pipeline) and ignores recorderId. start and startStream begin with stop(recorderId), dispose(recorderId) calls stop as well, and stop kills that one process, whichever recorder started it. So with two AudioRecorders, one recorder starting, or merely being disposed, kills the other's capture. dispose also closes _stateStreamCtrl, which every recorder's state stream shares.
Start a stream on one recorder and count its chunks:
final a =AudioRecorder();
final stream =await a.startStream(
constRecordConfig(encoder:AudioEncoder.pcm16bits, numChannels:1),
);
var chunks =0;
stream.listen((_) => chunks++, onDone: () =>print('done'));
awaitFuture<void>.delayed(constDuration(seconds:1));
Create a second recorder, list the input devices with it, and dispose it:
final other =AudioRecorder();
await other.listInputDevices();
await other.dispose();
One capture per recorder id, as on the other platforms: a recorder's start, stop and dispose touch only its own capture and state, and a keeps receiving audio.
Additional context
Measured with flutter test on the machine above, with RecordPlatform.instance = RecordLinux(). Starting a second stream has the same effect as disposing one: its startStream calls stop first. We hit it with a speech-to-text pre-warm holding one recorder while a settings screen listed devices and ran a mic level meter with others.
Confirmed fixed with record_linux 2.1.3 (record 7.1.2) on Ubuntu 24.04, PipeWire 1.0.5. I ran the repro above with flutter test against the real RecordLinux: a gets 8 chunks in its first second, then 15 in the 1.5 s after other.dispose() (none before the fix), and 15 more in the 1.5 s after a second recorder starts its own stream, which gets 14. In our app, the mic level meter and speech-to-text now capture at the same time.
Activity
llfbandit commentedon Oct 9, 2026
Thanks for the report.
record_linux 2.1.3 has been released with the fix.
siegblink commentedon Oct 13, 2026
Confirmed fixed with record_linux 2.1.3 (record 7.1.2) on Ubuntu 24.04, PipeWire 1.0.5. I ran the repro above with
flutter testagainst the realRecordLinux:agets 8 chunks in its first second, then 15 in the 1.5 s afterother.dispose()(none before the fix), and 15 more in the 1.5 s after a second recorder starts its own stream, which gets 14. In our app, the mic level meter and speech-to-text now capture at the same time.Thanks for the quick fix!
fix(linux): Give each recorder its own capture.