Add stubs for AudioWorkletProcessor and AudioWorkletGlobalScope: - https://www.w3.org/TR/webaudio/#audioworkletprocessor - https://www.w3.org/TR/webaudio/#audioworkletglobalscope
Created attachment 410280 [details] Patch
Created attachment 410296 [details] Patch
Created attachment 410298 [details] Patch
Comment on attachment 410298 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410298&action=review What's the deal with all the extra "DOM"s added to the generated code? Name conflict? Can you add an explanation to the changelog? > Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.h:53 > + float sampleRate() const { return 44100; } This number should probably be in its own constexpr with a clear name to explain it (unless you expect this to go away real soon). > Source/WebCore/Modules/webaudio/AudioWorkletProcessorConstructor.idl:31 > +]callback AudioWorkletProcessorConstructor = AudioWorkletProcessor (object options); Please add a space after the closing ].
Comment on attachment 410298 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410298&action=review >> Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.h:53 >> + float sampleRate() const { return 44100; } > > This number should probably be in its own constexpr with a clear name to explain it (unless you expect this to go away real soon). If they were going to stay like this for a long time we could use static constexpr.
Comment on attachment 410298 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410298&action=review >>> Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.h:53 >>> + float sampleRate() const { return 44100; } >> >> This number should probably be in its own constexpr with a clear name to explain it (unless you expect this to go away real soon). > > If they were going to stay like this for a long time we could use static constexpr. This is going to go away real soon to return the actual context sample rate. I could have returned 0 here but I figured I would return a realistic sample rate.
(In reply to Sam Weinig from comment #4) > Comment on attachment 410298 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=410298&action=review > > What's the deal with all the extra "DOM"s added to the generated code? Name > conflict? Can you add an explanation to the changelog? Yes, there was a name conflict since we now have both JSAudioWorkletProcessor and JSAudioWorkletProcessorConstructor classes (Due to having AudioWorkletProcessor.idl and AudioWorkletProcessorConstructor.idl). The issue was that the DOMConstructor for JSAudioWorkletProcessor was named JSAudioWorkletProcessorConstructor too. So I renamed it to JSAudioWorkletProcessorDOMConstructor. > > > Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.h:53 > > + float sampleRate() const { return 44100; } > > This number should probably be in its own constexpr with a clear name to > explain it (unless you expect this to go away real soon). > > > Source/WebCore/Modules/webaudio/AudioWorkletProcessorConstructor.idl:31 > > +]callback AudioWorkletProcessorConstructor = AudioWorkletProcessor (object options); > > Please add a space after the closing ]. Will fix.
Committed r267891: <https://trac.webkit.org/changeset/267891>
<rdar://problem/69891959>