Implement state transition for AudioContext.setSinkId #40924
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.
This CL updates the implementation of AudioContext to follow the
spec algorithm of the state transition from setSinkid() method.
https://webaudio.github.io/web-audio-api/#dom-audiocontext-setsinkid-domstring-or-audiosinkoptions-sinkid
The relevant web test is also updated and the failing expectation file
is removed. The actual audio output on MacOS is tested by:
https://googlechromelabs.github.io/web-audio-samples/tests/setsinkid/
Bug: 1439947
Change-Id: I56d8c89272d66b08502203a846c65231a72e8549
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4670272
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Alvin Ji <alvinji@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1168371}