diff options
| author | Dr. Dystopia <jonis9898@hotmail.com> | 2025-05-22 11:28:52 +0200 |
|---|---|---|
| committer | Dr. Dystopia <jonis9898@hotmail.com> | 2025-05-30 21:48:38 +0200 |
| commit | a6b04f53e09810d4a9a1db37c23636889e54dfbe (patch) | |
| tree | a32e31bfb3f578648c1b907bb693ea6f0bf22eaa /Source/Core/AudioCommon/AudioCommon.cpp | |
| parent | 2e22a3cf425caae0a3cb52cc4deca7008209955f (diff) | |
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); } |
