Index: LayoutTests/webaudio/resources/panner-model-testing.js |
diff --git a/LayoutTests/webaudio/resources/panner-model-testing.js b/LayoutTests/webaudio/resources/panner-model-testing.js |
index f96857f8dd181410f17b33026eee231fee027133..6c853877b256b098dcc31e8c84028f88a6c6a60f 100644 |
--- a/LayoutTests/webaudio/resources/panner-model-testing.js |
+++ b/LayoutTests/webaudio/resources/panner-model-testing.js |
@@ -21,7 +21,7 @@ var bufferSource; |
var panner; |
var position; |
var time; |
- |
+ |
var renderedBuffer; |
var renderedLeft; |
var renderedRight; |
@@ -46,6 +46,8 @@ function createGraph(context, nodeCount) { |
bufferSource[k].buffer = impulse; |
panner[k] = context.createPanner(); |
+ // Equalpower is default now. May not be necessary. |
+ // https://code.google.com/p/chromium/issues/detail?id=424356 |
panner[k].panningModel = "equalpower"; |
Raymond Toy
2014/10/17 17:39:30
I would just remove the comment and the assignment
hongchan
2014/10/17 18:13:41
Done.
|
panner[k].distanceModel = "linear"; |
@@ -92,17 +94,17 @@ function equalPowerGain(angle) { |
} else { |
if (azimuth <= 0) { |
var panPosition = (azimuth + 90) / 90; |
- |
+ |
Raymond Toy
2014/10/17 17:39:30
Removing more blank lines?
hongchan
2014/10/17 18:13:41
Yes.
|
var gainL = 1 + Math.cos(0.5 * Math.PI * panPosition); |
var gainR = Math.sin(0.5 * Math.PI * panPosition); |
- |
+ |
return { left : gainL, right : gainR }; |
} else { |
var panPosition = azimuth / 90; |
- |
+ |
var gainL = Math.cos(0.5 * Math.PI * panPosition); |
var gainR = 1 + Math.sin(0.5 * Math.PI * panPosition); |
- |
+ |
return { left : gainL, right : gainR }; |
} |
} |
@@ -117,7 +119,7 @@ function checkResult(event) { |
// expected value. This value is experimentally determined. Set |
// to 0 to make the test fail to see what the actual error is. |
var maxAllowedError = 1.3e-6; |
- |
+ |
var success = true; |
// Number of impulses found in the rendered result. |
@@ -191,7 +193,7 @@ function checkResult(event) { |
testFailed("Left channel gain values are incorrect. Max error = " + maxErrorL + " at time " + time[maxErrorIndexL] + " (threshold = " + maxAllowedError + ")"); |
success = false; |
} |
- |
+ |
if (maxErrorR <= maxAllowedError) { |
testPassed("Right channel gain values are correct."); |
} else { |