VirtualBox

Changeset 88940 in vbox


Ignore:
Timestamp:
May 7, 2021 7:27:14 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144275
Message:

Audio/Dev*: Must destroy the mixer in the destructor as the power off callback isn't always used. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
4 edited

Legend:

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

    r88920 r88940  
    793793        return;
    794794
     795    /** @todo wrong critsect for audioMixerRemoveSinkInternal...   */
    795796    int rc2 = RTCritSectEnter(&pSink->CritSect);
    796797    AssertRC(rc2);
  • trunk/src/VBox/Devices/Audio/DevHda.cpp

    r88934 r88940  
    46654665    for (uint8_t i = 0; i < HDA_MAX_STREAMS; i++)
    46664666        hdaR3StreamDestroy(&pThis->aStreams[i], &pThisCC->aStreams[i]);
     4667
     4668    /* We don't always go via PowerOff, so make sure the mixer is destroyed. */
     4669    if (pThisCC->pMixer)
     4670    {
     4671        AudioMixerDestroy(pThisCC->pMixer, pDevIns);
     4672        pThisCC->pMixer = NULL;
     4673    }
    46674674
    46684675    DEVHDA_UNLOCK(pDevIns, pThis);
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r88939 r88940  
    40694069    Assert(RTListIsEmpty(&pThisCC->lstDrv));
    40704070
     4071    /* We don't always go via PowerOff, so make sure the mixer is destroyed. */
     4072    if (pThisCC->pMixer)
     4073    {
     4074        AudioMixerDestroy(pThisCC->pMixer, pDevIns);
     4075        pThisCC->pMixer = NULL;
     4076    }
     4077
    40714078    return VINF_SUCCESS;
    40724079}
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r88936 r88940  
    30133013        RTListNodeRemove(&pDrv->Node);
    30143014        RTMemFree(pDrv);
     3015    }
     3016
     3017    /* We don't always go via PowerOff, so make sure the mixer is destroyed. */
     3018    if (pThis->pMixer)
     3019    {
     3020        AudioMixerDestroy(pThis->pMixer, pDevIns);
     3021        pThis->pMixer = NULL;
    30153022    }
    30163023
Note: See TracChangeset for help on using the changeset viewer.

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