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

Side by Side Diff: LayoutTests/webaudio/audiobuffersource-loop-comprehensive.html

Issue 912803005: Looping AudioBufferSourceNodes stop only if duration is explicitly given. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
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
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698