VirtualBox

Changeset 91209 in vbox


Ignore:
Timestamp:
Sep 10, 2021 4:39:07 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: More bugfixes. bugref:10008

File:
1 edited

Legend:

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

    r91208 r91209  
    732732static DECLCALLBACK(int) drvHostValKitAudioHA_StreamDrain(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    733733{
    734     RT_NOREF(pStream);
    735 
    736     PDRVHOSTVALKITAUDIO pThis = RT_FROM_MEMBER(pInterface, DRVHOSTVALKITAUDIO, IHostAudio);
    737 
    738     int rc = RTCritSectEnter(&pThis->CritSect);
    739     if (RT_SUCCESS(rc))
    740     {
    741         PVALKITTESTDATA pTst = pThis->pTestCurPlay;
    742 
    743         if (pTst)
    744         {
    745             LogRel(("ValKit: Test #%RU32: Recording audio data ended (took %RU32ms)\n",
    746                 pTst->idxTest, RTTimeMilliTS() - pTst->msStartedTS));
    747 
    748             if (pTst->t.TestTone.u.Play.cbRead > pTst->t.TestTone.u.Play.cbToRead)
    749                 LogRel(("ValKit: Warning: Test #%RU32 read %RU32 bytes more than announced\n",
    750                         pTst->idxTest, pTst->t.TestTone.u.Play.cbRead - pTst->t.TestTone.u.Play.cbToRead));
    751 
    752             AudioTestSetTestDone(pTst->pEntry);
    753 
    754             pThis->pTestCurPlay = NULL;
    755             pTst                = NULL;
    756 
    757             if (ASMAtomicReadBool(&pThis->fTestSetEnd))
    758                 rc = RTSemEventSignal(pThis->EventSemEnded);
    759         }
    760 
    761         int rc2 = RTCritSectLeave(&pThis->CritSect);
    762         AssertRC(rc2);
    763     }
    764 
     734    RT_NOREF(pInterface, pStream);
    765735    return VINF_SUCCESS;
    766736}
     
    888858    PVALKITTESTDATA     pTst  = NULL;
    889859
    890     pThis->cbPlayedTotal += cbBuf; /* Do a bit of accounting. */
    891 
    892860    bool const fIsSilence = PDMAudioPropsIsBufferSilence(&pStream->pStream->Cfg.Props, pvBuf, cbBuf);
     861
     862    LogRel2(("ValKit: Playing stream '%s' ...\n", pStream->pStream->Cfg.szName));
    893863
    894864    int rc = RTCritSectEnter(&pThis->CritSect);
    895865    if (RT_SUCCESS(rc))
    896866    {
     867        pThis->cbPlayedTotal += cbBuf; /* Do a bit of accounting. */
     868
    897869        if (pThis->pTestCurPlay == NULL)
    898870        {
     
    10401012    PVALKITTESTDATA     pTst        = NULL;
    10411013
    1042     pThis->cbRecordedTotal += cbBuf; /* Do a bit of accounting. */
     1014    LogRel2(("ValKit: Capturing stream '%s' ...\n", pStream->pStream->Cfg.szName));
    10431015
    10441016    int rc = RTCritSectEnter(&pThis->CritSect);
    10451017    if (RT_SUCCESS(rc))
    10461018    {
     1019        pThis->cbRecordedTotal += cbBuf; /* Do a bit of accounting. */
     1020
    10471021        if (pThis->pTestCurRec == NULL)
    10481022        {
     
    12031177
    12041178    pThis->cTestsTotal = 0;
    1205     pThis->cTestsPlay  = 0;
    1206     pThis->cTestsRec   = 0;
    12071179    pThis->fTestSetEnd = false;
    12081180
Note: See TracChangeset for help on using the changeset viewer.

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