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