Changeset 91141 in vbox for trunk/src/VBox/ValidationKit/utils
- Timestamp:
- Sep 7, 2021 2:37:42 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
r91139 r91141 287 287 288 288 uint64_t offStream = 0; 289 uint64_t uTimeoutNs = (pParms->msDuration * 4) * RT_NS_1MS; /* Four times the time playback should roughly take */290 291 while (cb ToPlayTotal)289 uint64_t nsTimeout = RT_MS_5MIN_64 * RT_NS_1MS; 290 291 while (cbPlayedTotal < cbToPlayTotal) 292 292 { 293 293 /* Pace ourselves a little. */ … … 306 306 if (cbCanWrite) 307 307 { 308 uint32_t const cbToGenerate = RT_MIN(RT_MIN(cbToPlayTotal , sizeof(abBuf)), cbCanWrite);308 uint32_t const cbToGenerate = RT_MIN(RT_MIN(cbToPlayTotal - cbPlayedTotal, sizeof(abBuf)), cbCanWrite); 309 309 uint32_t cbToPlay; 310 310 rc = AudioTestToneGenerate(&TstTone, abBuf, cbToGenerate, &cbToPlay); … … 321 321 if (RT_SUCCESS(rc)) 322 322 { 323 AssertBreakStmt(cbPlayed <= cbToPlay, rc = VERR_TOO_MUCH_DATA); 324 323 325 offStream += cbPlayed; 324 326 … … 341 343 342 344 /* Fail-safe in case something screwed up while playing back. */ 343 if (RTTimeNanoTS() - nsStarted > uTimeoutNs) 345 uint64_t const cNsElapsed = RTTimeNanoTS() - nsStarted; 346 if (cNsElapsed > nsTimeout) 344 347 { 345 RTTestFailed(g_hTest, "Playback took too long ( %RU32ms exceeded), aborting\n", uTimeoutNs / RT_NS_1MS);348 RTTestFailed(g_hTest, "Playback took too long (runng %RU64 vs. timeout %RU64), aborting\n", cNsElapsed, nsTimeout); 346 349 rc = VERR_TIMEOUT; 347 350 }
Note:
See TracChangeset
for help on using the changeset viewer.