blob: 4b66cff74ece18d6e0b6dabf25f744b308b905ca [file] [log] [blame]
commit-queue@webkit.org5487b012012-02-28 06:03:41 +00001<!DOCTYPE html>
2
3<!--
4Test 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
16function runTest() {
rniwa@webkit.orgcc082ecd2012-06-16 03:42:58 +000017 if (!window.testRunner)
commit-queue@webkit.org5487b012012-02-28 06:03:41 +000018 return;
19
rniwa@webkit.orgcc082ecd2012-06-16 03:42:58 +000020 testRunner.waitUntilDone();
commit-queue@webkit.org5487b012012-02-28 06:03:41 +000021
22 window.jsTestAsync = true;
23
24 // Create offline audio context
25 var sampleRate = 44100.0;
crogers@google.com24fec262012-12-12 22:35:44 +000026 var context = new webkitOfflineAudioContext(6, sampleRate * toneLengthSeconds, sampleRate);
commit-queue@webkit.org5487b012012-02-28 06:03:41 +000027 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.comd61d8c12016-08-27 02:01:11 +000033 source.start(0);
commit-queue@webkit.org5487b012012-02-28 06:03:41 +000034
35 context.oncomplete = finishAudioTest;
36 context.startRendering();
37}
38
39runTest();
40</script>
41
42</body>
43</html>