зеркало из https://github.com/mozilla/gecko-dev.git
bug 1199560 finish offline audio context processing even when allocation fails r=padenot
ProcessBlock() needs to return aFinished = true at some point. --HG-- extra : rebase_source : 941371af142472ddf25a380b57f5e6f2f2d3029f
This commit is contained in:
Родитель
5c88921fb1
Коммит
b8ba84787a
|
@ -66,21 +66,13 @@ public:
|
|||
}
|
||||
|
||||
// Handle the case of allocation failure in the input buffer
|
||||
if (mBuffer) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mWriteIndex >= mLength) {
|
||||
NS_ASSERTION(mWriteIndex == mLength, "Overshot length");
|
||||
// Don't record any more.
|
||||
return;
|
||||
}
|
||||
uint32_t outputChannelCount = mBuffer ? mNumberOfChannels : 0;
|
||||
|
||||
// Record our input buffer
|
||||
MOZ_ASSERT(mWriteIndex < mLength, "How did this happen?");
|
||||
const uint32_t duration = std::min(WEBAUDIO_BLOCK_SIZE, mLength - mWriteIndex);
|
||||
const uint32_t inputChannelCount = aInput.mChannelData.Length();
|
||||
for (uint32_t i = 0; i < mNumberOfChannels; ++i) {
|
||||
for (uint32_t i = 0; i < outputChannelCount; ++i) {
|
||||
float* outputData = mBuffer->GetDataForWrite(i) + mWriteIndex;
|
||||
if (aInput.IsNull() || i >= inputChannelCount) {
|
||||
PodZero(outputData, duration);
|
||||
|
|
Загрузка…
Ссылка в новой задаче