fix: duplex defaults - #1340
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I reverted my position on
default_duplex_configfrom 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
getUserMediaconnects the source, so the first callbacks got an empty slice instead of theinput_channelsexpected. Ideally, a duplex stream should guarantee that its frame length is equal in both directions.I further pondered a
supported_duplex_configsbut don't see a feasible way to implement that.