Make ChannelMerger active processing test less flaky #17383
Merged
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.
Replace the offline audio context with a realtime context and an AudioWorklet.
Previously, when the source stopped, the channel count change would sometimes
get delayed until rendering is done, which is too late for the test. I believe
this is because the main thread was previously too busy to process the messages
to disable outputs and change the channel count.
Using a realtime context makes the main thread less busy because the messages
aren't posted as fast as possible, allowing time for them to be handled. I think
this is still flaky, but much less so than before.
Bug: 974258
Test: the-channelmergernode-interface/active-processing.https.html
Change-Id: Id584ebfa5f54ad6870819f5242aafed5f4fc80d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663186
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677078}