commit-queue@webkit.org | adb1a15 | 2012-01-13 22:18:41 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
commit-queue@webkit.org | adb1a15 | 2012-01-13 22:18:41 +0000 | [diff] [blame] | 4 | <script src="resources/audio-testing.js"></script> |
mark.lam@apple.com | 16a5a24 | 2013-09-08 06:11:31 +0000 | [diff] [blame] | 5 | <script src="../resources/js-test-pre.js"></script> |
commit-queue@webkit.org | adb1a15 | 2012-01-13 22:18:41 +0000 | [diff] [blame] | 6 | <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.org | cc082ecd | 2012-06-16 03:42:58 +0000 | [diff] [blame] | 23 | if (window.testRunner) { |
| 24 | testRunner.dumpAsText(); |
| 25 | testRunner.waitUntilDone(); |
commit-queue@webkit.org | adb1a15 | 2012-01-13 22:18:41 +0000 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | window.jsTestIsAsync = true; |
| 29 | |
| 30 | // Create offline audio context. |
crogers@google.com | 24fec26 | 2012-12-12 22:35:44 +0000 | [diff] [blame] | 31 | context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate); |
commit-queue@webkit.org | adb1a15 | 2012-01-13 22:18:41 +0000 | [diff] [blame] | 32 | |
commit-queue@webkit.org | d193f5f | 2012-04-11 19:26:28 +0000 | [diff] [blame] | 33 | createTestAndRun(context, nodesToCreate, 1); |
commit-queue@webkit.org | adb1a15 | 2012-01-13 22:18:41 +0000 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | runTest(); |
| 37 | successfullyParsed = true; |
| 38 | |
| 39 | </script> |
| 40 | |
mark.lam@apple.com | 16a5a24 | 2013-09-08 06:11:31 +0000 | [diff] [blame] | 41 | <script src="../resources/js-test-post.js"></script> |
commit-queue@webkit.org | adb1a15 | 2012-01-13 22:18:41 +0000 | [diff] [blame] | 42 | </body> |
| 43 | </html> |