VirtualBox

Changeset 89525 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jun 6, 2021 10:38:43 PM (4 years ago)
Author:
vboxsync
Message:

ValKit/AudioTest: Adjusted play pacing code to skip the pre-buffered amount, otherwise we'll be in constant underruns. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r89521 r89525  
    18141814                                        PCPDMAUDIOSTREAMCFG pCfgAcq, const char *pszFile)
    18151815{
    1816     uint32_t const  cbPreBuffer = PDMAudioPropsFramesToBytes(pMix->pProps, pCfgAcq->Backend.cFramesPreBuffering);
    1817     uint64_t const  nsStarted   = RTTimeNanoTS();
     1816    uint32_t const  cbPreBuffer        = PDMAudioPropsFramesToBytes(pMix->pProps, pCfgAcq->Backend.cFramesPreBuffering);
     1817    uint64_t const  nsStarted          = RTTimeNanoTS();
     1818    uint64_t        nsDonePreBuffering = 0;
    18181819
    18191820    /*
     
    18331834            if (offStream >= cbPreBuffer)
    18341835            {
    1835                 uint64_t const cNsWritten = PDMAudioPropsBytesToNano64(pMix->pProps, offStream);
     1836                if (!nsDonePreBuffering)
     1837                    nsDonePreBuffering = RTTimeNanoTS();
     1838                uint64_t const cNsWritten = PDMAudioPropsBytesToNano64(pMix->pProps, offStream - cbPreBuffer);
    18361839                uint64_t const cNsElapsed = RTTimeNanoTS() - nsStarted;
    18371840                if (cNsWritten > cNsElapsed + RT_NS_10MS)
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