Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js

Issue 1803153002: Add min/max values for AudioParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js
index e7f71c33628c13d16b96b03fab15551e1fb69647..60d947b4a9b9ac0d198ce995ad825af370167c88 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js
@@ -88,6 +88,9 @@ var StereoPannerTest = (function () {
this.maxErrorIndexL = 0;
this.maxErrorIndexR = 0;
+ // The maximum value to use for panner pan value. The value will range from -panLimit to
+ // +panLimit.
+ this.panLimit = 1.0625;
}
@@ -105,7 +108,7 @@ var StereoPannerTest = (function () {
// Moves the pan value for each panner by pan step unit from -2 to 2.
// This is to check if the internal panning value is clipped properly.
- var panStep = 4 / (gNodesToCreate - 1);
+ var panStep = (2 * this.panLimit) / (gNodesToCreate - 1);
if (this.numberOfInputChannels === 1) {
impulse = createImpulseBuffer(this.context, impulseLength);
@@ -119,7 +122,7 @@ var StereoPannerTest = (function () {
sources[i].connect(panners[i]);
panners[i].connect(this.context.destination);
sources[i].buffer = impulse;
- panners[i].pan.value = this.panPositions[i] = panStep * i - 2;
+ panners[i].pan.value = this.panPositions[i] = panStep * i - this.panLimit;
// Store the onset time position of impulse.
this.onsets[i] = gTimeStep * i;

Powered by Google App Engine
This is Rietveld 408576698