зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1414366 - Don't assume aStart is aligned on block boundary in AudioParamTimeline::GetValuesAtTime. r=karlt
MozReview-Commit-ID: JQoDwVPQ2s6 --HG-- extra : rebase_source : f9d653ca530a54f310c915d8745de1266cabb71a
This commit is contained in:
Родитель
e5c55dd528
Коммит
9fba355645
|
@ -145,8 +145,10 @@ AudioParamTimeline::GetValuesAtTime(int64_t aTime, float* aBuffer,
|
|||
// Mix the value of the AudioParam itself with that of the AudioNode inputs.
|
||||
BaseClass::GetValuesAtTime(aTime, aBuffer, aSize);
|
||||
if (mStream) {
|
||||
uint32_t blockOffset = aTime % WEBAUDIO_BLOCK_SIZE;
|
||||
MOZ_ASSERT(blockOffset + aSize <= WEBAUDIO_BLOCK_SIZE);
|
||||
for (size_t i = 0; i < aSize; ++i) {
|
||||
aBuffer[i] += AudioNodeInputValue(i);
|
||||
aBuffer[i] += AudioNodeInputValue(blockOffset + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче