mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 17:12:37 -06: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
|
@ -155,6 +155,7 @@ void Config::ReadValues() {
|
|||
static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_bottom", 480));
|
||||
|
||||
// Audio
|
||||
Settings::values.enable_dsp_lle = sdl2_config->GetBoolean("Audio", "enable_dsp_lle", false);
|
||||
Settings::values.sink_id = sdl2_config->GetString("Audio", "output_engine", "auto");
|
||||
Settings::values.enable_audio_stretching =
|
||||
sdl2_config->GetBoolean("Audio", "enable_audio_stretching", true);
|
||||
|
|
|
@ -167,6 +167,11 @@ custom_bottom_bottom =
|
|||
swap_screen =
|
||||
|
||||
[Audio]
|
||||
|
||||
# Whether or not to enable DSP LLE
|
||||
# 0 (default): No, 1: Yes
|
||||
enable_dsp_lle =
|
||||
|
||||
# Which audio output engine to use.
|
||||
# auto (default): Auto-select, null: No audio output, sdl2: SDL2 (if available)
|
||||
output_engine =
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <utility>
|
||||
#include "audio_core/dsp_interface.h"
|
||||
#include "audio_core/hle/hle.h"
|
||||
#include "audio_core/lle/lle.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/arm/arm_interface.h"
|
||||
#ifdef ARCHITECTURE_x86_64
|
||||
|
@ -188,7 +189,12 @@ System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) {
|
|||
cpu_core = std::make_unique<ARM_DynCom>(*this, USER32MODE);
|
||||
}
|
||||
|
||||
dsp_core = std::make_unique<AudioCore::DspHle>(*memory);
|
||||
if (Settings::values.enable_dsp_lle) {
|
||||
dsp_core = std::make_unique<AudioCore::DspLle>();
|
||||
} else {
|
||||
dsp_core = std::make_unique<AudioCore::DspHle>(*memory);
|
||||
}
|
||||
|
||||
dsp_core->SetSink(Settings::values.sink_id, Settings::values.audio_device_id);
|
||||
dsp_core->EnableStretching(Settings::values.enable_audio_stretching);
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ void LogSettings() {
|
|||
LogSetting("Layout_Factor3d", Settings::values.factor_3d);
|
||||
LogSetting("Layout_LayoutOption", static_cast<int>(Settings::values.layout_option));
|
||||
LogSetting("Layout_SwapScreen", Settings::values.swap_screen);
|
||||
LogSetting("Audio_EnableDspLle", Settings::values.enable_dsp_lle);
|
||||
LogSetting("Audio_OutputEngine", Settings::values.sink_id);
|
||||
LogSetting("Audio_EnableAudioStretching", Settings::values.enable_audio_stretching);
|
||||
LogSetting("Audio_OutputDevice", Settings::values.audio_device_id);
|
||||
|
|
|
@ -147,6 +147,7 @@ struct Values {
|
|||
u8 factor_3d;
|
||||
|
||||
// Audio
|
||||
bool enable_dsp_lle;
|
||||
std::string sink_id;
|
||||
bool enable_audio_stretching;
|
||||
std::string audio_device_id;
|
||||
|
|
Loading…
Reference in a new issue