VirtualBox

Ignore:
Timestamp:
Oct 10, 2021 8:34:33 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147382
Message:

Audio/Validation Kit: A bit more code for the audio data beacons. ​bugref:10008

File:
1 edited

Legend:

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

    r91644 r91655  
    524524        uint32_t cbPlayedTotal  = 0;
    525525
    526         /* We play a pre + post beacon before + after the actual test tone with exactly 1024 audio frames. */
    527         uint32_t const cbBeacon       = PDMAudioPropsFramesToBytes(&pStream->Cfg.Props, 1024);
     526        /* We play a pre + post beacon before + after the actual test tone
     527         * with exactly AUDIOTEST_BEACON_SIZE_FRAMES audio frames. */
     528        uint32_t const cbBeacon       = PDMAudioPropsFramesToBytes(&pStream->Cfg.Props, AUDIOTEST_BEACON_SIZE_FRAMES);
    528529        uint32_t       cbBeaconToPlay = cbBeacon;
    529530        uint32_t       cbBeaconPlayed = 0;
     
    588589                    /* Limit to exactly one beacon (pre or post). */
    589590                    cbToPlay = RT_MIN(sizeof(abBuf), RT_MIN(cbCanWrite, cbBeaconToPlay - cbBeaconPlayed));
    590                     memset(abBuf, 0x42 /* Our actual beacon data, hopefully the answer to all ... */, cbToPlay);
     591                    memset(abBuf,
     592                           cbPlayedTotal >= cbToPlayTotal - cbBeaconToPlay ? AUDIOTEST_BEACON_BYTE_POST : AUDIOTEST_BEACON_BYTE_PRE,
     593                           cbToPlay);
    591594
    592595                    rc = AudioTestMixStreamPlay(&pStream->Mix, abBuf, cbToPlay, &cbPlayed);
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