blob: 7ebdf0117dd2259fd7483543b66f2961cc51d499 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css"/>
<script src="resources/audio-testing.js"></script>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/biquad-testing.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description("Tests Biquad lowpass filter.");
function runTest() {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
window.jsTestIsAsync = true;
// Create offline audio context.
var context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
// Dummy filter to get filter type constant
var f = context.createBiquadFilter();
// The filters we want to test.
var filterParameters = [{cutoff : 0, q : 1, gain : 1 },
{cutoff : 1, q : 1, gain : 1 },
{cutoff : 0.25, q : 1, gain : 1 },
{cutoff : 0.25, q : 1, gain : 1, detune : 100 },
{cutoff : 0.01, q : 1, gain : 1, detune : -200 },
];
createTestAndRun(context, f.LOWPASS, filterParameters);
}
runTest();
successfullyParsed = true;
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>