Changeset 91613 in vbox
- Timestamp:
- Oct 7, 2021 9:08:17 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py
r91585 r91613 106 106 # Audio controller type to use. 107 107 # If set to None, the OS' recommended controller type will be used (defined by Main). 108 self. enmAudioControllerType = None;108 self.sAudioControllerType = None; 109 109 110 110 def showUsage(self): … … 156 156 if iArg >= len(asArgs): 157 157 raise base.InvalidOption('Option "%s" needs a value' % (asArgs[iArg - 1])); 158 if not self.importVBoxApi(): # So we can use the constant below. 159 return iArg + 1; # Just skip stuff. 160 if asArgs[iArg] == 'HDA': 161 self.enmAudioControllerType = vboxcon.AudioControllerType_HDA; 162 elif asArgs[iArg] == 'AC97': 163 self.enmAudioControllerType = vboxcon.AudioControllerType_AC97; 164 elif asArgs[iArg] == 'SB16': 165 self.enmAudioControllerType = vboxcon.AudioControllerType_SB16; 158 if asArgs[iArg] == 'HDA' \ 159 or asArgs[iArg] == 'AC97' \ 160 or asArgs[iArg] == 'SB16': 161 self.sAudioControllerType = asArgs[iArg]; 166 162 else: 167 163 raise base.InvalidOption('The "--audio-controller-type" value "%s" is not valid' % (asArgs[iArg])); … … 719 715 # Make sure that the VM's audio adapter is configured the way we need it to. 720 716 if self.fpApiVer >= 4.0: 717 enmAudioControllerType = None; 721 718 reporter.log('Configuring audio controller type ...'); 722 if self. enmAudioControllerType is None:719 if self.sAudioControllerType is None: 723 720 oOsType = oSession.getOsType(); 724 self.enmAudioControllerType = oOsType.recommendedAudioController; 725 726 reporter.log('Setting user-defined audio controller type to %d' % (self.enmAudioControllerType)); 727 oSession.setupAudio(self.enmAudioControllerType, 721 enmAudioControllerType = oOsType.recommendedAudioController; 722 else: 723 if self.sAudioControllerType == 'HDA': 724 enmAudioControllerType = vboxcon.AudioControllerType_HDA; 725 elif self.sAudioControllerType == 'AC97': 726 enmAudioControllerType = vboxcon.AudioControllerType_AC97; 727 elif self.sAudioControllerType == 'SB16': 728 enmAudioControllerType = vboxcon.AudioControllerType_SB16; 729 assert enmAudioControllerType is not None; 730 731 reporter.log('Setting user-defined audio controller type to %d' % (enmAudioControllerType)); 732 oSession.setupAudio(enmAudioControllerType, 728 733 fEnable = True, fEnableIn = True, fEnableOut = True); 729 734
Note:
See TracChangeset
for help on using the changeset viewer.