Changeset 91533 in vbox for trunk/src/VBox
- Timestamp:
- Oct 4, 2021 6:36:46 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioTest.cpp
r91531 r91533 2239 2239 AssertRC(rc); 2240 2240 2241 uint32_t cDiffs = 0; 2242 uint64_t cbDiffs = 0; 2243 2241 2244 RT_NOREF(pToneParms); 2242 2245 uint32_t const cbChunkSize = PDMAudioPropsFrameSize(&pToneParms->Props); /* Use the audio frame size as chunk size. */ … … 2244 2247 uint64_t offCur = 0; 2245 2248 uint64_t offLastDiff = UINT64_MAX; 2246 uint 32_t cDiffs = 0;2247 uint64_t cbToCompare = RT_MIN(pCmpA->cbSize, pCmpB->cbSize);2249 uint64_t cbSize = RT_MIN(pCmpA->cbSize, pCmpB->cbSize); 2250 uint64_t cbToCompare = cbSize; 2248 2251 2249 2252 while (cbToCompare) … … 2269 2272 if (cDiffs) 2270 2273 { 2274 uint32_t const cbDiff = offCur - offLastDiff; 2271 2275 int rc2 = audioTestErrorDescAddInfo(pVerJob->pErr, pVerJob->idxTest, "Chunks differ: A @ %#x vs. B @ %#x [%08RU64-%08RU64] (%RU64 bytes, %RU64ms)", 2272 2276 pCmpA->offStart, pCmpB->offStart, offLastDiff, offCur, 2273 offCur - offLastDiff, PDMAudioPropsBytesToMilli(&pToneParms->Props, offCur - offLastDiff));2277 cbDiff, PDMAudioPropsBytesToMilli(&pToneParms->Props, cbDiff)); 2274 2278 AssertRC(rc2); 2279 2280 cbDiffs += cbDiff; 2275 2281 } 2276 2282 offLastDiff = UINT64_MAX; … … 2286 2292 && cDiffs) 2287 2293 { 2294 uint32_t const cbDiff = offCur - offLastDiff; 2288 2295 int rc2 = audioTestErrorDescAddInfo(pVerJob->pErr, pVerJob->idxTest, "Chunks differ: A @ %#x vs. B @ %#x [%08RU64-%08RU64] (%RU64 bytes, %RU64ms)", 2289 2296 pCmpA->offStart, pCmpB->offStart, offLastDiff, offCur, 2290 offCur - offLastDiff, PDMAudioPropsBytesToMilli(&pToneParms->Props, offCur - offLastDiff));2297 cbDiff, PDMAudioPropsBytesToMilli(&pToneParms->Props, cbDiff)); 2291 2298 AssertRC(rc2); 2299 2300 cbDiffs += cbDiff; 2301 } 2302 2303 if (cbDiffs) 2304 { 2305 uint8_t const uDiffPercent = (cbSize * 100) / cbDiffs; 2306 if (uDiffPercent > pVerJob->Opts.uMaxDiffPercent) 2307 { 2308 int rc2 = audioTestErrorDescAddInfo(pVerJob->pErr, pVerJob->idxTest, "Files binary-differ too much (expected maximum %RU8%%, got %RU8%%)", 2309 pVerJob->Opts.uMaxDiffPercent, uDiffPercent); 2310 AssertRC(rc2); 2311 } 2292 2312 } 2293 2313
Note:
See TracChangeset
for help on using the changeset viewer.