New issue
Advanced search Search tips

Issue 695513 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

PeriodicWaveOptions is optional

Project Member Reported by rtoy@chromium.org, Feb 23 2017

Issue description

The PeriodicWave constructor should take an optional PeriodicWaveOptions dictionary because the dictionary elements are all optional.

If neither the real or imag elements of the dictionary are specified, the PeriodicWave constructor should return an object that will generate the same wave form as an Oscillator with a type of "sine".
 

Comment 1 by rtoy@chromium.org, Mar 16 2017

Owner: rtoy@chromium.org
Status: Started (was: Available)

Comment 2 by rtoy@chromium.org, Mar 16 2017

See https://github.com/WebAudio/web-audio-api/issues/1116 for the spec issue, which is now closed.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 17 2017

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

commit 10c77a53e77e2ae475a00cbddb5da81f0f2965c4
Author: rtoy <rtoy@chromium.org>
Date: Fri Mar 17 18:31:12 2017

PeriodicWave returns sine wave generator if no coefficients given

If the PeriodWaveOptions option does not specify either real or imag
components, the returned PeriodicWave should result in a sine wave when
used with an OscillatorNode.

The spec was unclear and incorrect in saying that the optional
PeriodicWaveOptions dictionary had optional members specified, but actually
required at least one to be specified.  The spec was updated
to make this clear that everything is correctly optional, and
specifies what PeriodicWave should do PeriodicWaveOptions is given.

Tests updated for this and an additional test to verify that the
output is a sine wave.

BUG= 695513 
TEST=constructor/periodicwave.html

Review-Url: https://codereview.chromium.org/2712933003
Cr-Commit-Position: refs/heads/master@{#457824}

[modify] https://crrev.com/10c77a53e77e2ae475a00cbddb5da81f0f2965c4/third_party/WebKit/LayoutTests/webaudio/constructor/periodicwave.html
[modify] https://crrev.com/10c77a53e77e2ae475a00cbddb5da81f0f2965c4/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp

Comment 4 by rtoy@chromium.org, Mar 20 2017

Status: Fixed (was: Started)

Sign in to add a comment