| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <script src="resources/audio-testing.js"></script> | 5 <script src="resources/audio-testing.js"></script> |
| 6 <script src="resources/compatibility.js"></script> | 6 <script src="resources/compatibility.js"></script> |
| 7 <script src="resources/audiobuffersource-testing.js"></script> | 7 <script src="resources/audiobuffersource-testing.js"></script> |
| 8 <script src="../resources/js-test.js"></script> | 8 <script src="../resources/js-test.js"></script> |
| 9 </head> | 9 </head> |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 { description: "illegal loop: loopEndFrame > bufferLength", | 131 { description: "illegal loop: loopEndFrame > bufferLength", |
| 132 loopStartFrame: 0, | 132 loopStartFrame: 0, |
| 133 loopEndFrame: 30000, | 133 loopEndFrame: 30000, |
| 134 renderFrames: 16, | 134 renderFrames: 16, |
| 135 playbackRate: 1, | 135 playbackRate: 1, |
| 136 expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] }, | 136 expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] }, |
| 137 | 137 |
| 138 // Start a loop with a duration longer than the buffer. The output should be th
e data from frame 1 | 138 // Start a loop with a duration longer than the buffer. The output should be th
e data from frame 1 |
| 139 // to 6, and then looping from 3 to 5 until 30 frames have been played. | 139 // to 6, and then looping from 3 to 5 until 30 frames have been played. |
| 140 { description: "loop from 3 -> 6 with offset 1 for 31 frames", | 140 { description: "loop from 3 -> 6 with offset 1 for 20 frames", |
| 141 loopStartFrame: 3, | 141 loopStartFrame: 3, |
| 142 loopEndFrame: 6, | 142 loopEndFrame: 6, |
| 143 playbackRate: 1, | 143 playbackRate: 1, |
| 144 offsetFrame: 1, | 144 offsetFrame: 1, |
| 145 durationFrames: 30, | 145 durationFrames: 20, |
| 146 expected: [1, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5
, 3, 4, 5, 3, 4, 5, 3] }, | 146 expected: [1, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 0, 0, 0
, 0, 0, 0, 0, 0, 0, 0] }, |
| 147 | 147 |
| 148 ]; | 148 ]; |
| 149 | 149 |
| 150 var sampleRate = 44100; | 150 var sampleRate = 44100; |
| 151 var buffer; | 151 var buffer; |
| 152 var bufferFrameLength = 8; | 152 var bufferFrameLength = 8; |
| 153 var testSpacingFrames = 32; | 153 var testSpacingFrames = 32; |
| 154 var testSpacingSeconds = testSpacingFrames / sampleRate; | 154 var testSpacingSeconds = testSpacingFrames / sampleRate; |
| 155 var totalRenderLengthFrames = tests.length * testSpacingFrames; | 155 var totalRenderLengthFrames = tests.length * testSpacingFrames; |
| 156 | 156 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 context.startRendering(); | 210 context.startRendering(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 runTest(); | 213 runTest(); |
| 214 successfullyParsed = true; | 214 successfullyParsed = true; |
| 215 | 215 |
| 216 </script> | 216 </script> |
| 217 | 217 |
| 218 </body> | 218 </body> |
| 219 </html> | 219 </html> |
| OLD | NEW |