Initialize sampleRate in AudioWorkletGlobalScope upon construction
This CL changes how |sampleRate| in AudioWorkletGlobalScope is updated. Previously, the sample rate was updated when the first processor was created, thus accessing the sample rate in the class definition phase gives 0 value. With this CL, the sample rate is initialized as soon as the global scope is created, before the script is loaded/parsed. Bug: 815313 Test: http/tests/webaudio/audio-worklet/global-sample-rate.html Change-Id: I994ee70c10ed93618b28c7d29df42b5d458c74f8 Reviewed-on: https://chromium-review.googlesource.com/935747 Commit-Queue: Hongchan Choi <hongchan@chromium.org> Reviewed-by:Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#539254}
Showing
Please register or sign in to comment