Skip to content

fix: duplex defaults - #1340

Merged
roderickvd merged 3 commits into
masterfrom
fix/duplex-defaults
Aug 23, 2026
Merged

fix: duplex defaults#1340
roderickvd merged 3 commits into
masterfrom
fix/duplex-defaults

Conversation

@roderickvd

Copy link
Copy Markdown
Member

I reverted my position on default_duplex_config from yesterday. Instead of matching both directions on a shared channel count, each direction keeps its own default now. Only the rate gets reconciled. This will better cater to the more common use case of "mono mic, stereo output".

Working on it, I noticed that AudioWorklet was sizing the duplex input slice from the live channel count, which
is zero until getUserMedia connects the source, so the first callbacks got an empty slice instead of the input_channels expected. Ideally, a duplex stream should guarantee that its frame length is equal in both directions.

I further pondered a supported_duplex_configs but don't see a feasible way to implement that.

Matching both directions on a shared count opened a mono microphone as
stereo. Also drops the shared-clock wording from build_duplex_stream.
The graph reports none until the capture source connects, so the callback
saw an empty slice. Also clears the region a skipped quantum would repeat.
@roderickvd roderickvd added the bug label Aug 23, 2026
@roderickvd
roderickvd merged commit 1ae953c into master Aug 23, 2026
33 checks passed
@roderickvd
roderickvd deleted the fix/duplex-defaults branch August 23, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant