| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title> |
| 5 panner-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 context = new OfflineAudioContext( | 30 context = new OfflineAudioContext( |
| 29 2, sampleRate * renderLengthSeconds, sampleRate); | 31 2, sampleRate * renderLengthSeconds, sampleRate); |
| 30 | 32 |
| 31 createTestAndRun( | 33 createTestAndRun( |
| 32 context, should, nodesToCreate, 2, | 34 context, should, nodesToCreate, 2, |
| 33 function(panner, x, y, z) { | 35 function(panner, x, y, z) { |
| 34 panner.setPosition(x, y, z); | 36 panner.setPosition(x, y, z); |
| 35 }) | 37 }) |
| 36 .then(() => task.done()); | 38 .then(() => task.done()); |
| 37 }); | 39 }); |
| 38 | 40 |
| 39 audit.run(); | 41 audit.run(); |
| 40 </script> | 42 </script> |
| 41 | |
| 42 </body> | 43 </body> |
| 43 </html> | 44 </html> |
| OLD | NEW |