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/compatibility.js"></script> |
4 <script src="resources/audio-testing.js"></script> | 5 <script src="resources/audio-testing.js"></script> |
5 <script src="resources/note-grain-on-testing.js"></script> | 6 <script src="resources/note-grain-on-testing.js"></script> |
6 <script src="../resources/js-test.js"></script> | 7 <script src="../resources/js-test.js"></script> |
7 </head> | 8 </head> |
8 | 9 |
9 <body> | 10 <body> |
10 <div id="description"></div> | 11 <div id="description"></div> |
11 <div id="console"></div> | 12 <div id="console"></div> |
12 | 13 |
13 <script> | 14 <script> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 101 |
101 function runTest() { | 102 function runTest() { |
102 if (window.testRunner) { | 103 if (window.testRunner) { |
103 testRunner.dumpAsText(); | 104 testRunner.dumpAsText(); |
104 testRunner.waitUntilDone(); | 105 testRunner.waitUntilDone(); |
105 } | 106 } |
106 | 107 |
107 window.jsTestIsAsync = true; | 108 window.jsTestIsAsync = true; |
108 | 109 |
109 // Create offline audio context. | 110 // Create offline audio context. |
110 context = new webkitOfflineAudioContext(2, sampleRate * renderTime, sa
mpleRate); | 111 context = new OfflineAudioContext(2, sampleRate * renderTime, sampleRa
te); |
111 | 112 |
112 // Create a linear ramp for testing noteGrainOn. | 113 // Create a linear ramp for testing noteGrainOn. |
113 linearRampBuffer = createSignalBuffer(context, | 114 linearRampBuffer = createSignalBuffer(context, |
114 function(k) { | 115 function(k) { |
115 // Want the ramp to start | 116 // Want the ramp to start |
116 // with 1, not 0. | 117 // with 1, not 0. |
117 return k + 1; | 118 return k + 1; |
118 }); | 119 }); |
119 | 120 |
120 var grainInfo = playAllGrains(context, linearRampBuffer, numberOfTests
); | 121 var grainInfo = playAllGrains(context, linearRampBuffer, numberOfTests
); |
121 | 122 |
122 grainOffsetTime = grainInfo.grainOffsetTimes; | 123 grainOffsetTime = grainInfo.grainOffsetTimes; |
123 | 124 |
124 context.oncomplete = checkResult; | 125 context.oncomplete = checkResult; |
125 context.startRendering(); | 126 context.startRendering(); |
126 } | 127 } |
127 | 128 |
128 runTest(); | 129 runTest(); |
129 successfullyParsed = true; | 130 successfullyParsed = true; |
130 | 131 |
131 </script> | 132 </script> |
132 | 133 |
133 </body> | 134 </body> |
134 </html> | 135 </html> |
OLD | NEW |