VirtualBox

Changeset 91761 in vbox


Ignore:
Timestamp:
Oct 15, 2021 11:26:17 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147533
Message:

Audio/Validation Kit: Return and use last beacon offset when comparing test set audio data. ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioTest.cpp

    r91684 r91761  
    23272327 * @param   pCmp                File comparison parameters to file to verify beacon for.
    23282328 * @param   pToneParms          Tone parameters to use for verification.
     2329 * @param   puOff               Where to return the file offset (in bytes) right after the found beacon.
    23292330 */
    23302331static int audioTestToneVerifyBeacon(PAUDIOTESTVERIFYJOB pVerJob,
    2331                                      bool fPre, PAUDIOTESTFILECMPPARMS pCmp, PAUDIOTESTTONEPARMS pToneParms)
     2332                                     bool fPre, PAUDIOTESTFILECMPPARMS pCmp, PAUDIOTESTTONEPARMS pToneParms, uint64_t *puOff)
    23322333{
    23332334    int rc = RTFileSeek(pCmp->hFile, pCmp->offStart, RTFILE_SEEK_BEGIN, NULL);
     
    23352336
    23362337    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. */
    23412343
    23422344    uint8_t const  byBeacon    = fPre ? AUDIOTEST_BEACON_BYTE_PRE : AUDIOTEST_BEACON_BYTE_POST;
     
    23722374                if (fInBeacon)
    23732375                {
    2374                     fInBeacon = false;
     2376                    fInBeacon     = false;
     2377                    offLastBeacon = RTFileTell(pCmp->hFile);
    23752378                    continue;
    23762379                }
     
    23952398                                            pCmp->pszName, fPre ? "Pre" : "Post");
    23962399        AssertRC(rc2);
     2400
     2401        if (puOff)
     2402            *puOff = offLastBeacon;
    23972403    }
    23982404
     
    25512557#endif
    25522558
    2553     rc = audioTestToneVerifyBeacon(pVerJob, true  /* fPre */,  &FileA, &ToneParmsA);
     2559    rc = audioTestToneVerifyBeacon(pVerJob, true  /* fPre */,  &FileA, &ToneParmsA, &FileA.offStart /* Save new offset after pre beacon */);
    25542560    AssertRC(rc);
    2555     rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileA, &ToneParmsA);
     2561    rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileA, &ToneParmsA, NULL);
    25562562    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 */);
    25582564    AssertRC(rc);
    2559     rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileB, &ToneParmsB);
     2565    rc = audioTestToneVerifyBeacon(pVerJob, false /* fPost */, &FileB, &ToneParmsB, NULL);
    25602566    AssertRC(rc);
    25612567
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette