VirtualBox

Changeset 91562 in vbox


Ignore:
Timestamp:
Oct 5, 2021 10:43:35 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Implemented ability to run the test driver with a specific audio controller via "--audio-controller-type <HDA|AC97|SB16>". ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py

    r91560 r91562  
    154154        elif asArgs[iArg] == '--audio-controller-type':
    155155            iArg += 1;
     156            if iArg >= len(asArgs):
     157                raise base.InvalidOption('Option "%s" needs a value' % (asArgs[iArg - 1]));
    156158            if not self.importVBoxApi(): # So we can use the constant below.
    157159                return iArg + 1; # Just skip stuff.
     
    717719            # Make sure that the VM's audio adapter is configured the way we need it to.
    718720            if self.fpApiVer >= 4.0:
    719                 if self.enmAudioControllerType:
     721                if self.enmAudioControllerType is None:
     722                    oOsType = oSession.getOsType();
     723                    self.enmAudioControllerType = oOsType.recommendedAudioController;
     724                else:
    720725                    reporter.log('Setting user-defined audio controller type to %d' % (self.enmAudioControllerType));
    721                     oSession.setupAudio(self.enmAudioControllerType,
    722                                         fEnable = True, fEnableIn = True, fEnableOut = True);
    723                 else:
    724                     oOsType = oSession.getOsType();
    725                     oSession.setupAudio(oOsType.recommendedAudioController,
    726                                         fEnable = True, fEnableIn = True, fEnableOut = True);
     726
     727                oSession.setupAudio(self.enmAudioControllerType,
     728                                    fEnable = True, fEnableIn = True, fEnableOut = True);
    727729
    728730            # Save the settings.
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