VirtualBox

Changeset 86561 in vbox for trunk/src


Ignore:
Timestamp:
Oct 14, 2020 7:58:16 AM (4 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Simplified drvAudioStreamControlInternalBackend() by not doing any state machine checking whatsoever -- state machine checking (and setting) is done in drvAudioStreamControlInternal() instead.

File:
1 edited

Legend:

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

    r86494 r86561  
    456456        case PDMAUDIOSTREAMCMD_ENABLE:
    457457        {
    458             if (!(pStream->fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED))
    459                 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_ENABLE);
     458            rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_ENABLE);
    460459            break;
    461460        }
     
    463462        case PDMAUDIOSTREAMCMD_DISABLE:
    464463        {
    465             if (pStream->fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED)
    466                 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_DISABLE);
     464            rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_DISABLE);
    467465            break;
    468466        }
     
    470468        case PDMAUDIOSTREAMCMD_PAUSE:
    471469        {
    472             /* Only pause if the stream is enabled. */
    473             if (!(pStream->fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED))
    474                 break;
    475 
    476             if (!(pStream->fStatus & PDMAUDIOSTREAMSTS_FLAGS_PAUSED))
    477                 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_PAUSE);
     470            rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_PAUSE);
    478471            break;
    479472        }
     
    481474        case PDMAUDIOSTREAMCMD_RESUME:
    482475        {
    483             /* Only need to resume if the stream is enabled. */
    484             if (!(pStream->fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED))
    485                 break;
    486 
    487             if (pStream->fStatus & PDMAUDIOSTREAMSTS_FLAGS_PAUSED)
    488                 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_RESUME);
     476            rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_RESUME);
    489477            break;
    490478        }
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