Changeset 102638 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Dec 18, 2023 6:29:29 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp
r102612 r102638 812 812 } 813 813 814 /**815 * Invalidates device cache entry configurations.816 *817 * This is needed in order to not run into deadlocks when trying to release a stale device interface818 * via Release().819 *820 * @param pThis The WASAPI host audio driver instance data.821 * @param pDevEntry The device entry to invalidate.822 */823 static void drvHostAudioWasCacheInvalidateDevEntryConfig(PDRVHOSTAUDIOWAS pThis, PDRVHOSTAUDIOWASCACHEDEV pDevEntry)824 {825 RT_NOREF(pThis);826 827 Log8Func(("Invalidating cache entry configurations: %p - '%ls'\n", pDevEntry, pDevEntry->wszDevId));828 829 PDRVHOSTAUDIOWASCACHEDEVCFG pDevCfg, pDevCfgNext;830 RTListForEachSafe(&pDevEntry->ConfigList, pDevCfg, pDevCfgNext, DRVHOSTAUDIOWASCACHEDEVCFG, ListEntry)831 pDevCfg->pIAudioClient = NULL;832 }833 814 834 815 /** … … 1255 1236 * actually matches the one we have in the cache entry. 1256 1237 * 1257 * If it doesn't, invalidate + remove the cache entry from the cache and bail out. 1258 * Add a new device entry to the cache with the new interface below then. 1238 * If it doesn't, bail out and add a new device entry to the cache with the new interface below then. 1259 1239 * 1260 1240 * This is needed when switching audio interfaces and the device interface becomes invalid via 1261 1241 * AUDCLNT_E_DEVICE_INVALIDATED. See @bugref{10503} 1262 1242 */ 1263 if (p IDevice != pDevEntry->pIDevice)1243 if (pDevEntry->pIDevice != pIDevice) 1264 1244 { 1265 1245 LogRel2(("WasAPI: Cache hit for device '%ls': Stale interface (new: %p, old: %p)\n", 1266 1246 pDevEntry->wszDevId, pIDevice, pDevEntry->pIDevice)); 1267 1247 1268 LogRel(("WasAPI: Stale audio interface '%ls' detected! Invalidating audio interface ...\n", 1269 pDevEntry->wszDevId)); 1270 1271 drvHostAudioWasCacheInvalidateDevEntryConfig(pThis, pDevEntry); 1272 RTListNodeRemove(&pDevEntry->ListEntry); 1273 drvHostAudioWasCacheDestroyDevEntry(pThis, pDevEntry); 1274 pDevEntry = NULL; 1248 LogRel(("WasAPI: Stale audio interface '%ls' detected!\n", pDevEntry->wszDevId)); 1275 1249 break; 1276 1250 }
Note:
See TracChangeset
for help on using the changeset viewer.