commit-queue@webkit.org | 5487b01 | 2012-02-28 06:03:41 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | |
| 3 | <!-- |
| 4 | Test AudioBufferSourceNode supports 5.1 channel. |
| 5 | --> |
| 6 | |
| 7 | <html> |
| 8 | <head> |
| 9 | <script type="text/javascript" src="resources/audio-testing.js"></script> |
| 10 | <script type="text/javascript" src="resources/mix-testing.js"></script> |
| 11 | </head> |
| 12 | <body> |
| 13 | |
| 14 | <script> |
| 15 | |
| 16 | function runTest() { |
rniwa@webkit.org | cc082ecd | 2012-06-16 03:42:58 +0000 | [diff] [blame] | 17 | if (!window.testRunner) |
commit-queue@webkit.org | 5487b01 | 2012-02-28 06:03:41 +0000 | [diff] [blame] | 18 | return; |
| 19 | |
rniwa@webkit.org | cc082ecd | 2012-06-16 03:42:58 +0000 | [diff] [blame] | 20 | testRunner.waitUntilDone(); |
commit-queue@webkit.org | 5487b01 | 2012-02-28 06:03:41 +0000 | [diff] [blame] | 21 | |
| 22 | window.jsTestAsync = true; |
| 23 | |
| 24 | // Create offline audio context |
| 25 | var sampleRate = 44100.0; |
crogers@google.com | 24fec26 | 2012-12-12 22:35:44 +0000 | [diff] [blame] | 26 | var context = new webkitOfflineAudioContext(6, sampleRate * toneLengthSeconds, sampleRate); |
commit-queue@webkit.org | 5487b01 | 2012-02-28 06:03:41 +0000 | [diff] [blame] | 27 | var toneBuffer = createToneBuffer(context, 440, toneLengthSeconds, 6); |
| 28 | |
| 29 | var source = context.createBufferSource(); |
| 30 | source.buffer = toneBuffer; |
| 31 | |
| 32 | source.connect(context.destination); |
weinig@apple.com | d61d8c1 | 2016-08-27 02:01:11 +0000 | [diff] [blame] | 33 | source.start(0); |
commit-queue@webkit.org | 5487b01 | 2012-02-28 06:03:41 +0000 | [diff] [blame] | 34 | |
| 35 | context.oncomplete = finishAudioTest; |
| 36 | context.startRendering(); |
| 37 | } |
| 38 | |
| 39 | runTest(); |
| 40 | </script> |
| 41 | |
| 42 | </body> |
| 43 | </html> |