зеркало из https://github.com/mozilla/gecko-dev.git
b=923301 send only one release message when delay buffer is drained r=roc
--HG-- extra : transplant_source : %C7%8Ag%B2%C52X%A2%96%D1%8E%BB%15%E4%15%CC%1D%1Er%B8
This commit is contained in:
Родитель
748b20e3a4
Коммит
a9d4f15ee6
|
@ -92,18 +92,17 @@ public:
|
|||
NS_DispatchToMainThread(refchanged);
|
||||
}
|
||||
mLeftOverData = mProcessor.MaxDelayFrames();
|
||||
} else if (mLeftOverData != INT32_MIN) {
|
||||
if (mLeftOverData <= 0) {
|
||||
// Continue spamming the main thread with messages until we are destroyed.
|
||||
// This isn't great.
|
||||
mLeftOverData = 0;
|
||||
} else if (mLeftOverData > 0) {
|
||||
mLeftOverData -= WEBAUDIO_BLOCK_SIZE;
|
||||
} else {
|
||||
if (mLeftOverData != INT32_MIN) {
|
||||
mLeftOverData = INT32_MIN;
|
||||
playedBackAllLeftOvers = true;
|
||||
|
||||
nsRefPtr<PlayingRefChanged> refchanged =
|
||||
new PlayingRefChanged(aStream, PlayingRefChanged::RELEASE);
|
||||
NS_DispatchToMainThread(refchanged);
|
||||
}
|
||||
mLeftOverData -= WEBAUDIO_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
AllocateAudioBlock(numChannels, aOutput);
|
||||
|
|
Загрузка…
Ссылка в новой задаче