Changeset 90830 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Aug 24, 2021 10:47:52 AM (3 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r90788 r90830 257 257 pTstParmsAcq->enmDir = PDMAUDIODIR_OUT; 258 258 #ifdef DEBUG 259 pTstParmsAcq->cIterations = 4;259 pTstParmsAcq->cIterations = 1; 260 260 #else 261 261 pTstParmsAcq->cIterations = RTRandU32Ex(1, 10); … … 361 361 pTstParmsAcq->enmDir = PDMAUDIODIR_IN; 362 362 #ifdef DEBUG 363 pTstParmsAcq->cIterations = 4;363 pTstParmsAcq->cIterations = 1; 364 364 #else 365 365 pTstParmsAcq->cIterations = RTRandU32Ex(1, 10); -
trunk/src/VBox/ValidationKit/utils/audio/vkatCmdSelfTest.cpp
r90769 r90830 162 162 /* else Step 1a later. */ 163 163 164 RTThreadSleep( 5000); /* Fudge: Wait until guest ATS is up. */164 RTThreadSleep(2000); /* Fudge: Wait until guest ATS is up. 2 seconds should be enough (tm). */ 165 165 166 166 if (RT_SUCCESS(rc)) … … 192 192 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Shutting down self test\n"); 193 193 194 ASMAtomicWriteBool(&g_fTerminate, true); 195 194 /* If we started the guest ATS ourselves, wait for it to terminate properly. */ 196 195 if (fStartGuestAts) 197 196 { -
trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
r90767 r90830 61 61 /** File handle to the (opened) test set archive for reading. */ 62 62 RTFILE hTestSetArchive; 63 /** Number of currently connected clients. */ 64 uint8_t cClients; 63 65 } ATSCALLBACKCTX; 64 66 typedef ATSCALLBACKCTX *PATSCALLBACKCTX; … … 463 465 *********************************************************************************************************************************/ 464 466 467 /** @copydoc ATSCALLBACKS::pfnHowdy 468 * 469 * @note Runs as part of the guest ATS. 470 */ 471 static DECLCALLBACK(int) audioTestGstAtsHowdyCallback(void const *pvUser) 472 { 473 PATSCALLBACKCTX pCtx = (PATSCALLBACKCTX)pvUser; 474 475 AssertReturn(pCtx->cClients <= UINT8_MAX, VERR_BUFFER_OVERFLOW); 476 477 pCtx->cClients++; 478 479 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "New client connected, now %RU8 total\n", pCtx->cClients); 480 481 return VINF_SUCCESS; 482 } 483 484 /** @copydoc ATSCALLBACKS::pfnBye 485 * 486 * @note Runs as part of the guest ATS. 487 */ 488 static DECLCALLBACK(int) audioTestGstAtsByeCallback(void const *pvUser) 489 { 490 PATSCALLBACKCTX pCtx = (PATSCALLBACKCTX)pvUser; 491 492 AssertReturn(pCtx->cClients, VERR_WRONG_ORDER); 493 pCtx->cClients--; 494 495 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Clients wants to disconnect, %RU8 remaining\n", pCtx->cClients); 496 497 if (0 == pCtx->cClients) /* All clients disconnected? Tear things down. */ 498 { 499 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Last client disconnected, terminating server ...\n"); 500 ASMAtomicWriteBool(&g_fTerminate, true); 501 } 502 503 return VINF_SUCCESS; 504 } 505 465 506 /** @copydoc ATSCALLBACKS::pfnTestSetBegin 466 507 * … … 870 911 ATSCALLBACKS Callbacks; 871 912 RT_ZERO(Callbacks); 913 Callbacks.pfnHowdy = audioTestGstAtsHowdyCallback; 914 Callbacks.pfnBye = audioTestGstAtsByeCallback; 872 915 Callbacks.pfnTestSetBegin = audioTestGstAtsTestSetBeginCallback; 873 916 Callbacks.pfnTestSetEnd = audioTestGstAtsTestSetEndCallback; … … 965 1008 return; 966 1009 1010 /* When in host mode, we need to destroy our ATS clients in order to also let 1011 * the ATS server(s) know we're going to quit. */ 1012 if (pTstEnv->enmMode == AUDIOTESTMODE_HOST) 1013 { 1014 AudioTestSvcClientDestroy(&pTstEnv->u.Host.AtsClValKit); 1015 AudioTestSvcClientDestroy(&pTstEnv->u.Host.AtsClGuest); 1016 } 1017 967 1018 for (unsigned i = 0; i < RT_ELEMENTS(pTstEnv->aStreams); i++) 968 1019 {
Note:
See TracChangeset
for help on using the changeset viewer.