VirtualBox

Ignore:
Timestamp:
Aug 4, 2021 8:26:13 AM (3 years ago)
Author:
vboxsync
Message:

Audio/ValKit: No need to wait for draining audio data if there only is one iteration. ​bugref:10008

File:
1 edited

Legend:

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

    r90507 r90509  
    313313        if (RT_SUCCESS(rc))
    314314        {
    315             if (pTstParms->cIterations)
    316                 RTThreadSleep(RTRandU32Ex(2000, 5000));
     315            /* Give the audio stack a random amount of time for draining data before the next iteration. */
     316            if (pTstParms->cIterations > 1)
     317                RTThreadSleep(RTRandU32Ex(2000, 5000)); /** @todo Implement some dedicated ATS command for this? */
    317318        }
    318319
     
    411412                         pTstParms->idxCurrent, i, rc);
    412413
    413         /* Wait a bit to let the left over audio bits being processed. */
    414         if (pTstParms->cIterations)
    415             RTThreadSleep(RTRandU32Ex(2000, 5000));
     414        if (RT_SUCCESS(rc))
     415        {
     416            /* Wait a bit to let the left over audio bits being processed. */
     417            if (pTstParms->cIterations > 1)
     418                RTThreadSleep(RTRandU32Ex(2000, 5000)); /** @todo Implement some dedicated ATS command for this? */
     419        }
    416420
    417421        if (RT_FAILURE(rc))
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