Bug 874952 - Always create enough last chunks for an engine, even if we don't end up calling into its ProduceAudioBlock function; r=roc

This commit is contained in:
Ehsan Akhgari 2013-05-23 22:36:20 -04:00
parent ff55db5503
commit 03aface63f
3 changed files with 21 additions and 3 deletions

View File

@ -394,13 +394,19 @@ AudioNodeStream::ProduceOutput(GraphTime aFrom, GraphTime aTo)
AudioSegment* segment = track->Get<AudioSegment>();
mLastChunks.SetLength(1);
mLastChunks[0].SetNull(0);
uint16_t outputCount = std::max(uint16_t(1), mEngine->OutputCount());
mLastChunks.SetLength(outputCount);
if (mInCycle) {
// XXX DelayNode not supported yet so just produce silence
mLastChunks[0].SetNull(WEBAUDIO_BLOCK_SIZE);
for (uint16_t i = 0; i < outputCount; ++i) {
mLastChunks[i].SetNull(WEBAUDIO_BLOCK_SIZE);
}
} else {
for (uint16_t i = 0; i < outputCount; ++i) {
mLastChunks[i].SetNull(0);
}
// We need to generate at least one input
uint16_t maxInputs = std::max(uint16_t(1), mEngine->InputCount());
OutputChunks inputChunks;

View File

@ -0,0 +1,11 @@
<script>
var Context0= new AudioContext()
var ChannelSplitter0=Context0.createChannelSplitter();
var BiquadFilter0=Context0.createBiquadFilter();
var WaveShaper0=Context0.createWaveShaper();
ChannelSplitter0.connect(BiquadFilter0,3,0);
ChannelSplitter0.connect(WaveShaper0);
BiquadFilter0.disconnect();
WaveShaper0.connect(ChannelSplitter0);
</script>

View File

@ -18,3 +18,4 @@ load 852838.html
load 874869.html
load 874915.html
load 874934.html
load 874952.html