Changeset 108361 in vbox
- Timestamp:
- Feb 24, 2025 6:09:03 PM (8 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167721
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp
r108360 r108361 569 569 if ( m_pDrvWas != NULL 570 570 && ( (enmFlow == eRender && !m_pDrvWas->pwszOutputDevId) 571 || (enmFlow == eCapture && !m_pDrvWas->pwszInputDevId))) 571 || (enmFlow == eCapture && !m_pDrvWas->pwszInputDevId)) 572 /* We only care for the multimedia role of a device here. 573 * Devices can have multiple roles they expose interfaces for. 574 * 575 * Not having this check will result in several OnDefaultDeviceChanged calls 576 * with the same device ID but with a different role. However, in our audio stack there is no concept 577 * of a device role, so we try avoiding that by only caring about eMultimedia. 578 * 579 * See @bugref{10844} */ 580 && (enmRole == eMultimedia) 581 ) 572 582 { 573 583 pIEnumerator = m_pDrvWas->pIEnumerator; … … 1283 1293 && RTUtf16Cmp(pDevEntry->wszDevId, pwszDevId) == 0) 1284 1294 { 1295 /* First, try retrieving the current device state here as a yet another messure for 1296 * AUDCLNT_E_DEVICE_INVALIDATED errors. See @bugref{10844} */ 1297 DWORD dwState; 1298 hrc = pIDevice->GetState(&dwState); 1299 if (SUCCEEDED(hrc)) 1300 { 1301 if (dwState != DEVICE_STATE_ACTIVE) 1302 LOG_STALE_DEVICE_BREAK(("WasAPI: Cache hit for device '%ls': Non-active state (state %#x)\n", 1303 pDevEntry->wszDevId, drvHostAudioWasMMDeviceStateToString(dwState))); 1304 } 1305 else 1306 LOG_STALE_DEVICE_BREAK(("WasAPI: Cache hit for device '%ls': Unable to retrieve state (hr=%#x)\n", 1307 pDevEntry->wszDevId, hrc)); 1308 1285 1309 /* 1286 1310 * Cache hit -- here we now need to also check if the device interface we want to look up
Note:
See TracChangeset
for help on using the changeset viewer.