New issue
Advanced search Search tips

Issue 815313 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 469639



Sign in to add a comment

Initialize AudioWorkletGlobalScope.sampleRate before the processor registration.

Project Member Reported by hongchan@chromium.org, Feb 23 2018

Issue description

Due to the deep class hierarchy in Worklet infrastructure, sending the initialization parameters for AudioWorkletGlobalScope is very difficult.

Update sampleRate when AudioWorkletGlobalScope is initialized, so the processor class definition can take advantage of the value.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/70d15d5da08beb4ba6a6ab374fad4b2276108aa9

commit 70d15d5da08beb4ba6a6ab374fad4b2276108aa9
Author: Hongchan Choi <hongchan@chromium.org>
Date: Mon Feb 26 20:27:08 2018

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}
[add] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/LayoutTests/http/tests/webaudio/audio-worklet/global-sample-rate.html
[add] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/LayoutTests/http/tests/webaudio/audio-worklet/one-pole-processor.js
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorklet.h
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.cpp
[modify] https://crrev.com/70d15d5da08beb4ba6a6ab374fad4b2276108aa9/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.h

Status: Verified (was: Started)

Sign in to add a comment