Updated AudioContext constructor according to spec: https://www.w3.org/TR/webaudio/#AudioContext-constructors. Added in new files to support AudioContextOptions.
Created attachment 404168 [details] Patch
Comment on attachment 404168 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404168&action=review > Source/WebCore/Modules/webaudio/AudioContext.cpp:68 > + Optional<float> sampleRate = contextOptions.sampleRate; This local variable is not needed. > Source/WebCore/Modules/webaudio/AudioContext.cpp:78 > +AudioContext::AudioContext(Document& document, Optional<float> sampleRate) I suggest passing the whole AudioContextOptions struct here. > Source/WebCore/Modules/webaudio/BaseAudioContext.h:287 > explicit BaseAudioContext(Document&); I suggest passing the whole AudioContextOptions struct here (with a default value): explicit BaseAudioContext(Document&, const AudioContextOptions& = { }); > Source/WebCore/Modules/webaudio/BaseAudioContext.h:289 > + BaseAudioContext(Document&, Optional<float>); Let's not add yet another constructor. > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.h:49 > explicit DefaultAudioDestinationNode(BaseAudioContext&); explicit DefaultAudioDestinationNode(BaseAudioContext&, Optional<float> = WTF::nullopt); > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.h:50 > + DefaultAudioDestinationNode(BaseAudioContext&, Optional<float>); Let's not add another constructor. > LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:3 > +FAIL Executing "test" promise_test: Unhandled rejection with value: object "SyntaxError: sampleRate is not in range" Why are we failing this?
Created attachment 404191 [details] Patch
Committed r264342: <https://trac.webkit.org/changeset/264342> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404191 [details].
<rdar://problem/65545259>