mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=918213 dispatch onended from OscillatorNode even when stop time is before start r=ehsan
This makes OscillatorNode consistent with AudioBufferSourceNode --HG-- extra : transplant_source : %AE8%3B%B4%E5M%60%03%CBN.%21%BD%FF%60%A6%F2a%BDi
This commit is contained in:
parent
0fa976d665
commit
41f2afcff3
@ -57,3 +57,4 @@ load 907986-3.html
|
||||
load 907986-4.html
|
||||
load 910171-1.html
|
||||
load oscillator-ended-1.html
|
||||
load oscillator-ended-2.html
|
||||
|
15
content/media/test/crashtests/oscillator-ended-2.html
Normal file
15
content/media/test/crashtests/oscillator-ended-2.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<script>
|
||||
function createContext() {
|
||||
var context = new window.AudioContext();
|
||||
var source = context.createOscillator();
|
||||
source.onended = function(e) {
|
||||
document.documentElement.removeAttribute("class");
|
||||
};
|
||||
source.connect(context.destination);
|
||||
source.start(60);
|
||||
source.stop(0.5);
|
||||
}
|
||||
createContext();
|
||||
</script>
|
@ -424,17 +424,17 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (ticks + WEBAUDIO_BLOCK_SIZE < mStart) {
|
||||
// We're not playing yet.
|
||||
ComputeSilence(aOutput);
|
||||
return;
|
||||
}
|
||||
if (ticks >= mStop) {
|
||||
// We've finished playing.
|
||||
ComputeSilence(aOutput);
|
||||
*aFinished = true;
|
||||
return;
|
||||
}
|
||||
if (ticks + WEBAUDIO_BLOCK_SIZE < mStart) {
|
||||
// We're not playing yet.
|
||||
ComputeSilence(aOutput);
|
||||
return;
|
||||
}
|
||||
|
||||
AllocateAudioBlock(1, aOutput);
|
||||
float* output = static_cast<float*>(
|
||||
|
Loading…
Reference in New Issue
Block a user