Changeset 61334 in vbox
- Timestamp:
- May 31, 2016 2:04:04 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 107629
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r61332 r61334 2064 2064 if (pDrv->Out.pStream) 2065 2065 { 2066 pDrv->pConnector->pfnStreamRelease(pDrv->pConnector, pDrv->Out.pStream); 2067 2066 2068 int rc3 = pDrv->pConnector->pfnStreamDestroy(pDrv->pConnector, pDrv->Out.pStream); 2067 2069 AssertRC(rc3); … … 2071 2073 2072 2074 int rc2 = pDrv->pConnector->pfnStreamCreate(pDrv->pConnector, &CfgHost, pCfg, &pDrv->Out.pStream); 2075 if (RT_SUCCESS(rc2)) 2076 pDrv->pConnector->pfnStreamAddRef(pDrv->pConnector, pDrv->Out.pStream); 2077 2073 2078 LogFlowFunc(("LUN#%RU8: Created output \"%s\", rc=%Rrc\n", pDrv->uLUN, pCfg->szName, rc2)); 2074 2079 … … 2090 2095 if (pDrv->Out.pStream) 2091 2096 { 2097 pDrv->pConnector->pfnStreamRelease(pDrv->pConnector, pDrv->Out.pStream); 2098 2092 2099 pDrv->pConnector->pfnStreamDestroy(pDrv->pConnector, pDrv->Out.pStream); 2093 2100 pDrv->Out.pStream = NULL; -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r61332 r61334 154 154 ? pStream 155 155 : pStream->pPair; 156 AssertPtr(pStreamHst);157 156 return pStreamHst; 158 157 } … … 339 338 return VINF_SUCCESS; 340 339 341 AssertPtr(pThis->pHostDrvAudio);342 340 AssertMsg(pHstStream->enmCtx == PDMAUDIOSTREAMCTX_HOST, 343 341 ("Stream '%s' is not a host stream and therefore has no backend\n", pHstStream->szName)); … … 355 353 if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)) 356 354 { 357 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_ENABLE); 355 if (pThis->pHostDrvAudio) 356 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_ENABLE); 358 357 if (RT_SUCCESS(rc)) 359 358 pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_ENABLED; … … 380 379 if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED) 381 380 { 382 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_DISABLE); 381 if (pThis->pHostDrvAudio) 382 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_DISABLE); 383 383 if (RT_SUCCESS(rc)) 384 384 { … … 405 405 if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED)) 406 406 { 407 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_PAUSE); 407 if (pThis->pHostDrvAudio) 408 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_PAUSE); 408 409 if (RT_SUCCESS(rc)) 409 410 pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_PAUSED; … … 416 417 if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED) 417 418 { 418 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_RESUME); 419 if (pThis->pHostDrvAudio) 420 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_RESUME); 419 421 if (RT_SUCCESS(rc)) 420 422 pHstStream->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PAUSED; … … 1917 1919 LogFlowFunc(("%s: cRefs=%RU32\n", pStream->szName, pStream->cRefs)); 1918 1920 1921 /* Try to find out which stream is which -- both streams could be destroyed (NULL) 1922 * already, so do some additional checking here. */ 1919 1923 PPDMAUDIOSTREAM pHstStream = drvAudioGetHostStream(pStream); 1920 PPDMAUDIOSTREAM pGstStream = pHstStream ->pPair;1924 PPDMAUDIOSTREAM pGstStream = pHstStream ? pHstStream->pPair : pStream; 1921 1925 1922 1926 if ( ( pHstStream … … 1929 1933 } 1930 1934 1931 int rc = drvAudioStreamControlInternal(pThis, pGstStream, PDMAUDIOSTREAMCMD_DISABLE); 1932 if ( RT_SUCCESS(rc) 1933 && pThis->pHostDrvAudio) 1934 { 1935 int rc = VINF_SUCCESS; 1936 1937 if (pGstStream) 1938 { 1939 AssertMsg(pGstStream->enmCtx == PDMAUDIOSTREAMCTX_GUEST, 1940 ("Stream '%s' is not a guest stream\n", pGstStream->szName)); 1941 1942 rc = drvAudioStreamControlInternal(pThis, pGstStream, PDMAUDIOSTREAMCMD_DISABLE); 1943 } 1944 1945 if (RT_SUCCESS(rc)) 1935 1946 rc = drvAudioStreamControlInternalBackend(pThis, pHstStream, PDMAUDIOSTREAMCMD_DISABLE); 1936 }1937 1947 1938 1948 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.