blob: 090fc85b7261ecc6866cbafb53a587bbd461f39a [file] [log] [blame]
commit-queue@webkit.orgadb1a152012-01-13 22:18:41 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3 <head>
commit-queue@webkit.orgadb1a152012-01-13 22:18:41 +00004 <script src="resources/audio-testing.js"></script>
mark.lam@apple.com16a5a242013-09-08 06:11:31 +00005 <script src="../resources/js-test-pre.js"></script>
commit-queue@webkit.orgadb1a152012-01-13 22:18:41 +00006 <script src="resources/panner-model-testing.js"></script>
7 </head>
8
9 <body>
10 <div id="description"></div>
11 <div id="console"></div>
12
13 <script>
14 description("Test equal-power panner model of AudioPannerNode.");
15
16 // To test the panner, we create a number of panner nodes
17 // equally spaced on a semicircle at unit distance. The
18 // semicircle covers the azimuth range from -90 to 90 deg,
19 // covering full left to full right. Each source is an impulse
20 // turning at a different time and we check that the rendered
21 // impulse has the expected gain.
22 function runTest() {
rniwa@webkit.orgcc082ecd2012-06-16 03:42:58 +000023 if (window.testRunner) {
24 testRunner.dumpAsText();
25 testRunner.waitUntilDone();
commit-queue@webkit.orgadb1a152012-01-13 22:18:41 +000026 }
27
28 window.jsTestIsAsync = true;
29
30 // Create offline audio context.
crogers@google.com24fec262012-12-12 22:35:44 +000031 context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
commit-queue@webkit.orgadb1a152012-01-13 22:18:41 +000032
commit-queue@webkit.orgd193f5f2012-04-11 19:26:28 +000033 createTestAndRun(context, nodesToCreate, 1);
commit-queue@webkit.orgadb1a152012-01-13 22:18:41 +000034 }
35
36 runTest();
37 successfullyParsed = true;
38
39 </script>
40
mark.lam@apple.com16a5a242013-09-08 06:11:31 +000041 <script src="../resources/js-test-post.js"></script>
commit-queue@webkit.orgadb1a152012-01-13 22:18:41 +000042 </body>
43</html>