Changeset 73566 in vbox for trunk/src/VBox
- Timestamp:
- Aug 8, 2018 2:58:40 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r73561 r73566 1390 1390 AssertMsg(pSink->enmDir == AUDMIXSINKDIR_INPUT, ("Specified sink is not an input sink\n")); 1391 1391 1392 if (pStream) /* Can be NULL if un-setting. */ 1393 { 1394 AssertPtr(pStream->pStream); 1395 AssertMsg(pStream->pStream->enmDir == PDMAUDIODIR_IN, ("Specified stream is not an input stream\n")); 1396 } 1397 1398 pSink->In.pStreamRecSource = pStream; 1399 1400 LogFunc(("[%s] Recording source is now '%s'\n", 1401 pSink->pszName, pSink->In.pStreamRecSource ? pSink->In.pStreamRecSource->pszName : "<None>")); 1402 return VINF_SUCCESS; 1392 int rc; 1393 1394 if (pSink->In.pStreamRecSource) /* Disable old recording source, if any set. */ 1395 { 1396 const PPDMIAUDIOCONNECTOR pConn = pSink->In.pStreamRecSource->pConn; 1397 AssertPtr(pConn); 1398 rc = pConn->pfnEnable(pConn, PDMAUDIODIR_IN, false /* Disable */); 1399 } 1400 else 1401 rc = VINF_SUCCESS; 1402 1403 if (RT_SUCCESS(rc)) 1404 { 1405 if (pStream) /* Can be NULL if un-setting. */ 1406 { 1407 AssertPtr(pStream->pStream); 1408 AssertMsg(pStream->pStream->enmDir == PDMAUDIODIR_IN, ("Specified stream is not an input stream\n")); 1409 } 1410 1411 pSink->In.pStreamRecSource = pStream; 1412 1413 if (pSink->In.pStreamRecSource) 1414 { 1415 const PPDMIAUDIOCONNECTOR pConn = pSink->In.pStreamRecSource->pConn; 1416 AssertPtr(pConn); 1417 rc = pConn->pfnEnable(pConn, PDMAUDIODIR_IN, true /* Enable */); 1418 } 1419 } 1420 1421 LogFunc(("[%s] Recording source is now '%s', rc=%Rrc\n", 1422 pSink->pszName, pSink->In.pStreamRecSource ? pSink->In.pStreamRecSource->pszName : "<None>", rc)); 1423 1424 return rc; 1403 1425 } 1404 1426
Note:
See TracChangeset
for help on using the changeset viewer.