diff options
| author | 2021-09-18 11:18:24 -0700 | |
|---|---|---|
| committer | 2021-09-18 11:18:24 -0700 | |
| commit | 35f46fc079d9534df7850eca3ce29e89e04d8914 (patch) | |
| tree | 16c57a4812428418b49bae264ef960559217901f /src | |
| parent | Merge pull request #6950 from german77/multiplay (diff) | |
| parent | fix_clang_error (diff) | |
| download | yuzu-35f46fc079d9534df7850eca3ce29e89e04d8914.tar.gz yuzu-35f46fc079d9534df7850eca3ce29e89e04d8914.tar.xz yuzu-35f46fc079d9534df7850eca3ce29e89e04d8914.zip | |
Merge pull request #7020 from Moonlacer/remove_audio_stretching
Remove audio stretching
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/settings.cpp | 2 | ||||
| -rw-r--r-- | src/common/settings.h | 1 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_audio.cpp | 9 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_audio.h | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_audio.ui | 10 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 1 |
8 files changed, 0 insertions, 29 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index e1fa90c5a..69f0bd8c0 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -61,7 +61,6 @@ void LogSettings() { | |||
| 61 | log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue()); | 61 | log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue()); |
| 62 | log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue()); | 62 | log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue()); |
| 63 | log_setting("Audio_OutputEngine", values.sink_id.GetValue()); | 63 | log_setting("Audio_OutputEngine", values.sink_id.GetValue()); |
| 64 | log_setting("Audio_EnableAudioStretching", values.enable_audio_stretching.GetValue()); | ||
| 65 | log_setting("Audio_OutputDevice", values.audio_device_id.GetValue()); | 64 | log_setting("Audio_OutputDevice", values.audio_device_id.GetValue()); |
| 66 | log_setting("DataStorage_UseVirtualSd", values.use_virtual_sd.GetValue()); | 65 | log_setting("DataStorage_UseVirtualSd", values.use_virtual_sd.GetValue()); |
| 67 | log_path("DataStorage_CacheDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir)); | 66 | log_path("DataStorage_CacheDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir)); |
| @@ -115,7 +114,6 @@ void RestoreGlobalState(bool is_powered_on) { | |||
| 115 | } | 114 | } |
| 116 | 115 | ||
| 117 | // Audio | 116 | // Audio |
| 118 | values.enable_audio_stretching.SetGlobal(true); | ||
| 119 | values.volume.SetGlobal(true); | 117 | values.volume.SetGlobal(true); |
| 120 | 118 | ||
| 121 | // Core | 119 | // Core |
diff --git a/src/common/settings.h b/src/common/settings.h index e674ccc5c..b1bddb895 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -414,7 +414,6 @@ struct Values { | |||
| 414 | BasicSetting<std::string> audio_device_id{"auto", "output_device"}; | 414 | BasicSetting<std::string> audio_device_id{"auto", "output_device"}; |
| 415 | BasicSetting<std::string> sink_id{"auto", "output_engine"}; | 415 | BasicSetting<std::string> sink_id{"auto", "output_engine"}; |
| 416 | BasicSetting<bool> audio_muted{false, "audio_muted"}; | 416 | BasicSetting<bool> audio_muted{false, "audio_muted"}; |
| 417 | Setting<bool> enable_audio_stretching{true, "enable_audio_stretching"}; | ||
| 418 | RangedSetting<u8> volume{100, 0, 100, "volume"}; | 417 | RangedSetting<u8> volume{100, 0, 100, "volume"}; |
| 419 | 418 | ||
| 420 | // Core | 419 | // Core |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 1f1607998..191475f71 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -226,8 +226,6 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader, | |||
| 226 | // Log user configuration information | 226 | // Log user configuration information |
| 227 | constexpr auto field_type = Telemetry::FieldType::UserConfig; | 227 | constexpr auto field_type = Telemetry::FieldType::UserConfig; |
| 228 | AddField(field_type, "Audio_SinkId", Settings::values.sink_id.GetValue()); | 228 | AddField(field_type, "Audio_SinkId", Settings::values.sink_id.GetValue()); |
| 229 | AddField(field_type, "Audio_EnableAudioStretching", | ||
| 230 | Settings::values.enable_audio_stretching.GetValue()); | ||
| 231 | AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue()); | 229 | AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue()); |
| 232 | AddField(field_type, "Renderer_Backend", | 230 | AddField(field_type, "Renderer_Backend", |
| 233 | TranslateRenderer(Settings::values.renderer_backend.GetValue())); | 231 | TranslateRenderer(Settings::values.renderer_backend.GetValue())); |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 18271dee2..952e96769 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -542,7 +542,6 @@ void Config::ReadAudioValues() { | |||
| 542 | ReadBasicSetting(Settings::values.audio_device_id); | 542 | ReadBasicSetting(Settings::values.audio_device_id); |
| 543 | ReadBasicSetting(Settings::values.sink_id); | 543 | ReadBasicSetting(Settings::values.sink_id); |
| 544 | } | 544 | } |
| 545 | ReadGlobalSetting(Settings::values.enable_audio_stretching); | ||
| 546 | ReadGlobalSetting(Settings::values.volume); | 545 | ReadGlobalSetting(Settings::values.volume); |
| 547 | 546 | ||
| 548 | qt_config->endGroup(); | 547 | qt_config->endGroup(); |
| @@ -1164,7 +1163,6 @@ void Config::SaveAudioValues() { | |||
| 1164 | WriteBasicSetting(Settings::values.sink_id); | 1163 | WriteBasicSetting(Settings::values.sink_id); |
| 1165 | WriteBasicSetting(Settings::values.audio_device_id); | 1164 | WriteBasicSetting(Settings::values.audio_device_id); |
| 1166 | } | 1165 | } |
| 1167 | WriteGlobalSetting(Settings::values.enable_audio_stretching); | ||
| 1168 | WriteGlobalSetting(Settings::values.volume); | 1166 | WriteGlobalSetting(Settings::values.volume); |
| 1169 | 1167 | ||
| 1170 | qt_config->endGroup(); | 1168 | qt_config->endGroup(); |
diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index 1d84bf4ed..f437cb53d 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp | |||
| @@ -50,8 +50,6 @@ void ConfigureAudio::SetConfiguration() { | |||
| 50 | const auto volume_value = static_cast<int>(Settings::values.volume.GetValue()); | 50 | const auto volume_value = static_cast<int>(Settings::values.volume.GetValue()); |
| 51 | ui->volume_slider->setValue(volume_value); | 51 | ui->volume_slider->setValue(volume_value); |
| 52 | 52 | ||
| 53 | ui->toggle_audio_stretching->setChecked(Settings::values.enable_audio_stretching.GetValue()); | ||
| 54 | |||
| 55 | if (!Settings::IsConfiguringGlobal()) { | 53 | if (!Settings::IsConfiguringGlobal()) { |
| 56 | if (Settings::values.volume.UsingGlobal()) { | 54 | if (Settings::values.volume.UsingGlobal()) { |
| 57 | ui->volume_combo_box->setCurrentIndex(0); | 55 | ui->volume_combo_box->setCurrentIndex(0); |
| @@ -100,8 +98,6 @@ void ConfigureAudio::SetVolumeIndicatorText(int percentage) { | |||
| 100 | } | 98 | } |
| 101 | 99 | ||
| 102 | void ConfigureAudio::ApplyConfiguration() { | 100 | void ConfigureAudio::ApplyConfiguration() { |
| 103 | ConfigurationShared::ApplyPerGameSetting(&Settings::values.enable_audio_stretching, | ||
| 104 | ui->toggle_audio_stretching, enable_audio_stretching); | ||
| 105 | 101 | ||
| 106 | if (Settings::IsConfiguringGlobal()) { | 102 | if (Settings::IsConfiguringGlobal()) { |
| 107 | Settings::values.sink_id = | 103 | Settings::values.sink_id = |
| @@ -162,15 +158,10 @@ void ConfigureAudio::RetranslateUI() { | |||
| 162 | void ConfigureAudio::SetupPerGameUI() { | 158 | void ConfigureAudio::SetupPerGameUI() { |
| 163 | if (Settings::IsConfiguringGlobal()) { | 159 | if (Settings::IsConfiguringGlobal()) { |
| 164 | ui->volume_slider->setEnabled(Settings::values.volume.UsingGlobal()); | 160 | ui->volume_slider->setEnabled(Settings::values.volume.UsingGlobal()); |
| 165 | ui->toggle_audio_stretching->setEnabled( | ||
| 166 | Settings::values.enable_audio_stretching.UsingGlobal()); | ||
| 167 | 161 | ||
| 168 | return; | 162 | return; |
| 169 | } | 163 | } |
| 170 | 164 | ||
| 171 | ConfigurationShared::SetColoredTristate(ui->toggle_audio_stretching, | ||
| 172 | Settings::values.enable_audio_stretching, | ||
| 173 | enable_audio_stretching); | ||
| 174 | connect(ui->volume_combo_box, qOverload<int>(&QComboBox::activated), this, [this](int index) { | 165 | connect(ui->volume_combo_box, qOverload<int>(&QComboBox::activated), this, [this](int index) { |
| 175 | ui->volume_slider->setEnabled(index == 1); | 166 | ui->volume_slider->setEnabled(index == 1); |
| 176 | ConfigurationShared::SetHighlight(ui->volume_layout, index == 1); | 167 | ConfigurationShared::SetHighlight(ui->volume_layout, index == 1); |
diff --git a/src/yuzu/configuration/configure_audio.h b/src/yuzu/configuration/configure_audio.h index 9dbd3d93e..5a01c8de7 100644 --- a/src/yuzu/configuration/configure_audio.h +++ b/src/yuzu/configuration/configure_audio.h | |||
| @@ -41,6 +41,4 @@ private: | |||
| 41 | void SetupPerGameUI(); | 41 | void SetupPerGameUI(); |
| 42 | 42 | ||
| 43 | std::unique_ptr<Ui::ConfigureAudio> ui; | 43 | std::unique_ptr<Ui::ConfigureAudio> ui; |
| 44 | |||
| 45 | ConfigurationShared::CheckState enable_audio_stretching; | ||
| 46 | }; | 44 | }; |
diff --git a/src/yuzu/configuration/configure_audio.ui b/src/yuzu/configuration/configure_audio.ui index 9bd0cca96..bf736fc2c 100644 --- a/src/yuzu/configuration/configure_audio.ui +++ b/src/yuzu/configuration/configure_audio.ui | |||
| @@ -32,16 +32,6 @@ | |||
| 32 | </layout> | 32 | </layout> |
| 33 | </item> | 33 | </item> |
| 34 | <item> | 34 | <item> |
| 35 | <widget class="QCheckBox" name="toggle_audio_stretching"> | ||
| 36 | <property name="toolTip"> | ||
| 37 | <string>This post-processing effect adjusts audio speed to match emulation speed and helps prevent audio stutter. This however increases audio latency.</string> | ||
| 38 | </property> | ||
| 39 | <property name="text"> | ||
| 40 | <string>Enable audio stretching</string> | ||
| 41 | </property> | ||
| 42 | </widget> | ||
| 43 | </item> | ||
| 44 | <item> | ||
| 45 | <layout class="QHBoxLayout" name="_2"> | 35 | <layout class="QHBoxLayout" name="_2"> |
| 46 | <item> | 36 | <item> |
| 47 | <widget class="QLabel" name="audio_device_label"> | 37 | <widget class="QLabel" name="audio_device_label"> |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 891f7be6f..d74eb7e2b 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -475,7 +475,6 @@ void Config::ReadValues() { | |||
| 475 | 475 | ||
| 476 | // Audio | 476 | // Audio |
| 477 | ReadSetting("Audio", Settings::values.sink_id); | 477 | ReadSetting("Audio", Settings::values.sink_id); |
| 478 | ReadSetting("Audio", Settings::values.enable_audio_stretching); | ||
| 479 | ReadSetting("Audio", Settings::values.audio_device_id); | 478 | ReadSetting("Audio", Settings::values.audio_device_id); |
| 480 | ReadSetting("Audio", Settings::values.volume); | 479 | ReadSetting("Audio", Settings::values.volume); |
| 481 | 480 | ||