- Timestamp:
- Aug 3, 2017 8:25:32 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r68271 r68272 789 789 790 790 /** Stream status flag. To be used with PDMAUDIOSTRMSTS_FLAG_ flags. */ 791 typedef uint32_t PDMAUDIOSTR MSTS;791 typedef uint32_t PDMAUDIOSTREAMSTS; 792 792 793 793 /** No flags being set. */ 794 #define PDMAUDIOSTR MSTS_FLAG_NONE 0794 #define PDMAUDIOSTREAMSTS_FLAG_NONE 0 795 795 /** Whether this stream has been initialized by the 796 796 * backend or not. */ 797 #define PDMAUDIOSTR MSTS_FLAG_INITIALIZED RT_BIT_32(0)797 #define PDMAUDIOSTREAMSTS_FLAG_INITIALIZED RT_BIT_32(0) 798 798 /** Whether this stream is enabled or disabled. */ 799 #define PDMAUDIOSTR MSTS_FLAG_ENABLED RT_BIT_32(1)799 #define PDMAUDIOSTREAMSTS_FLAG_ENABLED RT_BIT_32(1) 800 800 /** Whether this stream has been paused or not. This also implies 801 801 * that this is an enabled stream! */ 802 #define PDMAUDIOSTR MSTS_FLAG_PAUSED RT_BIT_32(2)802 #define PDMAUDIOSTREAMSTS_FLAG_PAUSED RT_BIT_32(2) 803 803 /** Whether this stream was marked as being disabled 804 804 * but there are still associated guest output streams 805 805 * which rely on its data. */ 806 #define PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE RT_BIT_32(3)806 #define PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE RT_BIT_32(3) 807 807 /** Whether this stream is in re-initialization phase. 808 808 * All other bits remain untouched to be able to restore 809 809 * the stream's state after the re-initialization bas been 810 810 * finished. */ 811 #define PDMAUDIOSTR MSTS_FLAG_PENDING_REINIT RT_BIT_32(4)811 #define PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT RT_BIT_32(4) 812 812 /** Validation mask. */ 813 #define PDMAUDIOSTR MSTS_VALID_MASK UINT32_C(0x0000001F)813 #define PDMAUDIOSTREAMSTS_VALID_MASK UINT32_C(0x0000001F) 814 814 815 815 /** … … 900 900 PDMAUDIOSTREAMCFG Cfg; 901 901 /** Stream status flag. */ 902 PDMAUDIOSTR MSTS fStatus;902 PDMAUDIOSTREAMSTS fStatus; 903 903 /** This stream's mixing buffer. */ 904 904 PDMAUDIOMIXBUF MixBuf; … … 1134 1134 * @param pStream Pointer to audio stream. 1135 1135 */ 1136 DECLR3CALLBACKMEMBER(PDMAUDIOSTR MSTS, pfnStreamGetStatus, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));1136 DECLR3CALLBACKMEMBER(PDMAUDIOSTREAMSTS, pfnStreamGetStatus, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)); 1137 1137 1138 1138 /** … … 1316 1316 * @param pStream Pointer to audio stream. 1317 1317 */ 1318 DECLR3CALLBACKMEMBER(PDMAUDIOSTR MSTS, pfnStreamGetStatus, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream));1318 DECLR3CALLBACKMEMBER(PDMAUDIOSTREAMSTS, pfnStreamGetStatus, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)); 1319 1319 1320 1320 /** -
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r68268 r68272 840 840 RTListForEach(&pSink->lstStreams, pMixStream, AUDMIXSTREAM, Node) 841 841 { 842 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTR MSTS_FLAG_ENABLED))842 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 843 843 { 844 844 Log3Func(("[%s] Stream '%s' disabled, skipping ...\n", pSink->pszName, pMixStream->pszName)); … … 891 891 RTListForEach(&pSink->lstStreams, pMixStream, AUDMIXSTREAM, Node) 892 892 { 893 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTR MSTS_FLAG_ENABLED))893 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 894 894 { 895 895 Log3Func(("[%s] Stream '%s' disabled, skipping ...\n", pSink->pszName, pMixStream->pszName)); … … 1096 1096 RTListForEach(&pSink->lstStreams, pMixStream, AUDMIXSTREAM, Node) 1097 1097 { 1098 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTR MSTS_FLAG_ENABLED))1098 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 1099 1099 { 1100 1100 Log3Func(("[%s] Stream '%s' disabled, skipping ...\n", pSink->pszName, pMixStream->pszName)); … … 1493 1493 } 1494 1494 1495 PDMAUDIOSTR MSTS strmSts = pConn->pfnStreamGetStatus(pConn, pStream);1495 PDMAUDIOSTREAMSTS strmSts = pConn->pfnStreamGetStatus(pConn, pStream); 1496 1496 1497 1497 /* Is the stream not enabled and also is not in a pending disable state anymore? */ 1498 if ( !(strmSts & PDMAUDIOSTR MSTS_FLAG_ENABLED)1499 && !(strmSts & PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE))1498 if ( !(strmSts & PDMAUDIOSTREAMSTS_FLAG_ENABLED) 1499 && !(strmSts & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE)) 1500 1500 { 1501 1501 cStreamsDisabled++; … … 1622 1622 RTListForEach(&pSink->lstStreams, pMixStream, AUDMIXSTREAM, Node) 1623 1623 { 1624 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTR MSTS_FLAG_ENABLED))1624 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 1625 1625 { 1626 1626 Log3Func(("\t%s: Stream '%s' disabled, skipping ...\n", pMixStream->pszName, pMixStream->pszName)); … … 1815 1815 if ( pMixStream->pConn 1816 1816 && pMixStream->pStream 1817 && RT_BOOL(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTR MSTS_FLAG_ENABLED))1817 && RT_BOOL(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 1818 1818 { 1819 1819 fIsActive = true; … … 1847 1847 if ( pMixStream->pConn 1848 1848 && pMixStream->pStream 1849 && RT_BOOL(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTR MSTS_FLAG_INITIALIZED))1849 && RT_BOOL(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAG_INITIALIZED)) 1850 1850 { 1851 1851 fIsValid = true; -
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r67806 r68272 1897 1897 } 1898 1898 1899 PDMAUDIOSTR MSTS strmSts = pConn->pfnStreamGetStatus(pConn, pStream);1900 fIsPlaying |= ( (strmSts & PDMAUDIOSTR MSTS_FLAG_ENABLED)1901 || (strmSts & PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE));1899 PDMAUDIOSTREAMSTS strmSts = pConn->pfnStreamGetStatus(pConn, pStream); 1900 fIsPlaying |= ( (strmSts & PDMAUDIOSTREAMSTS_FLAG_ENABLED) 1901 || (strmSts & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE)); 1902 1902 } 1903 1903 … … 2484 2484 2485 2485 /** @todo No input streams available for SB16 yet. */ 2486 bool fValidOut = pCon->pfnStreamGetStatus(pCon, pDrv->Out.pStream) & PDMAUDIOSTR MSTS_FLAG_INITIALIZED;2486 bool fValidOut = pCon->pfnStreamGetStatus(pCon, pDrv->Out.pStream) & PDMAUDIOSTREAMSTS_FLAG_INITIALIZED; 2487 2487 if (!fValidOut) 2488 2488 { -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r68267 r68272 151 151 * @param fFlags Stream status flags to convert. 152 152 */ 153 static char *dbgAudioStreamStatusToStr(PDMAUDIOSTR MSTS fStatus)154 { 155 #define APPEND_FLAG_TO_STR(_aFlag) \156 if (fStatus & PDMAUDIOSTR MSTS_FLAG_##_aFlag) \157 { \158 if (pszFlags) \159 { \160 rc2 = RTStrAAppend(&pszFlags, " "); \161 if (RT_FAILURE(rc2)) \162 break; \163 } \164 \165 rc2 = RTStrAAppend(&pszFlags, #_aFlag); \166 if (RT_FAILURE(rc2)) \167 break; \168 } \153 static char *dbgAudioStreamStatusToStr(PDMAUDIOSTREAMSTS fStatus) 154 { 155 #define APPEND_FLAG_TO_STR(_aFlag) \ 156 if (fStatus & PDMAUDIOSTREAMSTS_FLAG_##_aFlag) \ 157 { \ 158 if (pszFlags) \ 159 { \ 160 rc2 = RTStrAAppend(&pszFlags, " "); \ 161 if (RT_FAILURE(rc2)) \ 162 break; \ 163 } \ 164 \ 165 rc2 = RTStrAAppend(&pszFlags, #_aFlag); \ 166 if (RT_FAILURE(rc2)) \ 167 break; \ 168 } \ 169 169 170 170 char *pszFlags = NULL; … … 384 384 case PDMAUDIOSTREAMCMD_ENABLE: 385 385 { 386 if (!(pGstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED))386 if (!(pGstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 387 387 { 388 388 if (pHstStream) 389 389 { 390 390 /* Is a pending disable outstanding? Then disable first. */ 391 if (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE)391 if (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE) 392 392 rc = drvAudioStreamControlInternalBackend(pThis, pHstStream, PDMAUDIOSTREAMCMD_DISABLE); 393 393 … … 397 397 398 398 if (RT_SUCCESS(rc)) 399 pGstStream->fStatus |= PDMAUDIOSTR MSTS_FLAG_ENABLED;399 pGstStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_ENABLED; 400 400 } 401 401 break; … … 404 404 case PDMAUDIOSTREAMCMD_DISABLE: 405 405 { 406 if (pGstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED)406 if (pGstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED) 407 407 { 408 408 if (pHstStream) … … 416 416 { 417 417 LogFunc(("[%s] Pending disable/pause\n", pHstStream->szName)); 418 pHstStream->fStatus |= PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE;418 pHstStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE; 419 419 } 420 420 421 421 /* Can we close the host stream as well (not in pending disable mode)? */ 422 if (!(pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE))422 if (!(pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE)) 423 423 rc = drvAudioStreamControlInternalBackend(pThis, pHstStream, PDMAUDIOSTREAMCMD_DISABLE); 424 424 } 425 425 426 426 if (RT_SUCCESS(rc)) 427 pGstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_ENABLED;427 pGstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_ENABLED; 428 428 } 429 429 break; … … 432 432 case PDMAUDIOSTREAMCMD_PAUSE: 433 433 { 434 if (!(pGstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PAUSED))434 if (!(pGstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PAUSED)) 435 435 { 436 436 if (pHstStream) … … 438 438 439 439 if (RT_SUCCESS(rc)) 440 pGstStream->fStatus |= PDMAUDIOSTR MSTS_FLAG_PAUSED;440 pGstStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_PAUSED; 441 441 } 442 442 break; … … 445 445 case PDMAUDIOSTREAMCMD_RESUME: 446 446 { 447 if (pGstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PAUSED)447 if (pGstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PAUSED) 448 448 { 449 449 if (pHstStream) … … 451 451 452 452 if (RT_SUCCESS(rc)) 453 pGstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_PAUSED;453 pGstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_PAUSED; 454 454 } 455 455 break; … … 500 500 case PDMAUDIOSTREAMCMD_ENABLE: 501 501 { 502 if (!(pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED))502 if (!(pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 503 503 { 504 504 LogRel2(("Audio: Enabling stream '%s'\n", pHstStream->szName)); … … 507 507 if (RT_SUCCESS(rc)) 508 508 { 509 pHstStream->fStatus |= PDMAUDIOSTR MSTS_FLAG_ENABLED;509 pHstStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_ENABLED; 510 510 } 511 511 else … … 517 517 case PDMAUDIOSTREAMCMD_DISABLE: 518 518 { 519 if (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED)519 if (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED) 520 520 { 521 521 LogRel2(("Audio: Disabling stream '%s'\n", pHstStream->szName)); … … 524 524 if (RT_SUCCESS(rc)) 525 525 { 526 pHstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_ENABLED;527 pHstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE;526 pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_ENABLED; 527 pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE; 528 528 AudioMixBufReset(&pHstStream->MixBuf); 529 529 } … … 537 537 { 538 538 /* Only pause if the stream is enabled. */ 539 if (!(pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED))539 if (!(pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 540 540 break; 541 541 542 if (!(pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PAUSED))542 if (!(pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PAUSED)) 543 543 { 544 544 LogRel2(("Audio: Pausing stream '%s'\n", pHstStream->szName)); … … 547 547 if (RT_SUCCESS(rc)) 548 548 { 549 pHstStream->fStatus |= PDMAUDIOSTR MSTS_FLAG_PAUSED;549 pHstStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_PAUSED; 550 550 } 551 551 else … … 558 558 { 559 559 /* Only need to resume if the stream is enabled. */ 560 if (!(pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED))560 if (!(pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) 561 561 break; 562 562 563 if (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PAUSED)563 if (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PAUSED) 564 564 { 565 565 LogRel2(("Audio: Resuming stream '%s'\n", pHstStream->szName)); … … 568 568 if (RT_SUCCESS(rc)) 569 569 { 570 pHstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_PAUSED;570 pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_PAUSED; 571 571 } 572 572 else … … 754 754 PPDMAUDIOSTREAM pHstStream; 755 755 RTListForEach(&pThis->lstHstStreams, pHstStream, PDMAUDIOSTREAM, Node) 756 pHstStream->fStatus |= PDMAUDIOSTR MSTS_FLAG_PENDING_REINIT;756 pHstStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT; 757 757 758 758 # ifdef VBOX_WITH_AUDIO_ENUM … … 787 787 * Gather current stream status. 788 788 */ 789 bool fIsEnabled = RT_BOOL(pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED); /* Stream is enabled? */789 bool fIsEnabled = RT_BOOL(pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED); /* Stream is enabled? */ 790 790 791 791 /* … … 935 935 936 936 #ifdef LOG_ENABLED 937 AssertMsg(pGstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED,937 AssertMsg(pGstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED, 938 938 ("Writing to disabled guest output stream \"%s\" not possible (status is %s, host status %s)\n", 939 939 pGstStream->szName, pszGstSts, pszHstSts)); … … 1103 1103 1104 1104 /* Is the stream scheduled for re-initialization? Do so now. */ 1105 if (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PENDING_REINIT)1105 if (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT) 1106 1106 { 1107 1107 #ifdef VBOX_WITH_AUDIO_ENUM … … 1117 1117 /* Remove the pending re-init flag in any case, regardless whether the actual re-initialization succeeded 1118 1118 * or not. If it failed, the backend needs to notify us again to try again at some later point in time. */ 1119 pHstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_PENDING_REINIT;1119 pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT; 1120 1120 1121 1121 rc = drvAudioStreamReInitInternal(pThis, pStream); … … 1131 1131 1132 1132 /* Not enabled or paused? Skip iteration. */ 1133 if ( !(pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_ENABLED)1134 || (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PAUSED))1133 if ( !(pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED) 1134 || (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PAUSED)) 1135 1135 { 1136 1136 return VINF_SUCCESS; … … 1191 1191 /* Has the host stream marked as disabled but there still were guest streams relying 1192 1192 * on it? Check if the stream now can be closed and do so, if possible. */ 1193 if (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE)1193 if (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE) 1194 1194 { 1195 1195 LogFunc(("[%s] Closing pending input stream\n", pHstStream->szName)); … … 1197 1197 if (RT_SUCCESS(rc)) 1198 1198 { 1199 pHstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE;1199 pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE; 1200 1200 } 1201 1201 else … … 1491 1491 1492 1492 AssertPtr(pThis->pHostDrvAudio->pfnStreamGetStatus); 1493 PDMAUDIOSTR MSTS stsBackend = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream->pvBackend);1493 PDMAUDIOSTREAMSTS stsBackend = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream->pvBackend); 1494 1494 #ifdef LOG_ENABLED 1495 1495 char *pszBackendSts = dbgAudioStreamStatusToStr(stsBackend); … … 1497 1497 RTStrFree(pszBackendSts); 1498 1498 #endif /* LOG_ENABLED */ 1499 if (!(stsBackend & PDMAUDIOSTR MSTS_FLAG_ENABLED)) /* Backend disabled? Bail out. */1499 if (!(stsBackend & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) /* Backend disabled? Bail out. */ 1500 1500 break; 1501 1501 … … 1544 1544 /* Has the host stream marked as disabled but there still were guest streams relying 1545 1545 * on it? Check if the stream now can be closed and do so, if possible. */ 1546 if (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE)1546 if (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE) 1547 1547 { 1548 1548 LogFunc(("[%s] All pending data played, closing output stream ...\n", pHstStream->szName)); … … 1550 1550 if (RT_SUCCESS(rc)) 1551 1551 { 1552 pHstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_PENDING_DISABLE;1552 pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE; 1553 1553 } 1554 1554 else … … 1781 1781 1782 1782 AssertPtr(pThis->pHostDrvAudio->pfnStreamGetStatus); 1783 PDMAUDIOSTR MSTS stsBackend = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream->pvBackend);1783 PDMAUDIOSTREAMSTS stsBackend = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream->pvBackend); 1784 1784 #ifdef LOG_ENABLED 1785 1785 char *pszBackendSts = dbgAudioStreamStatusToStr(stsBackend); … … 1787 1787 RTStrFree(pszBackendSts); 1788 1788 #endif /* LOG_ENABLED */ 1789 if (!(stsBackend & PDMAUDIOSTR MSTS_FLAG_ENABLED)) /* Backend disabled? Bail out. */1789 if (!(stsBackend & PDMAUDIOSTREAMSTS_FLAG_ENABLED)) /* Backend disabled? Bail out. */ 1790 1790 break; 1791 1791 … … 2772 2772 * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamGetStatus} 2773 2773 */ 2774 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvAudioStreamGetStatus(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)2774 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvAudioStreamGetStatus(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream) 2775 2775 { 2776 2776 AssertPtrReturn(pInterface, false); 2777 2777 2778 2778 if (!pStream) 2779 return PDMAUDIOSTR MSTS_FLAG_NONE;2779 return PDMAUDIOSTREAMSTS_FLAG_NONE; 2780 2780 2781 2781 PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface); … … 2784 2784 AssertRC(rc2); 2785 2785 2786 PDMAUDIOSTR MSTS strmSts = PDMAUDIOSTRMSTS_FLAG_NONE;2786 PDMAUDIOSTREAMSTS strmSts = PDMAUDIOSTREAMSTS_FLAG_NONE; 2787 2787 2788 2788 PPDMAUDIOSTREAM pHstStream = drvAudioGetHostStream(pStream); … … 2951 2951 ("Stream '%s' is not a host stream and therefore has no backend\n", pHstStream->szName)); 2952 2952 2953 AssertMsg((pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_INITIALIZED) == 0,2953 AssertMsg((pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_INITIALIZED) == 0, 2954 2954 ("Stream '%s' already initialized in backend\n", pHstStream->szName)); 2955 2955 … … 2982 2982 * in the host backend. This is necessary for trying to re-initialize the stream 2983 2983 * at some later point in time. */ 2984 pHstStream->fStatus |= PDMAUDIOSTR MSTS_FLAG_INITIALIZED;2984 pHstStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_INITIALIZED; 2985 2985 2986 2986 if (pCfgAcq) … … 3016 3016 #endif /* LOG_ENABLED */ 3017 3017 3018 if (pHstStream->fStatus & PDMAUDIOSTR MSTS_FLAG_INITIALIZED)3018 if (pHstStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_INITIALIZED) 3019 3019 { 3020 3020 /* Check if the pointer to the host audio driver is still valid. … … 3024 3024 if (RT_SUCCESS(rc)) 3025 3025 { 3026 pHstStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_INITIALIZED;3026 pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_INITIALIZED; 3027 3027 #if 0 /** @todo r=andy Disabled for now -- need to test this on Windows hosts. */ 3028 3028 Assert(pHstStream->fStatus == PDMAUDIOSTRMSTS_FLAG_NONE); … … 3056 3056 if (pStream->enmCtx == PDMAUDIOSTREAMCTX_GUEST) 3057 3057 { 3058 if (pStream->fStatus & PDMAUDIOSTR MSTS_FLAG_INITIALIZED)3058 if (pStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_INITIALIZED) 3059 3059 { 3060 3060 rc = drvAudioStreamControlInternal(pThis, pStream, PDMAUDIOSTREAMCMD_DISABLE); 3061 3061 if (RT_SUCCESS(rc)) 3062 3062 { 3063 pStream->fStatus &= ~PDMAUDIOSTR MSTS_FLAG_INITIALIZED;3064 Assert(pStream->fStatus == PDMAUDIOSTR MSTS_FLAG_NONE);3063 pStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_INITIALIZED; 3064 Assert(pStream->fStatus == PDMAUDIOSTREAMSTS_FLAG_NONE); 3065 3065 } 3066 3066 } … … 3080 3080 3081 3081 /* Reset status. */ 3082 pStream->fStatus = PDMAUDIOSTR MSTS_FLAG_NONE;3082 pStream->fStatus = PDMAUDIOSTREAMSTS_FLAG_NONE; 3083 3083 3084 3084 /* Destroy mixing buffer. */ -
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r68132 r68272 1676 1676 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 1677 1677 */ 1678 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostALSAAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)1678 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostALSAAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 1679 1679 { 1680 1680 RT_NOREF(pInterface, pStream); 1681 1681 1682 return (PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED);1682 return (PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED); 1683 1683 } 1684 1684 -
trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
r68238 r68272 2474 2474 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 2475 2475 */ 2476 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostCoreAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)2476 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostCoreAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 2477 2477 { 2478 2478 RT_NOREF(pInterface); … … 2481 2481 PCOREAUDIOSTREAM pCAStream = (PCOREAUDIOSTREAM)pStream; 2482 2482 2483 PDMAUDIOSTR MSTS strmSts = PDMAUDIOSTRMSTS_FLAG_NONE;2483 PDMAUDIOSTREAMSTS strmSts = PDMAUDIOSTREAMSTS_FLAG_NONE; 2484 2484 2485 2485 if (!pCAStream->pCfg) /* Not (yet) configured? Skip. */ … … 2487 2487 2488 2488 if (ASMAtomicReadU32(&pCAStream->enmStatus) == COREAUDIOSTATUS_INIT) 2489 strmSts |= PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED;2489 strmSts |= PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED; 2490 2490 2491 2491 return strmSts; -
trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp
r68266 r68272 2262 2262 { 2263 2263 RT_NOREF(pInterface); 2264 AssertPtrReturn(pStream, PDMAUDIOSTR MSTS_FLAG_NONE);2264 AssertPtrReturn(pStream, PDMAUDIOSTREAMSTS_FLAG_NONE); 2265 2265 2266 2266 PDSOUNDSTREAM pStreamDS = (PDSOUNDSTREAM)pStream; … … 2280 2280 RT_NOREF(pInterface, pStream); 2281 2281 2282 AssertPtrReturn(pInterface, PDMAUDIOSTR MSTS_FLAG_NONE);2283 AssertPtrReturn(pStream, PDMAUDIOSTR MSTS_FLAG_NONE);2282 AssertPtrReturn(pInterface, PDMAUDIOSTREAMSTS_FLAG_NONE); 2283 AssertPtrReturn(pStream, PDMAUDIOSTREAMSTS_FLAG_NONE); 2284 2284 2285 2285 PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface); … … 2305 2305 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 2306 2306 */ 2307 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostDSoundStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)2307 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostDSoundStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 2308 2308 { 2309 2309 RT_NOREF(pInterface); 2310 AssertPtrReturn(pStream, PDMAUDIOSTR MSTS_FLAG_NONE);2310 AssertPtrReturn(pStream, PDMAUDIOSTREAMSTS_FLAG_NONE); 2311 2311 2312 2312 PDSOUNDSTREAM pStreamDS = (PDSOUNDSTREAM)pStream; 2313 2313 2314 2314 if (!pStreamDS->pCfg) /* Not (yet) configured? Skip. */ 2315 return PDMAUDIOSTR MSTS_FLAG_NONE;2316 2317 PDMAUDIOSTR MSTS strmSts = PDMAUDIOSTRMSTS_FLAG_INITIALIZED;2315 return PDMAUDIOSTREAMSTS_FLAG_NONE; 2316 2317 PDMAUDIOSTREAMSTS strmSts = PDMAUDIOSTREAMSTS_FLAG_INITIALIZED; 2318 2318 if (pStreamDS->pCfg->enmDir == PDMAUDIODIR_IN) 2319 2319 { 2320 2320 if (pStreamDS->In.fEnabled) 2321 strmSts |= PDMAUDIOSTR MSTS_FLAG_ENABLED;2321 strmSts |= PDMAUDIOSTREAMSTS_FLAG_ENABLED; 2322 2322 } 2323 2323 else 2324 2324 { 2325 2325 if (pStreamDS->Out.fEnabled) 2326 strmSts |= PDMAUDIOSTR MSTS_FLAG_ENABLED;2326 strmSts |= PDMAUDIOSTREAMSTS_FLAG_ENABLED; 2327 2327 } 2328 2328 -
trunk/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp
r68241 r68272 378 378 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetWritable} 379 379 */ 380 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostDebugAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)380 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostDebugAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 381 381 { 382 382 RT_NOREF(pInterface, pStream); 383 383 384 return (PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED);384 return (PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED); 385 385 } 386 386 -
trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
r68132 r68272 302 302 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 303 303 */ 304 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostNullAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)304 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostNullAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 305 305 { 306 306 RT_NOREF(pInterface, pStream); 307 return PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED;307 return PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED; 308 308 } 309 309 -
trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
r68132 r68272 1073 1073 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 1074 1074 */ 1075 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostOSSAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)1075 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostOSSAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 1076 1076 { 1077 1077 RT_NOREF(pInterface, pStream); 1078 1078 1079 PDMAUDIOSTR MSTS strmSts = PDMAUDIOSTRMSTS_FLAG_INITIALIZED1080 | PDMAUDIOSTR MSTS_FLAG_ENABLED;1079 PDMAUDIOSTREAMSTS strmSts = PDMAUDIOSTREAMSTS_FLAG_INITIALIZED 1080 | PDMAUDIOSTREAMSTS_FLAG_ENABLED; 1081 1081 return strmSts; 1082 1082 } -
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r68132 r68272 1571 1571 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 1572 1572 */ 1573 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostPulseAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)1573 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostPulseAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 1574 1574 { 1575 1575 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); … … 1578 1578 PDRVHOSTPULSEAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface); 1579 1579 1580 PDMAUDIOSTR MSTS strmSts = PDMAUDIOSTRMSTS_FLAG_NONE;1580 PDMAUDIOSTREAMSTS strmSts = PDMAUDIOSTREAMSTS_FLAG_NONE; 1581 1581 1582 1582 /* Check PulseAudio's general status. */ … … 1584 1584 && PA_CONTEXT_IS_GOOD(pa_context_get_state(pThis->pContext))) 1585 1585 { 1586 strmSts = PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED;1586 strmSts = PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED; 1587 1587 } 1588 1588 -
trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp
r68132 r68272 406 406 } 407 407 408 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvHostVaKitAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)408 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostVaKitAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 409 409 { 410 410 RT_NOREF(pInterface, pStream); 411 411 412 return (PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED);412 return (PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED); 413 413 } 414 414 -
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r68132 r68272 534 534 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 535 535 */ 536 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvAudioVRDEStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)536 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvAudioVRDEStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 537 537 { 538 538 RT_NOREF(pInterface, pStream); 539 539 540 return (PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED);540 return (PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED); 541 541 } 542 542 -
trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
r68132 r68272 852 852 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} 853 853 */ 854 static DECLCALLBACK(PDMAUDIOSTR MSTS) drvAudioVideoRecStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)854 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvAudioVideoRecStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 855 855 { 856 856 RT_NOREF(pInterface, pStream); 857 857 858 return (PDMAUDIOSTR MSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED);858 return (PDMAUDIOSTREAMSTS_FLAG_INITIALIZED | PDMAUDIOSTREAMSTS_FLAG_ENABLED); 859 859 } 860 860
Note:
See TracChangeset
for help on using the changeset viewer.