Changeset 68489 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 21, 2017 2:17:01 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
r68435 r68489 39 39 , m_audioDriverType(KAudioDriverType_Null) 40 40 , m_audioControllerType(KAudioControllerType_AC97) 41 , m_fAudioOutputEnabled(false) 42 , m_fAudioInputEnabled(false) 41 43 {} 42 44 … … 48 50 && (m_audioDriverType == other.m_audioDriverType) 49 51 && (m_audioControllerType == other.m_audioControllerType) 52 && (m_fAudioOutputEnabled == other.m_fAudioOutputEnabled) 53 && (m_fAudioInputEnabled == other.m_fAudioInputEnabled) 50 54 ; 51 55 } … … 62 66 /** Holds the audio controller type. */ 63 67 KAudioControllerType m_audioControllerType; 68 /** Holds whether the audio output is enabled. */ 69 bool m_fAudioOutputEnabled; 70 /** Holds whether the audio input is enabled. */ 71 bool m_fAudioInputEnabled; 64 72 }; 65 73 … … 102 110 oldAudioData.m_audioDriverType = comAdapter.GetAudioDriver(); 103 111 oldAudioData.m_audioControllerType = comAdapter.GetAudioController(); 112 oldAudioData.m_fAudioOutputEnabled = comAdapter.GetEnabledOut(); 113 oldAudioData.m_fAudioInputEnabled = comAdapter.GetEnabledIn(); 104 114 } 105 115 … … 120 130 m_pComboAudioDriver->setCurrentIndex(m_pComboAudioDriver->findData((int)oldAudioData.m_audioDriverType)); 121 131 m_pComboAudioController->setCurrentIndex(m_pComboAudioController->findData((int)oldAudioData.m_audioControllerType)); 132 m_pCheckBoxAudioOutput->setChecked(oldAudioData.m_fAudioOutputEnabled); 133 m_pCheckBoxAudioInput->setChecked(oldAudioData.m_fAudioInputEnabled); 122 134 123 135 /* Polish page finally: */ … … 134 146 newAudioData.m_audioDriverType = static_cast<KAudioDriverType>(m_pComboAudioDriver->itemData(m_pComboAudioDriver->currentIndex()).toInt()); 135 147 newAudioData.m_audioControllerType = static_cast<KAudioControllerType>(m_pComboAudioController->itemData(m_pComboAudioController->currentIndex()).toInt()); 148 newAudioData.m_fAudioOutputEnabled = m_pCheckBoxAudioOutput->isChecked(); 149 newAudioData.m_fAudioInputEnabled = m_pCheckBoxAudioInput->isChecked(); 136 150 137 151 /* Cache new audio data: */ … … 294 308 fSuccess = comAdapter.isOk(); 295 309 } 310 /* Save whether audio output is enabled: */ 311 if (fSuccess && isMachineOffline() && newAudioData.m_fAudioOutputEnabled != oldAudioData.m_fAudioOutputEnabled) 312 { 313 comAdapter.SetEnabledOut(newAudioData.m_fAudioOutputEnabled); 314 fSuccess = comAdapter.isOk(); 315 } 316 /* Save whether audio input is enabled: */ 317 if (fSuccess && isMachineOffline() && newAudioData.m_fAudioInputEnabled != oldAudioData.m_fAudioInputEnabled) 318 { 319 comAdapter.SetEnabledIn(newAudioData.m_fAudioInputEnabled); 320 fSuccess = comAdapter.isOk(); 321 } 296 322 297 323 /* Show error message if necessary: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.ui
r67067 r68489 103 103 </widget> 104 104 </item> 105 <item row="2" column="0"> 106 <widget class="QLabel" name="m_pLabelAudioExtended"> 107 <property name="text"> 108 <string>Extended Features:</string> 109 </property> 110 <property name="alignment"> 111 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 112 </property> 113 </widget> 114 </item> 115 <item row="2" column="1"> 116 <widget class="QCheckBox" name="m_pCheckBoxAudioOutput"> 117 <property name="sizePolicy"> 118 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 119 <horstretch>1</horstretch> 120 <verstretch>0</verstretch> 121 </sizepolicy> 122 </property> 123 <property name="whatsThis"> 124 <string>When checked, a virtual PCI audio card output will be enabled.</string> 125 </property> 126 <property name="text"> 127 <string>Enable Audio &Output</string> 128 </property> 129 </widget> 130 </item> 131 <item row="3" column="1"> 132 <widget class="QCheckBox" name="m_pCheckBoxAudioInput"> 133 <property name="sizePolicy"> 134 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 135 <horstretch>1</horstretch> 136 <verstretch>0</verstretch> 137 </sizepolicy> 138 </property> 139 <property name="whatsThis"> 140 <string>When checked, a virtual PCI audio card input will be enabled.</string> 141 </property> 142 <property name="text"> 143 <string>Enable Audio &Input</string> 144 </property> 145 </widget> 146 </item> 105 147 </layout> 106 148 </widget>
Note:
See TracChangeset
for help on using the changeset viewer.