VirtualBox

Changeset 91194 in vbox


Ignore:
Timestamp:
Sep 10, 2021 10:11:03 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Also send the test index and test creation time (caller UTC) when starting tests. ​bugref:10008

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioTest.h

    r91178 r91194  
    7272
    7373/**
     74 * Structure for a common test parameters header.
     75 */
     76typedef struct AUDIOTESTPARMSHDR
     77{
     78    /** Index in some defined sequence this test has. Can be freely used / assigned
     79     *  and depends on the actual implementation.
     80     *  Set to UINT32_MAX if not being used. */
     81    uint32_t idxSeq;
     82    /** Time of the caller when this test was being created. */
     83    RTTIME   tsCreated;
     84} AUDIOTESTPARMSHDR;
     85/** Pointer to an audio test tone. */
     86typedef AUDIOTESTPARMSHDR *PAUDIOTESTPARMSHDR;
     87
     88/**
    7489 * Structure for handling audio test tone parameters.
    7590 */
    7691typedef struct AUDIOTESTTONEPARMS
    7792{
     93    /** Common test header. */
     94    AUDIOTESTPARMSHDR Hdr;
    7895    /** The PCM properties. */
    79     PDMAUDIOPCMPROPS Props;
     96    PDMAUDIOPCMPROPS  Props;
    8097    /** Tone frequency (in Hz) to use.
    8198     *  Will be later converted to a double value. */
    82     double           dbFreqHz;
     99    double            dbFreqHz;
    83100    /** Prequel (in ms) to play silence. Optional and can be set to 0. */
    84     RTMSINTERVAL     msPrequel;
     101    RTMSINTERVAL      msPrequel;
    85102    /** Duration (in ms) to play the test tone. */
    86     RTMSINTERVAL     msDuration;
     103    RTMSINTERVAL      msDuration;
    87104    /** Sequel (in ms) to play silence. Optional and can be set to 0. */
    88     RTMSINTERVAL     msSequel;
     105    RTMSINTERVAL      msSequel;
    89106    /** Volume (in percent, 0-100) to use.
    90107     *  If set to 0, the tone is muted (i.e. silent). */
    91     uint8_t          uVolumePercent;
     108    uint8_t           uVolumePercent;
    92109} AUDIOTESTTONEPARMS;
    93110/** Pointer to audio test tone parameters. */
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r91190 r91194  
    308308        PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone;
    309309
     310        pToneParms->Hdr.idxSeq = i;
     311        RTTIMESPEC NowTimeSpec;
     312        RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec));
     313
    310314        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32/%RU16: Playing test tone (%RU16Hz, %RU32ms)\n",
    311315                     pTstParms->idxCurrent, i, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
     
    418422    {
    419423        PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone;
     424
     425        pToneParms->Hdr.idxSeq = i;
     426        RTTIMESPEC NowTimeSpec;
     427        RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec));
    420428
    421429        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32/%RU16: Recording test tone (%RU16Hz, %RU32ms)\n",
  • trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp

    r91186 r91194  
    601601    PAUDIOTESTENV   pTstEnv = pCtx->pTstEnv;
    602602
    603     RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Got request for playing test tone (%RU16Hz, %RU32ms) ...\n",
    604                  (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
     603    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Got request for playing test tone #%RU32 (%RU16Hz, %RU32ms) ...\n",
     604                 pToneParms->Hdr.idxSeq, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
     605
     606    char szTimeCreated[RTTIME_STR_LEN];
     607    RTTimeToString(&pToneParms->Hdr.tsCreated, szTimeCreated, sizeof(szTimeCreated));
     608    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Created (caller UTC): %s\n", szTimeCreated);
    605609
    606610    const PAUDIOTESTSTREAM pTstStream = &pTstEnv->aStreams[0]; /** @todo Make this dynamic. */
     
    645649    PAUDIOTESTENV   pTstEnv = pCtx->pTstEnv;
    646650
    647     RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Got request for recording test tone (%RU32ms) ...\n", pToneParms->msDuration);
     651    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Got request for recording test tone #%RU32 (%RU32ms) ...\n",
     652                 pToneParms->Hdr.idxSeq, pToneParms->msDuration);
     653
     654    char szTimeCreated[RTTIME_STR_LEN];
     655    RTTimeToString(&pToneParms->Hdr.tsCreated, szTimeCreated, sizeof(szTimeCreated));
     656    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Created (caller UTC): %s\n", szTimeCreated);
    648657
    649658    const PAUDIOTESTSTREAM pTstStream = &pTstEnv->aStreams[0]; /** @todo Make this dynamic. */
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