OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <script src="../resources/js-test.js"></script> | 5 <script src="../resources/js-test.js"></script> |
| 6 <script src="resources/compatibility.js"></script> |
6 <script src="resources/audio-testing.js"></script> | 7 <script src="resources/audio-testing.js"></script> |
7 </head> | 8 </head> |
8 | 9 |
9 <body> | 10 <body> |
10 | 11 |
11 <div id="description"></div> | 12 <div id="description"></div> |
12 <div id="console"></div> | 13 <div id="console"></div> |
13 | 14 |
14 <script> | 15 <script> |
15 description("This test verifies whether down mixing from stereo to mono will cau
se assertion error."); | 16 description("This test verifies whether down mixing from stereo to mono will cau
se assertion error."); |
(...skipping 27 matching lines...) Expand all Loading... |
43 | 44 |
44 function runTest() { | 45 function runTest() { |
45 if (window.testRunner) { | 46 if (window.testRunner) { |
46 testRunner.dumpAsText(); | 47 testRunner.dumpAsText(); |
47 testRunner.waitUntilDone(); | 48 testRunner.waitUntilDone(); |
48 } | 49 } |
49 | 50 |
50 window.jsTestIsAsync = true; | 51 window.jsTestIsAsync = true; |
51 | 52 |
52 // Create offline audio context, the destination is mono. | 53 // Create offline audio context, the destination is mono. |
53 context = new webkitOfflineAudioContext(1, sampleRate * renderLengthSeconds,
sampleRate); | 54 context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampl
eRate); |
54 // Create a stereo AudioBuffer. | 55 // Create a stereo AudioBuffer. |
55 toneBuffer = createDataBuffer(context, renderLengthSeconds); | 56 toneBuffer = createDataBuffer(context, renderLengthSeconds); |
56 | 57 |
57 bufferSource = context.createBufferSource(); | 58 bufferSource = context.createBufferSource(); |
58 bufferSource.buffer = toneBuffer; | 59 bufferSource.buffer = toneBuffer; |
59 | 60 |
60 bufferSource.connect(context.destination); | 61 bufferSource.connect(context.destination); |
61 | 62 |
62 bufferSource.start(0); | 63 bufferSource.start(0); |
63 | 64 |
64 context.oncomplete = testFinished; | 65 context.oncomplete = testFinished; |
65 context.startRendering(); | 66 context.startRendering(); |
66 } | 67 } |
67 | 68 |
68 | 69 |
69 runTest(); | 70 runTest(); |
70 | 71 |
71 </script> | 72 </script> |
72 | 73 |
73 </body> | 74 </body> |
74 </html> | 75 </html> |
OLD | NEW |