VirtualBox

Changeset 88762 in vbox


Ignore:
Timestamp:
Apr 29, 2021 1:20:46 AM (4 years ago)
Author:
vboxsync
Message:

Audio: Do not pause disabled streams as that may cause some simplistic backends (like ALSA) to enable the stream upon resume. bugref:9890

File:
1 edited

Legend:

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

    r88761 r88762  
    19781978    {
    19791979        case PDMAUDIOSTREAMCMD_ENABLE:
    1980         {
    19811980            if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_ENABLED))
    19821981            {
     
    20122011            }
    20132012            break;
    2014         }
    20152013
    20162014        case PDMAUDIOSTREAMCMD_DISABLE:
    2017         {
    20182015            if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_ENABLED)
    20192016            {
     
    20512048            }
    20522049            break;
    2053         }
    20542050
    20552051        case PDMAUDIOSTREAMCMD_PAUSE:
    2056         {
    2057             if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PAUSED))
     2052            if (   (pStreamEx->Core.fStatus & (PDMAUDIOSTREAM_STS_ENABLED | PDMAUDIOSTREAM_STS_PAUSED))
     2053                ==                             PDMAUDIOSTREAM_STS_ENABLED)
    20582054            {
    20592055                rc = drvAudioStreamControlInternalBackend(pThis, pStreamEx, PDMAUDIOSTREAMCMD_PAUSE);
     
    20652061            }
    20662062            break;
    2067         }
    20682063
    20692064        case PDMAUDIOSTREAMCMD_RESUME:
    2070         {
    20712065            if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PAUSED)
    20722066            {
     2067                Assert(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_ENABLED);
    20732068                rc = drvAudioStreamControlInternalBackend(pThis, pStreamEx, PDMAUDIOSTREAMCMD_RESUME);
    20742069                if (RT_SUCCESS(rc))
     
    20792074            }
    20802075            break;
    2081         }
    20822076
    20832077        default:
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