VirtualBox

Ignore:
Timestamp:
Feb 8, 2018 10:07:07 AM (7 years ago)
Author:
vboxsync
Message:

Audio/DevSB16.cpp: Use sb16DestroyDrvStream() in sb16PowerOff() to avoid code duplication and disable the stream before destroying it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r70737 r70903  
    23562356        pDrv->pConnector->pfnStreamRelease(pDrv->pConnector, pDrv->Out.pStream);
    23572357
    2358         int rc2 = pDrv->pConnector->pfnStreamDestroy(pDrv->pConnector, pDrv->Out.pStream);
    2359         if (RT_SUCCESS(rc2))
    2360             pDrv->Out.pStream = NULL;
     2358        int rc2 = pDrv->pConnector->pfnStreamControl(pDrv->pConnector, pDrv->Out.pStream, PDMAUDIOSTREAMCMD_DISABLE);
     2359        AssertRC(rc2);
     2360
     2361        rc2 = pDrv->pConnector->pfnStreamDestroy(pDrv->pConnector, pDrv->Out.pStream);
     2362        AssertRC(rc2);
     2363
     2364        pDrv->Out.pStream = NULL;
    23612365    }
    23622366}
     
    24622466    PSB16DRIVER pDrv;
    24632467    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
    2464     {
    2465         if (pDrv->Out.pStream)
    2466         {
    2467             pDrv->pConnector->pfnStreamRelease(pDrv->pConnector, pDrv->Out.pStream);
    2468 
    2469             int rc2 = pDrv->pConnector->pfnStreamDestroy(pDrv->pConnector, pDrv->Out.pStream);
    2470             if (RT_SUCCESS(rc2))
    2471                 pDrv->Out.pStream = NULL;
    2472         }
    2473     }
     2468        sb16DestroyDrvStream(pThis, pDrv);
    24742469}
    24752470
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette