зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1404977 - Part 15 - Invalidate the device cache before re-enumerating devices when the cubeb backend does not support dynamic device collection invalidation. r=pehrsons
Also, clear the array that's been passed in before appending the new devices. MozReview-Commit-ID: BTnwzyKBrb5 --HG-- extra : rebase_source : 23dbd11720804a30188389bc4408be4b40ad70b2
This commit is contained in:
Родитель
7ca1aba8c1
Коммит
ce1884c2eb
|
@ -396,9 +396,11 @@ CubebDeviceEnumerator::EnumerateAudioInputDevices(nsTArray<RefPtr<AudioDeviceInf
|
|||
MutexAutoLock lock(mMutex);
|
||||
|
||||
if (mDevices.IsEmpty() || mManualInvalidation) {
|
||||
mDevices.Clear();
|
||||
CubebUtils::GetDeviceCollection(mDevices, CubebUtils::Input);
|
||||
}
|
||||
|
||||
aOutDevices.Clear();
|
||||
aOutDevices.AppendElements(mDevices);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче