VirtualBox

Ignore:
Timestamp:
May 18, 2021 10:38:17 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144476
Message:

Audio/ValKit: More code for testing infrastructure. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r89127 r89135  
    12151215
    12161216/*********************************************************************************************************************************
    1217 *   Implementation of Something                                                                                                  *
     1217*   Implementation of audio test environment handling                                                                            *
    12181218*********************************************************************************************************************************/
    12191219
     
    13111311
    13121312/*********************************************************************************************************************************
    1313 *   Some other stuff, you name it.                                                                                               *
     1313*   Device enumeration + handling.                                                                                               *
    13141314*********************************************************************************************************************************/
    13151315
     
    16131613    for (uint32_t i = 0; i < pTstParms->cIterations; i++)
    16141614    {
    1615         AudioTestToneParamsInitRandom(&pTstParms->TestTone, &pTstParms->TestTone.Props);
    1616         rc = audioTestCreateStreamDefaultOut(pTstEnv, pStream, &pTstParms->TestTone.Props);
     1615        PAUDIOTESTENTRY pTst;
     1616        rc = AudioTestSetTestBegin(&pTstEnv->Set, "Playing test tone", pTstParms, &pTst);
    16171617        if (RT_SUCCESS(rc))
    1618             rc = audioTestPlayTone(pTstEnv, pStream, &pTstParms->TestTone);
    1619 
    1620         int rc2 = audioTestStreamDestroy(pTstEnv, pStream);
    1621         if (RT_SUCCESS(rc))
    1622             rc = rc2;
     1618        {
     1619            AudioTestToneParamsInitRandom(&pTstParms->TestTone, &pTstParms->TestTone.Props);
     1620            rc = audioTestCreateStreamDefaultOut(pTstEnv, pStream, &pTstParms->TestTone.Props);
     1621            if (RT_SUCCESS(rc))
     1622            {
     1623                rc = audioTestPlayTone(pTstEnv, pStream, &pTstParms->TestTone);
     1624            }
     1625
     1626            int rc2 = audioTestStreamDestroy(pTstEnv, pStream);
     1627            if (RT_SUCCESS(rc))
     1628                rc = rc2;
     1629
     1630            if (RT_SUCCESS(rc))
     1631            {
     1632               AudioTestSetTestDone(pTst);
     1633            }
     1634            else
     1635                AudioTestSetTestFailed(pTst, rc, "Playing test tone failed");
     1636        }
     1637
     1638        if (RT_FAILURE(rc))
     1639            RTTestFailed(g_hTest, "Playing tone failed\n");
    16231640    }
    16241641
     
    18891906            RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test set packed up to '%s'\n", szFileOut);
    18901907
     1908#ifndef DEBUG_andy
    18911909        /* Clean up. */
    18921910        int rc2 = AudioTestSetWipe(&TstEnv.Set);
    18931911        AssertRC(rc2); /* Annoying, but not test-critical. */
    1894 
     1912#endif
    18951913        audioTestEnvDestroy(&TstEnv);
    18961914    }
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