mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Merge pull request #4490 from wwylele/teakra-new
audio: implement DSP LLE
This commit is contained in:
		
						commit
						4f23d5d69e
					
				
					 23 changed files with 766 additions and 61 deletions
				
			
		|  | @ -137,6 +137,9 @@ void Config::ReadValues() { | |||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Audio"); | ||||
|     Settings::values.enable_dsp_lle = ReadSetting("enable_dsp_lle", false).toBool(); | ||||
|     Settings::values.enable_dsp_lle_multithread = | ||||
|         ReadSetting("enable_dsp_lle_multithread", false).toBool(); | ||||
|     Settings::values.sink_id = ReadSetting("output_engine", "auto").toString().toStdString(); | ||||
|     Settings::values.enable_audio_stretching = | ||||
|         ReadSetting("enable_audio_stretching", true).toBool(); | ||||
|  | @ -416,6 +419,8 @@ void Config::SaveValues() { | |||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Audio"); | ||||
|     WriteSetting("enable_dsp_lle", Settings::values.enable_dsp_lle, false); | ||||
|     WriteSetting("enable_dsp_lle_multithread", Settings::values.enable_dsp_lle_multithread, 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,11 @@ ConfigureAudio::ConfigureAudio(QWidget* parent) | |||
|         ui->output_sink_combo_box->addItem(id); | ||||
|     } | ||||
| 
 | ||||
|     ui->emulation_combo_box->addItem(tr("HLE (fast)")); | ||||
|     ui->emulation_combo_box->addItem(tr("LLE (accurate)")); | ||||
|     ui->emulation_combo_box->addItem(tr("LLE multi-core")); | ||||
|     ui->emulation_combo_box->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | ||||
| 
 | ||||
|     connect(ui->volume_slider, &QSlider::valueChanged, this, | ||||
|             &ConfigureAudio::setVolumeIndicatorText); | ||||
| 
 | ||||
|  | @ -41,6 +47,18 @@ 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()); | ||||
| 
 | ||||
|     int selection; | ||||
|     if (Settings::values.enable_dsp_lle) { | ||||
|         if (Settings::values.enable_dsp_lle_multithread) { | ||||
|             selection = 2; | ||||
|         } else { | ||||
|             selection = 1; | ||||
|         } | ||||
|     } else { | ||||
|         selection = 0; | ||||
|     } | ||||
|     ui->emulation_combo_box->setCurrentIndex(selection); | ||||
| } | ||||
| 
 | ||||
| void ConfigureAudio::setOutputSinkFromSinkID() { | ||||
|  | @ -85,6 +103,8 @@ 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() != 0; | ||||
|     Settings::values.enable_dsp_lle_multithread = ui->emulation_combo_box->currentIndex() == 2; | ||||
| } | ||||
| 
 | ||||
| void ConfigureAudio::updateAudioDevices(int sink_index) { | ||||
|  |  | |||
|  | @ -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