mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Bug 1426603 - Fallback from audio callback to system clock driver on error only once. r=padenot, a=RyanVM
Usually, mShouldFallbackIfError has been reset to false in DataCallback() before Stop() is called. However, if fallback to a system clock driver due to cubeb error had already occurred, then mShouldFallbackIfError would not have been reset, and Stop() is still called. With mShouldFallbackIfError still true, a cubeb error in stop would have created another fallback thread. I expect that resetting mShouldFallbackIfError in Stop() would also be an effective alternative solution, but resetting on StateCallback() happens earlier, which would be an advantage if any additional errors could possibly be reported to StateCallback(). MozReview-Commit-ID: E9j7PQmS3O4
This commit is contained in:
parent
69b9980815
commit
c86a78aa94
1 changed files with 1 additions and 0 deletions
|
|
@ -1055,6 +1055,7 @@ AudioCallbackDriver::StateCallback(cubeb_state aState)
|
|||
{
|
||||
STREAM_LOG(LogLevel::Debug, ("AudioCallbackDriver State: %d", aState));
|
||||
if (aState == CUBEB_STATE_ERROR && mShouldFallbackIfError) {
|
||||
mShouldFallbackIfError = false;
|
||||
MonitorAutoLock lock(GraphImpl()->GetMonitor());
|
||||
// Fall back to a driver using a normal thread. If needed,
|
||||
// the graph will try to re-open an audio stream later.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue