Bug 1122218 - Fix off-by-one error when computing oscillator rendering range. r=karlt

This commit is contained in:
Paul Adenot 2015-05-13 11:02:27 +02:00
parent f479815ffd
commit f1a919f4b9
3 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,24 @@
<html>
<head>
<script>
function boom() {
var r0=new AudioContext();
var cm=r0.createChannelMerger(20);
var o1=r0.createOscillator();
var o2=r0.createOscillator();
var pw=r0.createPeriodicWave(new Float32Array(4),new Float32Array(4));
o2.setPeriodicWave(pw);
o1.connect(cm);
cm.connect(o2.frequency);
o1.start();
o2.start(0.476);
}
</script>
</head>
<body onload="boom();"></body>
</html>

View File

@ -77,6 +77,7 @@ load oscillator-ended-2.html
load 1080986.html
load 1158427.html
load 1157994.html
load 1122218.html
include ../../mediasource/test/crashtests/crashtests.list
# This needs to run at the end to avoid leaking busted state into other tests.

View File

@ -303,7 +303,7 @@ public:
*aFinished = true;
return;
}
if (ticks + WEBAUDIO_BLOCK_SIZE < mStart) {
if (ticks + WEBAUDIO_BLOCK_SIZE <= mStart) {
// We're not playing yet.
ComputeSilence(aOutput);
return;