mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-19 15:51:33 +00:00
Bug 1861709 align AudioCallbackDriver::ThreadRunning() behavior with its overridden GraphDriver method r=pehrsons
AudioCallbackDriver can have a thread running with a fallback driver or an audio stream callback. Asserts are using !ThreadRunning() and so are made stricter by this patch. Differential Revision: https://phabricator.services.mozilla.com/D192435
This commit is contained in:
parent
e31ee71874
commit
ca9f26a192
@ -641,10 +641,11 @@ class AudioCallbackDriver : public GraphDriver, public MixerCallbackReceiver {
|
||||
return mAudioThreadIdInCb.load() == std::this_thread::get_id();
|
||||
}
|
||||
|
||||
/* Returns true if this audio callback driver has successfully started and not
|
||||
* yet stopped. If the fallback driver is active, this returns false. */
|
||||
/* Returns true if this driver has started (perhaps with a fallback driver)
|
||||
* and not yet stopped. */
|
||||
bool ThreadRunning() const override {
|
||||
return mAudioStreamState == AudioStreamState::Running;
|
||||
return mAudioStreamState == AudioStreamState::Running ||
|
||||
mFallbackDriverState == FallbackDriverState::Running;
|
||||
}
|
||||
|
||||
/* Whether the underlying cubeb stream has been started and has not stopped
|
||||
|
Loading…
x
Reference in New Issue
Block a user