mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864322 - Stop all audio buffer source nodes when the context is being shut down to prevent leaks in the graph; r=padenot
--HG-- extra : rebase_source : a64d445609ac9892d0fae36122fdc25e1437f400
This commit is contained in:
parent
3a1f3ec420
commit
7b1d390d73
@ -274,6 +274,20 @@ AudioContext::CurrentTime() const
|
||||
return MediaTimeToSeconds(Destination()->Stream()->GetCurrentTime());
|
||||
}
|
||||
|
||||
void
|
||||
AudioContext::Shutdown()
|
||||
{
|
||||
Suspend();
|
||||
mDecoder.Shutdown();
|
||||
|
||||
// Stop all audio buffer source nodes, to make sure that they release
|
||||
// their self-references.
|
||||
for (uint32_t i = 0; i < mAudioBufferSourceNodes.Length(); ++i) {
|
||||
ErrorResult rv;
|
||||
mAudioBufferSourceNodes[i]->Stop(0.0, rv);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioContext::Suspend()
|
||||
{
|
||||
|
@ -65,12 +65,7 @@ public:
|
||||
return mWindow;
|
||||
}
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
Suspend();
|
||||
mDecoder.Shutdown();
|
||||
}
|
||||
|
||||
void Shutdown();
|
||||
void Suspend();
|
||||
void Resume();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user