VirtualBox

Changeset 73684 in vbox


Ignore:
Timestamp:
Aug 15, 2018 9:12:56 AM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Added simple debug sanity checks for buggy acquired backend configurations in drvAudioStreamCreateInternalBackend().

File:
1 edited

Legend:

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

    r73682 r73684  
    30533053                 pStream->szName, DrvAudioHlpFramesToMilli(pCfgAcq->Backend.cfPreBuf, &pCfgAcq->Props), pCfgAcq->Backend.cfPreBuf));
    30543054    }
     3055
     3056    /* Sanity for detecting buggy backends. */
     3057    AssertMsgReturn(pCfgAcq->Backend.cfPeriod < pCfgAcq->Backend.cfBufferSize,
     3058                    ("Acquired period size must be smaller than buffer size\n"),
     3059                    VERR_INVALID_PARAMETER);
     3060    AssertMsgReturn(pCfgAcq->Backend.cfPreBuf < pCfgAcq->Backend.cfBufferSize,
     3061                    ("Acquired pre-buffering size must be smaller than buffer size -- this otherwise will lead to buffer overruns\n"),
     3062                    VERR_INVALID_PARAMETER);
    30553063
    30563064    pStream->fStatus |= PDMAUDIOSTREAMSTS_FLAG_INITIALIZED;
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