mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1125804 - Remove the mixer callback when failing to open an audio stream when switching to an audio driver. r=jesup
This commit is contained in:
parent
68db274ab2
commit
2119a23cf6
@ -612,6 +612,8 @@ AudioCallbackDriver::Init()
|
||||
mNextDriver->SetGraphTime(this, mIterationStart, mIterationEnd,
|
||||
mStateComputedTime, mNextStateComputedTime);
|
||||
mGraphImpl->SetCurrentDriver(mNextDriver);
|
||||
bool found = mGraphImpl->RemoveMixerCallback(this);
|
||||
NS_WARN_IF_FALSE(!found, "Mixer callback not added when switching?");
|
||||
mNextDriver->Start();
|
||||
return;
|
||||
}
|
||||
|
@ -430,6 +430,11 @@ public:
|
||||
return mDriver;
|
||||
}
|
||||
|
||||
bool RemoveMixerCallback(MixerCallbackReceiver* aReceiver)
|
||||
{
|
||||
return mMixer.RemoveCallback(aReceiver);
|
||||
}
|
||||
|
||||
/**
|
||||
* Effectively set the new driver, while we are switching.
|
||||
* It is only safe to call this at the very end of an iteration, when there
|
||||
|
Loading…
Reference in New Issue
Block a user