configure_audio: User-configuratble option to enable/disable audio stretching
This commit is contained in:
parent
904a319694
commit
dc3f6a34f8
7 changed files with 24 additions and 0 deletions
|
@ -56,6 +56,7 @@ void Config::ReadValues() {
|
|||
|
||||
qt_config->beginGroup("Audio");
|
||||
Settings::values.sink_id = qt_config->value("output_engine", "auto").toString().toStdString();
|
||||
Settings::values.enable_audio_stretching = qt_config->value("enable_audio_stretching", true).toBool();
|
||||
qt_config->endGroup();
|
||||
|
||||
qt_config->beginGroup("Data Storage");
|
||||
|
@ -148,6 +149,7 @@ void Config::SaveValues() {
|
|||
|
||||
qt_config->beginGroup("Audio");
|
||||
qt_config->setValue("output_engine", QString::fromStdString(Settings::values.sink_id));
|
||||
qt_config->setValue("enable_audio_stretching", Settings::values.enable_audio_stretching);
|
||||
qt_config->endGroup();
|
||||
|
||||
qt_config->beginGroup("Data Storage");
|
||||
|
|
|
@ -36,9 +36,12 @@ void ConfigureAudio::setConfiguration() {
|
|||
}
|
||||
}
|
||||
ui->output_sink_combo_box->setCurrentIndex(new_sink_index);
|
||||
|
||||
ui->toggle_audio_stretching->setChecked(Settings::values.enable_audio_stretching);
|
||||
}
|
||||
|
||||
void ConfigureAudio::applyConfiguration() {
|
||||
Settings::values.sink_id = ui->output_sink_combo_box->itemText(ui->output_sink_combo_box->currentIndex()).toStdString();
|
||||
Settings::values.enable_audio_stretching = ui->toggle_audio_stretching->isChecked();
|
||||
Settings::Apply();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,16 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toggle_audio_stretching">
|
||||
<property name="text">
|
||||
<string>Enable audio stretching</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This post-processing effect adjusts audio speed to match emulation speed and helps prevent audio stutter. This however increases audio latency.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue