Changeset 91194 in vbox
- Timestamp:
- Sep 10, 2021 10:11:03 AM (3 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
-
Devices/Audio/AudioTest.h (modified) (1 diff)
-
ValidationKit/utils/audio/vkat.cpp (modified) (2 diffs)
-
ValidationKit/utils/audio/vkatCommon.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioTest.h
r91178 r91194 72 72 73 73 /** 74 * Structure for a common test parameters header. 75 */ 76 typedef 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. */ 86 typedef AUDIOTESTPARMSHDR *PAUDIOTESTPARMSHDR; 87 88 /** 74 89 * Structure for handling audio test tone parameters. 75 90 */ 76 91 typedef struct AUDIOTESTTONEPARMS 77 92 { 93 /** Common test header. */ 94 AUDIOTESTPARMSHDR Hdr; 78 95 /** The PCM properties. */ 79 PDMAUDIOPCMPROPS Props;96 PDMAUDIOPCMPROPS Props; 80 97 /** Tone frequency (in Hz) to use. 81 98 * Will be later converted to a double value. */ 82 double dbFreqHz;99 double dbFreqHz; 83 100 /** Prequel (in ms) to play silence. Optional and can be set to 0. */ 84 RTMSINTERVAL msPrequel;101 RTMSINTERVAL msPrequel; 85 102 /** Duration (in ms) to play the test tone. */ 86 RTMSINTERVAL msDuration;103 RTMSINTERVAL msDuration; 87 104 /** Sequel (in ms) to play silence. Optional and can be set to 0. */ 88 RTMSINTERVAL msSequel;105 RTMSINTERVAL msSequel; 89 106 /** Volume (in percent, 0-100) to use. 90 107 * If set to 0, the tone is muted (i.e. silent). */ 91 uint8_t uVolumePercent;108 uint8_t uVolumePercent; 92 109 } AUDIOTESTTONEPARMS; 93 110 /** Pointer to audio test tone parameters. */ -
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r91190 r91194 308 308 PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone; 309 309 310 pToneParms->Hdr.idxSeq = i; 311 RTTIMESPEC NowTimeSpec; 312 RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec)); 313 310 314 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32/%RU16: Playing test tone (%RU16Hz, %RU32ms)\n", 311 315 pTstParms->idxCurrent, i, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration); … … 418 422 { 419 423 PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone; 424 425 pToneParms->Hdr.idxSeq = i; 426 RTTIMESPEC NowTimeSpec; 427 RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec)); 420 428 421 429 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32/%RU16: Recording test tone (%RU16Hz, %RU32ms)\n", -
trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
r91186 r91194 601 601 PAUDIOTESTENV pTstEnv = pCtx->pTstEnv; 602 602 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); 605 609 606 610 const PAUDIOTESTSTREAM pTstStream = &pTstEnv->aStreams[0]; /** @todo Make this dynamic. */ … … 645 649 PAUDIOTESTENV pTstEnv = pCtx->pTstEnv; 646 650 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); 648 657 649 658 const PAUDIOTESTSTREAM pTstStream = &pTstEnv->aStreams[0]; /** @todo Make this dynamic. */
Note:
See TracChangeset
for help on using the changeset viewer.

