Changeset 65144 in vbox
- Timestamp:
- Jan 5, 2017 11:41:38 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 112647
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp ¶
r65100 r65144 1471 1471 PPULSEAUDIOSTREAM pStrm = (PPULSEAUDIOSTREAM)pStream; 1472 1472 1473 PDMAUDIOSTRMSTS strmSts = PDMAUDIOSTRMSTS_FLAG_INITIALIZED 1474 | PDMAUDIOSTRMSTS_FLAG_ENABLED; 1473 PDMAUDIOSTRMSTS strmSts = PDMAUDIOSTRMSTS_FLAG_NONE; 1474 1475 /* Check PulseAudio's general status. */ 1476 if ( pThis->pContext 1477 && PA_CONTEXT_IS_GOOD(pa_context_get_state(pThis->pContext))) 1478 { 1479 strmSts = PDMAUDIOSTRMSTS_FLAG_INITIALIZED 1480 | PDMAUDIOSTRMSTS_FLAG_ENABLED; 1481 } 1475 1482 1476 1483 pa_threaded_mainloop_lock(pThis->pMainLoop); 1477 1484 1478 /*pa_context_state_t ctxState = pa_context_get_state(pThis->pContext); - unused */ 1479 1480 if ( pa_context_get_state(pThis->pContext) == PA_CONTEXT_READY 1481 && pa_stream_get_state(pStrm->pPAStream) == PA_STREAM_READY) 1482 { 1485 /* Check the PulseAudio stream. */ 1486 if (PA_STREAM_IS_GOOD(pa_stream_get_state(pStrm->pPAStream))) 1487 { 1488 size_t cbSize; 1483 1489 if (pStream->enmDir == PDMAUDIODIR_IN) 1484 1490 { 1485 strmSts |= PDMAUDIOSTRMSTS_FLAG_DATA_READABLE; 1486 } 1487 else 1488 { 1489 size_t cbSize = pa_stream_writable_size(pStrm->pPAStream); 1490 LogFlowFunc(("cbSize=%zu\n", cbSize)); 1491 cbSize = pa_stream_readable_size(pStrm->pPAStream); 1492 Log3Func(("cbSize=%zu\n", cbSize)); 1493 1494 if (cbSize) 1495 strmSts |= PDMAUDIOSTRMSTS_FLAG_DATA_READABLE; 1496 } 1497 else if (pStream->enmDir == PDMAUDIODIR_OUT) 1498 { 1499 cbSize = pa_stream_writable_size(pStrm->pPAStream); 1500 Log3Func(("cbSize=%zu, cbMinReq=%RU32\n", cbSize, pStrm->BufAttr.minreq)); 1491 1501 1492 1502 if (cbSize >= pStrm->BufAttr.minreq) 1493 1503 strmSts |= PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE; 1494 1504 } 1505 else 1506 AssertFailed(); 1495 1507 } 1496 1508
Note:
See TracChangeset
for help on using the changeset viewer.