VirtualBox

Changeset 70832 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Jan 31, 2018 1:43:12 PM (7 years ago)
Author:
vboxsync
Message:

Audio/HDA: Only create debug audio files if not already open yet and don't close when just disabling a stream temporarily (closing will be done on stream destruction).

File:
1 edited

Legend:

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

    r70629 r70832  
    522522        if (fEnable)
    523523        {
    524             int rc2 = DrvAudioHlpFileOpen(pStream->Dbg.Runtime.pFileStream, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
    525                                           &pStream->State.Cfg.Props);
    526             AssertRC(rc2);
    527 
    528             rc2 = DrvAudioHlpFileOpen(pStream->Dbg.Runtime.pFileDMA, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
    529                                       &pStream->State.Cfg.Props);
    530             AssertRC(rc2);
    531         }
    532         else
    533         {
    534             int rc2 = DrvAudioHlpFileClose(pStream->Dbg.Runtime.pFileStream);
    535             AssertRC(rc2);
    536 
    537             rc2 = DrvAudioHlpFileClose(pStream->Dbg.Runtime.pFileDMA);
    538             AssertRC(rc2);
     524            if (!DrvAudioHlpFileIsOpen(pStream->Dbg.Runtime.pFileStream))
     525            {
     526                int rc2 = DrvAudioHlpFileOpen(pStream->Dbg.Runtime.pFileStream, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
     527                                              &pStream->State.Cfg.Props);
     528                AssertRC(rc2);
     529            }
     530
     531            if (!DrvAudioHlpFileIsOpen(pStream->Dbg.Runtime.pFileDMA))
     532            {
     533                int rc2 = DrvAudioHlpFileOpen(pStream->Dbg.Runtime.pFileDMA, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
     534                                              &pStream->State.Cfg.Props);
     535                AssertRC(rc2);
     536            }
    539537        }
    540538    }
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