OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
| 5 <script src="resources/compatibility.js"></script> |
5 <script src="resources/audio-testing.js"></script> | 6 <script src="resources/audio-testing.js"></script> |
6 </head> | 7 </head> |
7 | 8 |
8 <body> | 9 <body> |
9 <div id="description"></div> | 10 <div id="description"></div> |
10 <div id="console"></div> | 11 <div id="console"></div> |
11 | 12 |
12 <script> | 13 <script> |
13 description("Test AnalyserNode getFloatTimeDomainData"); | 14 description("Test AnalyserNode getFloatTimeDomainData"); |
14 | 15 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 52 } |
52 | 53 |
53 function runTests() { | 54 function runTests() { |
54 if (window.testRunner) { | 55 if (window.testRunner) { |
55 testRunner.dumpAsText(); | 56 testRunner.dumpAsText(); |
56 testRunner.waitUntilDone(); | 57 testRunner.waitUntilDone(); |
57 } | 58 } |
58 | 59 |
59 window.jsTestIsAsync = true; | 60 window.jsTestIsAsync = true; |
60 | 61 |
61 context = new webkitOfflineAudioContext(1, sampleFrameLength, sampleRa
te); | 62 context = new OfflineAudioContext(1, sampleFrameLength, sampleRate); |
62 | 63 |
63 // Use a simple linear ramp as the source. | 64 // Use a simple linear ramp as the source. |
64 src = context.createBufferSource(); | 65 src = context.createBufferSource(); |
65 src.buffer = createLinearRampBuffer(context, sampleFrameLength); | 66 src.buffer = createLinearRampBuffer(context, sampleFrameLength); |
66 | 67 |
67 analyser = context.createAnalyser(); | 68 analyser = context.createAnalyser(); |
68 analyser.fftSize = sampleFrameLength; | 69 analyser.fftSize = sampleFrameLength; |
69 | 70 |
70 src.connect(analyser); | 71 src.connect(analyser); |
71 analyser.connect(context.destination); | 72 analyser.connect(context.destination); |
72 src.start(); | 73 src.start(); |
73 | 74 |
74 context.oncomplete = checkResult; | 75 context.oncomplete = checkResult; |
75 context.startRendering(); | 76 context.startRendering(); |
76 } | 77 } |
77 | 78 |
78 runTests(); | 79 runTests(); |
79 successfullyParsed = true; | 80 successfullyParsed = true; |
80 </script> | 81 </script> |
81 </body> | 82 </body> |
82 </html> | 83 </html> |
OLD | NEW |