Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/stereo2mono-down-mixing.html

Issue 2702763002: Remove up-mixing* and stereo2mono-down-mixing tests (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/stereo2mono-down-mixing-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <script src="../resources/js-test.js"></script>
6 <script src="resources/audit-util.js"></script>
7 <script src="resources/audio-testing.js"></script>
8 </head>
9
10 <body>
11
12 <div id="description"></div>
13 <div id="console"></div>
14
15 <script>
16 description("This test verifies whether down mixing from stereo to mono will cau se assertion error.");
17
18 var sampleRate = 44100.0;
19 var renderLengthSeconds = 0.1;
20
21 var context;
22 var toneBuffer;
23 var bufferSource;
24
25 function createDataBuffer(context, lengthInSeconds) {
26 var audioBuffer = context.createBuffer(2, lengthInSeconds * sampleRate, samp leRate);
27
28 var n = audioBuffer.length;
29 var data0 = audioBuffer.getChannelData(0);
30 var data1 = audioBuffer.getChannelData(1);
31
32 for (var i = 0; i < n; ++i) {
33 data0[i] = 1.0;
34 data1[i] = 1.0;
35 }
36
37 return audioBuffer;
38 }
39
40 function testFinished() {
41 testPassed("Test no ASSERT error.");
42 finishJSTest();
43 }
44
45 function runTest() {
46 if (window.testRunner) {
47 testRunner.dumpAsText();
48 testRunner.waitUntilDone();
49 }
50
51 window.jsTestIsAsync = true;
52
53 // Create offline audio context, the destination is mono.
54 context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampl eRate);
55 // Create a stereo AudioBuffer.
56 toneBuffer = createDataBuffer(context, renderLengthSeconds);
57
58 bufferSource = context.createBufferSource();
59 bufferSource.buffer = toneBuffer;
60
61 bufferSource.connect(context.destination);
62
63 bufferSource.start(0);
64
65 context.oncomplete = testFinished;
66 context.startRendering();
67 }
68
69
70 runTest();
71
72 </script>
73
74 </body>
75 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/stereo2mono-down-mixing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698