Changeset 91655 in vbox
- Timestamp:
- Oct 10, 2021 8:34:33 AM (3 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
-
Devices/Audio/AudioTest.h (modified) (1 diff)
-
Devices/Audio/DrvHostAudioValidationKit.cpp (modified) (5 diffs)
-
ValidationKit/utils/audio/vkatCommon.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioTest.h
r91632 r91655 32 32 /** Prefix for audio test (set) directories. */ 33 33 #define AUDIOTEST_PATH_PREFIX_STR "vkat" 34 /** Audio beacon data (single byte) to use for the post beacon (intro). */ 35 #define AUDIOTEST_BEACON_BYTE_PRE 0x42 36 /** Audio beacon data (single byte) to use for the post beacon (outro). */ 37 #define AUDIOTEST_BEACON_BYTE_POST 0x24 38 /** Pre / post audio beacon size (in audio frames). */ 39 #define AUDIOTEST_BEACON_SIZE_FRAMES 1024 34 40 35 41 /** -
trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
r91648 r91655 312 312 Assert(pThis->cTestsRec == 0); 313 313 Assert(pThis->cTestsPlay == 0); 314 315 if (pThis->cbPlayedNoTest) 316 { 317 LogRel2(("ValKit: Warning: Guest was playing back audio when no playback test is active (%RU64 bytes total)\n", 318 pThis->cbPlayedNoTest)); 319 pThis->cbPlayedNoTest = 0; 320 } 314 321 } 315 322 … … 517 524 AssertReturn(PDMAudioPropsAreValid(&pTestData->t.TestTone.Parms.Props), VERR_INVALID_PARAMETER); 518 525 519 pTestData->t.TestTone.u.Play.cbToRead = PDMAudioPropsMilliToBytes(&pTestData->t.TestTone.Parms.Props, 520 pTestData->t.TestTone.Parms.msDuration); 526 pTestData->t.TestTone.u.Play.cbToRead = PDMAudioPropsMilliToBytes(&pTestData->t.TestTone.Parms.Props, 527 pTestData->t.TestTone.Parms.msDuration); 528 uint32_t const cbBeacons = PDMAudioPropsFramesToBytes(&pTestData->t.TestTone.Parms.Props, 529 AUDIOTEST_BEACON_SIZE_FRAMES * 2 /* Pre + post beacon */); 530 pTestData->t.TestTone.u.Play.cbToRead += cbBeacons; 531 521 532 int rc = RTCritSectEnter(&pThis->CritSect); 522 533 if (RT_SUCCESS(rc)) … … 921 932 if (pTst == NULL) /* Empty list? */ 922 933 { 923 LogRel2(("ValKit: Warning: Guest is playing back audio when no playback test is active\n"));924 925 934 pThis->cbPlayedNoTest += cbBuf; 926 935 … … 931 940 if (pThis->cbPlayedNoTest) 932 941 { 933 LogRel(("ValKit: Warning: Guest was playing back audio (%RU 32bytes, %RU64ms) when no playback test is active\n",942 LogRel(("ValKit: Warning: Guest was playing back audio (%RU64 bytes, %RU64ms) when no playback test is active\n", 934 943 pThis->cbPlayedNoTest, PDMAudioPropsBytesToMilli(&pStream->pStream->Cfg.Props, pThis->cbPlayedNoTest))); 935 944 pThis->cbPlayedNoTest = 0; … … 943 952 { 944 953 if (pThis->cbPlayedSilence) 945 LogRel(("ValKit: Guest was playing back %RU 32bytes (%RU64ms) of silence\n",954 LogRel(("ValKit: Guest was playing back %RU64 bytes (%RU64ms) of silence\n", 946 955 pThis->cbPlayedSilence, PDMAudioPropsBytesToMilli(&pStream->pStream->Cfg.Props, pThis->cbPlayedSilence))); 947 956 pThis->cbPlayedSilence = 0; -
trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
r91644 r91655 524 524 uint32_t cbPlayedTotal = 0; 525 525 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); 528 529 uint32_t cbBeaconToPlay = cbBeacon; 529 530 uint32_t cbBeaconPlayed = 0; … … 588 589 /* Limit to exactly one beacon (pre or post). */ 589 590 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); 591 594 592 595 rc = AudioTestMixStreamPlay(&pStream->Mix, abBuf, cbToPlay, &cbPlayed);
Note:
See TracChangeset
for help on using the changeset viewer.

