зеркало из https://github.com/mozilla/gecko-dev.git
b=989907 initialize AudioNodeExternalInputStream output chunk even when first track has null output r=roc
--HG-- extra : transplant_source : %96%C3%A3%DCs%D3%CCY6.%CC%07%22%02%EDy%A5%94U%DD
This commit is contained in:
Родитель
33827b3f7c
Коммит
69d7128f4d
|
@ -437,17 +437,22 @@ AudioNodeExternalInputStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t accumulateIndex = 0;
|
||||
if (inputChannels) {
|
||||
AllocateAudioBlock(inputChannels, &mLastChunks[0]);
|
||||
nsAutoTArray<float,GUESS_AUDIO_CHANNELS*WEBAUDIO_BLOCK_SIZE> downmixBuffer;
|
||||
for (uint32_t i = 0; i < audioSegments.Length(); ++i) {
|
||||
AudioChunk tmpChunk;
|
||||
ConvertSegmentToAudioBlock(&audioSegments[i], &tmpChunk);
|
||||
if (!tmpChunk.IsNull()) {
|
||||
AccumulateInputChunk(i, tmpChunk, &mLastChunks[0], &downmixBuffer);
|
||||
if (accumulateIndex == 0) {
|
||||
AllocateAudioBlock(inputChannels, &mLastChunks[0]);
|
||||
}
|
||||
AccumulateInputChunk(accumulateIndex, tmpChunk, &mLastChunks[0], &downmixBuffer);
|
||||
accumulateIndex++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (accumulateIndex == 0) {
|
||||
mLastChunks[0].SetNull(WEBAUDIO_BLOCK_SIZE);
|
||||
}
|
||||
mCurrentOutputPosition += WEBAUDIO_BLOCK_SIZE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче