mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
AudioCommon: Remove unused qualifiers and make variables constant
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user