VirtualBox

Changeset 92452 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Nov 16, 2021 10:43:51 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Fixes for going to the next recording / playing state when no audio beacons are being used. bugref:10008

File:
1 edited

Legend:

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

    r92450 r92452  
    11531153                         PDMAudioPropsBytesToMilli(&pStream->pStream->Cfg.Props, AudioTestBeaconGetRemaining(pBeacon))));
    11541154
     1155                bool fGoToNextStage = false;
     1156
    11551157                if (    AudioTestBeaconGetSize(pBeacon)
    11561158                    && !AudioTestBeaconIsComplete(pBeacon))
     
    11821184                                 pTst->idxTest, AudioTestBeaconTypeGetName(pBeacon->enmType)));
    11831185
    1184                         if (pTst->enmState == AUDIOTESTSTATE_PRE)
    1185                             pTst->enmState = AUDIOTESTSTATE_RUN;
    1186                         else if (pTst->enmState == AUDIOTESTSTATE_POST)
    1187                             pTst->enmState = AUDIOTESTSTATE_DONE;
     1186                        fGoToNextStage = true;
    11881187                    }
    11891188                }
    1190                 else /* Go to the next state. */
    1191                     pTst->enmState = AUDIOTESTSTATE_RUN;
     1189                else
     1190                    fGoToNextStage = true;
     1191
     1192                if (fGoToNextStage)
     1193                {
     1194                    if (pTst->enmState == AUDIOTESTSTATE_PRE)
     1195                        pTst->enmState = AUDIOTESTSTATE_RUN;
     1196                    else if (pTst->enmState == AUDIOTESTSTATE_POST)
     1197                        pTst->enmState = AUDIOTESTSTATE_DONE;
     1198                }
    11921199                break;
    11931200            }
     
    13801387        case AUDIOTESTSTATE_POST:
    13811388        {
     1389            bool fGoToNextStage = false;
     1390
    13821391            PAUDIOTESTTONEBEACON pBeacon = &pTst->t.TestTone.Beacon;
    13831392            if (    AudioTestBeaconGetSize(pBeacon)
     
    14041413                             pTst->idxTest, AudioTestBeaconTypeGetName(pBeacon->enmType)));
    14051414
    1406                     if (pTst->enmState == AUDIOTESTSTATE_PRE)
    1407                         pTst->enmState = AUDIOTESTSTATE_RUN;
    1408                     else if (pTst->enmState == AUDIOTESTSTATE_POST)
    1409                         pTst->enmState = AUDIOTESTSTATE_DONE;
     1415                    fGoToNextStage = true;
    14101416                }
    14111417            }
    1412             else /* Go to the next state. */
    1413                 pTst->enmState = AUDIOTESTSTATE_RUN;
     1418            else
     1419                fGoToNextStage = true;
     1420
     1421            if (fGoToNextStage)
     1422            {
     1423                if (pTst->enmState == AUDIOTESTSTATE_PRE)
     1424                    pTst->enmState = AUDIOTESTSTATE_RUN;
     1425                else if (pTst->enmState == AUDIOTESTSTATE_POST)
     1426                    pTst->enmState = AUDIOTESTSTATE_DONE;
     1427            }
    14141428            break;
    14151429        }
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