VirtualBox

Changeset 70902 in vbox for trunk/src/VBox/Devices


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

Audio/DrvAudio.cpp: Make sure to disable the backend first before destroying it and check for this in strict builds.

File:
1 edited

Legend:

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

    r70881 r70902  
    517517                if (RT_SUCCESS(rc))
    518518                {
    519                     pHstStream->fStatus &= ~(PDMAUDIOSTREAMSTS_FLAG_ENABLED | PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE);
     519                    pHstStream->fStatus = PDMAUDIOSTREAMSTS_FLAG_INITIALIZED; /* Reset to initialized state. */
    520520                    AudioMixBufReset(&pHstStream->MixBuf);
    521521                }
     
    31373137        {
    31383138            pHstStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_INITIALIZED;
    3139 #if 0 /** @todo r=andy Disabled for now -- need to test this on Windows hosts. */
    3140             Assert(pHstStream->fStatus == PDMAUDIOSTRMSTS_FLAG_NONE);
     3139
     3140#ifdef VBOX_STRICT
     3141            pszHstSts = dbgAudioStreamStatusToStr(pHstStream->fStatus);
     3142            AssertMsg(pHstStream->fStatus == PDMAUDIOSTREAMSTS_FLAG_NONE,
     3143                      ("Stream '%s' still has %s set when destroying, must close properly first\n",
     3144                       pHstStream->szName, pszHstSts));
     3145            RTStrFree(pszHstSts);
    31413146#endif
    31423147        }
     
    32803285    PPDMAUDIOSTREAM pStream;
    32813286    RTListForEach(&pThis->lstHstStreams, pStream, PDMAUDIOSTREAM, Node)
     3287    {
     3288        drvAudioStreamControlInternalBackend(pThis, pStream, PDMAUDIOSTREAMCMD_DISABLE);
    32823289        drvAudioStreamDestroyInternalBackend(pThis, pStream);
     3290    }
    32833291
    32843292    /*
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