diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-06-07 17:45:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-07 17:45:33 -0500 |
| commit | a07a2fe398146fa9acf2891818dc418dfbd7a357 (patch) | |
| tree | 145f0d9b6e9cf0a1682b7d6cef2949e18dda0b33 /Source/Core/AudioCommon/AudioCommon.cpp | |
| parent | 52fcdde4852ccab197092da37b00548e33844d85 (diff) | |
| parent | a6b04f53e09810d4a9a1db37c23636889e54dfbe (diff) | |
Merge pull request #13698 from tygyh/AudioCommon/Remove-unused-qualifiers-and-make-variables-constant
AudioCommon: Remove unused qualifiers and make variables constant
Diffstat (limited to 'Source/Core/AudioCommon/AudioCommon.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/AudioCommon.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index de046a9aab..bc1efe01d4 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -166,7 +166,8 @@ void UpdateSoundStream(Core::System& system) if (sound_stream) { - int volume = Config::Get(Config::MAIN_AUDIO_MUTED) ? 0 : Config::Get(Config::MAIN_AUDIO_VOLUME); + int const volume = + Config::Get(Config::MAIN_AUDIO_MUTED) ? 0 : Config::Get(Config::MAIN_AUDIO_VOLUME); sound_stream->SetVolume(volume); } } @@ -192,7 +193,7 @@ void SetSoundStreamRunning(Core::System& system, bool running) void SendAIBuffer(Core::System& system, const short* samples, unsigned int num_samples) { - SoundStream* sound_stream = system.GetSoundStream(); + const SoundStream* const sound_stream = system.GetSoundStream(); if (!sound_stream) return; @@ -212,9 +213,9 @@ void SendAIBuffer(Core::System& system, const short* samples, unsigned int num_s void StartAudioDump(Core::System& system) { - SoundStream* sound_stream = system.GetSoundStream(); + const SoundStream* const sound_stream = system.GetSoundStream(); - std::time_t start_time = std::time(nullptr); + std::time_t const start_time = std::time(nullptr); std::string path_prefix = File::GetUserPath(D_DUMPAUDIO_IDX) + SConfig::GetInstance().GetGameID(); @@ -232,7 +233,7 @@ void StartAudioDump(Core::System& system) void StopAudioDump(Core::System& system) { - SoundStream* sound_stream = system.GetSoundStream(); + const SoundStream* const sound_stream = system.GetSoundStream(); if (!sound_stream) return; @@ -265,7 +266,7 @@ void DecreaseVolume(Core::System& system, unsigned short offset) void ToggleMuteVolume(Core::System& system) { - bool isMuted = Config::Get(Config::MAIN_AUDIO_MUTED); + bool const isMuted = Config::Get(Config::MAIN_AUDIO_MUTED); Config::SetBaseOrCurrent(Config::MAIN_AUDIO_MUTED, !isMuted); UpdateSoundStream(system); } |
