mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Configuration: add option to use DSP LLE
This commit is contained in:
		
							parent
							
								
									483680a124
								
							
						
					
					
						commit
						21da135cc6
					
				
					 8 changed files with 43 additions and 2 deletions
				
			
		|  | @ -136,6 +136,7 @@ void Config::ReadValues() { | |||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Audio"); | ||||
|     Settings::values.enable_dsp_lle = ReadSetting("enable_dsp_lle", false).toBool(); | ||||
|     Settings::values.sink_id = ReadSetting("output_engine", "auto").toString().toStdString(); | ||||
|     Settings::values.enable_audio_stretching = | ||||
|         ReadSetting("enable_audio_stretching", true).toBool(); | ||||
|  | @ -415,6 +416,7 @@ void Config::SaveValues() { | |||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Audio"); | ||||
|     WriteSetting("enable_dsp_lle", Settings::values.enable_dsp_lle, false); | ||||
|     WriteSetting("output_engine", QString::fromStdString(Settings::values.sink_id), "auto"); | ||||
|     WriteSetting("enable_audio_stretching", Settings::values.enable_audio_stretching, true); | ||||
|     WriteSetting("output_device", QString::fromStdString(Settings::values.audio_device_id), "auto"); | ||||
|  |  | |||
|  | @ -6,6 +6,7 @@ | |||
| #include "audio_core/sink.h" | ||||
| #include "audio_core/sink_details.h" | ||||
| #include "citra_qt/configuration/configure_audio.h" | ||||
| #include "core/core.h" | ||||
| #include "core/settings.h" | ||||
| #include "ui_configure_audio.h" | ||||
| 
 | ||||
|  | @ -19,6 +20,10 @@ ConfigureAudio::ConfigureAudio(QWidget* parent) | |||
|         ui->output_sink_combo_box->addItem(sink_detail.id); | ||||
|     } | ||||
| 
 | ||||
|     ui->emulation_combo_box->addItem(tr("HLE (fast)")); | ||||
|     ui->emulation_combo_box->addItem(tr("LLE (accurate)")); | ||||
|     ui->emulation_combo_box->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | ||||
| 
 | ||||
|     connect(ui->volume_slider, &QSlider::valueChanged, this, | ||||
|             &ConfigureAudio::setVolumeIndicatorText); | ||||
| 
 | ||||
|  | @ -41,6 +46,8 @@ void ConfigureAudio::setConfiguration() { | |||
|     ui->toggle_audio_stretching->setChecked(Settings::values.enable_audio_stretching); | ||||
|     ui->volume_slider->setValue(Settings::values.volume * ui->volume_slider->maximum()); | ||||
|     setVolumeIndicatorText(ui->volume_slider->sliderPosition()); | ||||
| 
 | ||||
|     ui->emulation_combo_box->setCurrentIndex(Settings::values.enable_dsp_lle ? 1 : 0); | ||||
| } | ||||
| 
 | ||||
| void ConfigureAudio::setOutputSinkFromSinkID() { | ||||
|  | @ -85,6 +92,7 @@ void ConfigureAudio::applyConfiguration() { | |||
|             .toStdString(); | ||||
|     Settings::values.volume = | ||||
|         static_cast<float>(ui->volume_slider->sliderPosition()) / ui->volume_slider->maximum(); | ||||
|     Settings::values.enable_dsp_lle = ui->emulation_combo_box->currentIndex() == 1; | ||||
| } | ||||
| 
 | ||||
| void ConfigureAudio::updateAudioDevices(int sink_index) { | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ | |||
|    <rect> | ||||
|     <x>0</x> | ||||
|     <y>0</y> | ||||
|     <width>188</width> | ||||
|     <width>240</width> | ||||
|     <height>246</height> | ||||
|    </rect> | ||||
|   </property> | ||||
|  | @ -17,6 +17,23 @@ | |||
|       <string>Audio</string> | ||||
|      </property> | ||||
|      <layout class="QVBoxLayout"> | ||||
|       <item> | ||||
|        <layout class="QHBoxLayout" name="horizontalLayout_emulation"> | ||||
|         <property name="bottomMargin"> | ||||
|          <number>0</number> | ||||
|         </property> | ||||
|         <item> | ||||
|          <widget class="QLabel" name="label_emulation"> | ||||
|           <property name="text"> | ||||
|            <string>Emulation:</string> | ||||
|           </property> | ||||
|          </widget> | ||||
|         </item> | ||||
|         <item> | ||||
|          <widget class="QComboBox" name="emulation_combo_box"/> | ||||
|         </item> | ||||
|        </layout> | ||||
|       </item> | ||||
|       <item> | ||||
|        <layout class="QHBoxLayout"> | ||||
|         <item> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue