Commit a22b3584 authored by Raymond Toy's avatar Raymond Toy Committed by Commit Bot

Fix bad test code in fft-scaling test

The test code for verifying the scaling of the FFT was totally
confused (and confusing).  Correct the code, and only use the promise
instead of both the promise and the completion event.

Bug: 783314
Test: Analyser/realtimeanalyser-fft-scaling.html
Change-Id: Iecc607205c1cd0ed6e76bfa7c627907238f6a46e
Reviewed-on: default avatarHongchan Choi <>
Commit-Queue: Raymond Toy <>
Cr-Commit-Position: refs/heads/master@{#516082}
parent a4466478
......@@ -28,7 +28,7 @@
let oscFrequency = nyquistFrequency / 16;
// The actual peak values from each analyser. Useful for examining the
// results in Chrome.
// actual peak values.
let peakValue = new Array(numberOfAnalysers);
// For a 0dBFS sine wave, we would expect the FFT magnitude to be 0dB as
......@@ -102,9 +102,8 @@
context.oncomplete = checkResult(order, analyser, should);
return context.startRendering().then(function(audioBuffer) {
checkResult(audioBuffer, order, analyser);
return context.startRendering().then(() => {
checkResult(order, analyser, should)();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment