Changeset 91761 in vbox
- Timestamp:
- Oct 15, 2021 11:26:17 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147533
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioTest.cpp
r91684 r91761 2327 2327 * @param pCmp File comparison parameters to file to verify beacon for. 2328 2328 * @param pToneParms Tone parameters to use for verification. 2329 * @param puOff Where to return the file offset (in bytes) right after the found beacon. 2329 2330 */ 2330 2331 static int audioTestToneVerifyBeacon(PAUDIOTESTVERIFYJOB pVerJob, 2331 bool fPre, PAUDIOTESTFILECMPPARMS pCmp, PAUDIOTESTTONEPARMS pToneParms )2332 bool fPre, PAUDIOTESTFILECMPPARMS pCmp, PAUDIOTESTTONEPARMS pToneParms, uint64_t *puOff) 2332 2333 { 2333 2334 int rc = RTFileSeek(pCmp->hFile, pCmp->offStart, RTFILE_SEEK_BEGIN, NULL); … … 2335 2336 2336 2337 uint8_t auBuf[64]; 2337 uint64_t cbToCompare = pCmp->cbSize; 2338 uint32_t const cbFrameSize = PDMAudioPropsFrameSize(&pToneParms->Props); /* Use the audio frame size as chunk size. */ 2339 bool fInBeacon = false; 2340 uint32_t cbBeacon = 0; 2338 uint64_t cbToCompare = pCmp->cbSize; 2339 uint32_t const cbFrameSize = PDMAudioPropsFrameSize(&pToneParms->Props); /* Use the audio frame size as chunk size. */ 2340 bool fInBeacon = false; 2341 uint32_t cbBeacon = 0; 2342 size_t offLastBeacon = 0; /* Offset (in bytes) of last beacon read. */ 2341 2343 2342 2344 uint8_t const byBeacon = fPre ? AUDIOTEST_BEACON_BYTE_PRE : AUDIOTEST_BEACON_BYTE_POST; … … 2372 2374 if (fInBeacon) 2373 2375 { 2374 fInBeacon = false; 2376 fInBeacon = false; 2377 offLastBeacon = RTFileTell(pCmp->hFile); 2375 2378 continue; 2376 2379 } … … 2395 2398 pCmp->pszName, fPre ? "Pre" : "Post"); 2396 2399 AssertRC(rc2); 2400 2401 if (puOff) 2402 *puOff = offLastBeacon; 2397 2403 } 2398 2404 … … 2551 2557 #endif 2552 2558 2553 rc = audioTestToneVerifyBeacon(pVerJob, true /* fPre */, &FileA, &ToneParmsA );2559 rc = audioTestToneVerifyBeacon(pVerJob, true /* fPre */, &FileA, &ToneParmsA, &FileA.offStart /* Save new offset after pre beacon */); 2554 2560 AssertRC(rc); 2555 rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileA, &ToneParmsA );2561 rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileA, &ToneParmsA, NULL); 2556 2562 AssertRC(rc); 2557 rc = audioTestToneVerifyBeacon(pVerJob, true /* fPre */, &FileB, &ToneParmsB );2563 rc = audioTestToneVerifyBeacon(pVerJob, true /* fPre */, &FileB, &ToneParmsB, &FileB.offStart /* Save new offset after pre beacon */); 2558 2564 AssertRC(rc); 2559 rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileB, &ToneParmsB );2565 rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileB, &ToneParmsB, NULL); 2560 2566 AssertRC(rc); 2561 2567
Note:
See TracChangeset
for help on using the changeset viewer.