mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 872635 - Drop the DelayNode's self-reference right on time, to make sure that DelayNodes don't leak with OfflineAudioContexts; r=roc
This commit is contained in:
parent
46fedd529b
commit
8d08501aa7
@ -144,11 +144,13 @@ public:
|
||||
if (!mBuffer.IsEmpty() &&
|
||||
mLeftOverData == INT32_MIN &&
|
||||
aStream->AllInputsFinished()) {
|
||||
mLeftOverData = static_cast<int32_t>(mCurrentDelayTime * IdealAudioRate());
|
||||
mLeftOverData = static_cast<int32_t>(mCurrentDelayTime * IdealAudioRate()) - WEBAUDIO_BLOCK_SIZE;
|
||||
|
||||
nsRefPtr<PlayingRefChanged> refchanged =
|
||||
new PlayingRefChanged(aStream, PlayingRefChanged::ADDREF);
|
||||
NS_DispatchToMainThread(refchanged);
|
||||
if (mLeftOverData > 0) {
|
||||
nsRefPtr<PlayingRefChanged> refchanged =
|
||||
new PlayingRefChanged(aStream, PlayingRefChanged::ADDREF);
|
||||
NS_DispatchToMainThread(refchanged);
|
||||
}
|
||||
} else if (mLeftOverData != INT32_MIN) {
|
||||
mLeftOverData -= WEBAUDIO_BLOCK_SIZE;
|
||||
if (mLeftOverData <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user