OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 <html> | |
3 <head> | |
4 <script src="../resources/js-test.js"></script> | |
5 <script src="resources/compatibility.js"></script> | |
6 <script src="resources/audit-util.js"></script> | |
7 <script src="resources/audio-testing.js"></script> | |
8 <script src="resources/panner-model-testing.js"></script> | |
9 </head> | |
10 | |
11 <body> | |
12 <div id="description"></div> | |
13 <div id="console"></div> | |
14 | |
15 <script> | |
16 description("Test equal-power panner model of AudioPannerNode."); | |
17 | |
18 // To test the panner, we create a number of panner nodes | |
19 // equally spaced on a semicircle at unit distance. The | |
20 // semicircle covers the azimuth range from -90 to 90 deg, | |
21 // covering full left to full right. Each source is an impulse | |
22 // turning at a different time and we check that the rendered | |
23 // impulse has the expected gain. | |
24 function runTest() { | |
25 if (window.testRunner) { | |
26 testRunner.dumpAsText(); | |
27 testRunner.waitUntilDone(); | |
28 } | |
29 | |
30 window.jsTestIsAsync = true; | |
31 | |
32 // Create offline audio context. | |
33 context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds,
sampleRate); | |
34 | |
35 createTestAndRun(context, nodesToCreate, 1, function (panner, x, y, z)
{ | |
36 panner.setPosition(x, y, z); | |
37 }); | |
38 } | |
39 | |
40 runTest(); | |
41 successfullyParsed = true; | |
42 | |
43 </script> | |
44 | |
45 </body> | |
46 </html> | |
OLD | NEW |