OLD | NEW |
1 <!doctype html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
| 4 <title> |
| 5 panner-automation-equalpower-stereo.html |
| 6 </title> |
4 <script src="../../resources/testharness.js"></script> | 7 <script src="../../resources/testharness.js"></script> |
5 <script src="../../resources/testharnessreport.js"></script> | 8 <script src="../../resources/testharnessreport.js"></script> |
6 <script src="../resources/audit-util.js"></script> | 9 <script src="../resources/audit-util.js"></script> |
7 <script src="../resources/audit.js"></script> | 10 <script src="../resources/audit.js"></script> |
8 <script src="../resources/panner-model-testing.js"></script> | 11 <script src="../resources/panner-model-testing.js"></script> |
9 </head> | 12 </head> |
10 | |
11 <body> | 13 <body> |
12 <script> | 14 <script id="layout-test-code"> |
13 let audit = Audit.createTaskRunner(); | 15 let audit = Audit.createTaskRunner(); |
14 | 16 |
15 // To test the panner, we create a number of panner nodes | 17 // To test the panner, we create a number of panner nodes |
16 // equally spaced on a semicircle at unit distance. The | 18 // equally spaced on a semicircle at unit distance. The |
17 // semicircle covers the azimuth range from -90 to 90 deg, | 19 // semicircle covers the azimuth range from -90 to 90 deg, |
18 // covering full left to full right. Each source is an impulse | 20 // covering full left to full right. Each source is an impulse |
19 // turning at a different time and we check that the rendered | 21 // turning at a different time and we check that the rendered |
20 // impulse has the expected gain. | 22 // impulse has the expected gain. |
21 audit.define( | 23 audit.define( |
22 { | 24 { |
23 label: 'test', | 25 label: 'test', |
24 description: | 26 description: |
25 'Equal-power panner model of AudioPannerNode with stereo source'
, | 27 'Equal-power panner model of AudioPannerNode with stereo source'
, |
26 }, | 28 }, |
27 (task, should) => { | 29 (task, should) => { |
28 // Create offline audio context. | 30 // Create offline audio context. |
29 context = new OfflineAudioContext( | 31 context = new OfflineAudioContext( |
30 2, sampleRate * renderLengthSeconds, sampleRate); | 32 2, sampleRate * renderLengthSeconds, sampleRate); |
31 | 33 |
32 createTestAndRun( | 34 createTestAndRun( |
33 context, should, nodesToCreate, 2, | 35 context, should, nodesToCreate, 2, |
34 function(panner, x, y, z) { | 36 function(panner, x, y, z) { |
35 panner.positionX.value = x; | 37 panner.positionX.value = x; |
36 panner.positionY.value = y; | 38 panner.positionY.value = y; |
37 panner.positionZ.value = z; | 39 panner.positionZ.value = z; |
38 }) | 40 }) |
39 .then(() => task.done()); | 41 .then(() => task.done()); |
40 }); | 42 }); |
41 | 43 |
42 audit.run(); | 44 audit.run(); |
43 </script> | 45 </script> |
44 | |
45 </body> | 46 </body> |
46 </html> | 47 </html> |
OLD | NEW |