diff options
| author | 2023-05-18 17:54:22 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:07 -0400 | |
| commit | 432f68ad29df7a368ba375d75d667c954e9c80b9 (patch) | |
| tree | c09b7f5ae90f30e074ff6823a6e361329b71af2e /src/common | |
| parent | settings: Split enums to new file (diff) | |
| download | yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar.gz yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar.xz yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.zip | |
configure_audio: Implement ui generation
Needs a considerable amount of management specific to some of
the comoboboxes due to the audio engine configuration.
general: Partial audio config implmentation
configure_audio: Implement ui generation
Needs a considerable amount of management specific to some of
the comoboboxes due to the audio engine configuration.
general: Partial audio config implmentation
settings: Make audio settings as enums
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/settings.cpp | 2 | ||||
| -rw-r--r-- | src/common/settings.h | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index c8651925e..8bfda5667 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -90,7 +90,7 @@ void LogSettings() { | |||
| 90 | log_setting("Renderer_ShaderBackend", values.shader_backend.GetValue()); | 90 | log_setting("Renderer_ShaderBackend", values.shader_backend.GetValue()); |
| 91 | log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue()); | 91 | log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue()); |
| 92 | log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue()); | 92 | log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue()); |
| 93 | log_setting("Audio_OutputEngine", values.sink_id.GetValue()); | 93 | log_setting("Audio_OutputEngine", Settings::TranslateEnum(values.sink_id.GetValue())); |
| 94 | log_setting("Audio_OutputDevice", values.audio_output_device_id.GetValue()); | 94 | log_setting("Audio_OutputDevice", values.audio_output_device_id.GetValue()); |
| 95 | log_setting("Audio_InputDevice", values.audio_input_device_id.GetValue()); | 95 | log_setting("Audio_InputDevice", values.audio_input_device_id.GetValue()); |
| 96 | log_setting("DataStorage_UseVirtualSd", values.use_virtual_sd.GetValue()); | 96 | log_setting("DataStorage_UseVirtualSd", values.use_virtual_sd.GetValue()); |
diff --git a/src/common/settings.h b/src/common/settings.h index 0ac5078c6..d4b41a162 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -244,6 +244,8 @@ protected: | |||
| 244 | return value_.has_value() ? std::to_string(*value_) : "none"; | 244 | return value_.has_value() ? std::to_string(*value_) : "none"; |
| 245 | } else if constexpr (std::is_same<Type, bool>()) { | 245 | } else if constexpr (std::is_same<Type, bool>()) { |
| 246 | return value_ ? "true" : "false"; | 246 | return value_ ? "true" : "false"; |
| 247 | } else if (std::is_same<Type, AudioEngine>()) { | ||
| 248 | return TranslateEnum(value_); | ||
| 247 | } else { | 249 | } else { |
| 248 | return std::to_string(static_cast<u64>(value_)); | 250 | return std::to_string(static_cast<u64>(value_)); |
| 249 | } | 251 | } |
| @@ -309,6 +311,8 @@ public: | |||
| 309 | this->SetValue(static_cast<u32>(std::stoul(input))); | 311 | this->SetValue(static_cast<u32>(std::stoul(input))); |
| 310 | } else if constexpr (std::is_same<Type, bool>()) { | 312 | } else if constexpr (std::is_same<Type, bool>()) { |
| 311 | this->SetValue(input == "true"); | 313 | this->SetValue(input == "true"); |
| 314 | } else if constexpr (std::is_same<Type, AudioEngine>()) { | ||
| 315 | this->SetValue(ToEnum<Type>(input)); | ||
| 312 | } else { | 316 | } else { |
| 313 | this->SetValue(static_cast<Type>(std::stoll(input))); | 317 | this->SetValue(static_cast<Type>(std::stoll(input))); |
| 314 | } | 318 | } |
| @@ -542,7 +546,7 @@ struct Values { | |||
| 542 | Linkage linkage{}; | 546 | Linkage linkage{}; |
| 543 | 547 | ||
| 544 | // Audio | 548 | // Audio |
| 545 | Setting<std::string> sink_id{linkage, "auto", "output_engine", Category::Audio}; | 549 | Setting<AudioEngine> sink_id{linkage, AudioEngine::Auto, "output_engine", Category::Audio}; |
| 546 | Setting<std::string> audio_output_device_id{linkage, "auto", "output_device", Category::Audio}; | 550 | Setting<std::string> audio_output_device_id{linkage, "auto", "output_device", Category::Audio}; |
| 547 | Setting<std::string> audio_input_device_id{linkage, "auto", "input_device", Category::Audio}; | 551 | Setting<std::string> audio_input_device_id{linkage, "auto", "input_device", Category::Audio}; |
| 548 | Setting<bool, false> audio_muted{linkage, false, "audio_muted", Category::Audio, false}; | 552 | Setting<bool, false> audio_muted{linkage, false, "audio_muted", Category::Audio, false}; |
| @@ -731,8 +735,9 @@ struct Values { | |||
| 731 | SwitchableSetting<TimeZone, true> time_zone_index{linkage, TimeZone::Auto, | 735 | SwitchableSetting<TimeZone, true> time_zone_index{linkage, TimeZone::Auto, |
| 732 | TimeZone::Auto, TimeZone::Zulu, | 736 | TimeZone::Auto, TimeZone::Zulu, |
| 733 | "time_zone_index", Category::System}; | 737 | "time_zone_index", Category::System}; |
| 734 | SwitchableSetting<s32, true> sound_index{ | 738 | SwitchableSetting<AudioMode, true> sound_index{linkage, AudioMode::Stereo, |
| 735 | linkage, 1, 0, 2, "sound_index", Category::SystemAudio}; | 739 | AudioMode::Mono, AudioMode::Surround, |
| 740 | "sound_index", Category::SystemAudio}; | ||
| 736 | 741 | ||
| 737 | SwitchableSetting<bool> use_docked_mode{linkage, true, "use_docked_mode", Category::System}; | 742 | SwitchableSetting<bool> use_docked_mode{linkage, true, "use_docked_mode", Category::System}; |
| 738 | 743 | ||