AudioPanel: Refactor to use Config system. Some options were changed to a different format, for easier compatibility.

Removed VolumeChanged signal, as ConfigChanged will trigger what is needed.

Only applies UpdateSoundStream to things that can change during emulation.

Settings::SetVolume might no longer be used, but left it in.
This commit is contained in:
TryTwo
2024-10-10 17:00:41 -07:00
parent 1981f22228
commit 896b4bb1fa
5 changed files with 156 additions and 306 deletions

View File

@ -438,22 +438,17 @@ int Settings::GetVolume() const
void Settings::SetVolume(int volume)
{
if (GetVolume() != volume)
{
Config::SetBaseOrCurrent(Config::MAIN_AUDIO_VOLUME, volume);
emit VolumeChanged(volume);
}
}
void Settings::IncreaseVolume(int volume)
{
AudioCommon::IncreaseVolume(Core::System::GetInstance(), volume);
emit VolumeChanged(GetVolume());
}
void Settings::DecreaseVolume(int volume)
{
AudioCommon::DecreaseVolume(Core::System::GetInstance(), volume);
emit VolumeChanged(GetVolume());
}
bool Settings::IsLogVisible() const