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/OpenALStream.cpp | |
| parent | 2e22a3cf425caae0a3cb52cc4deca7008209955f (diff) | |
AudioCommon: Remove unused qualifiers and make variables constant
Diffstat (limited to 'Source/Core/AudioCommon/OpenALStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/OpenALStream.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index 31ae9b047e..a059d428c0 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -76,7 +76,7 @@ static bool InitLibrary() if (!InitFunctions()) { - ::FreeLibrary(s_openal_dll); + FreeLibrary(s_openal_dll); s_openal_dll = nullptr; return false; } @@ -168,7 +168,7 @@ bool OpenALStream::SetRunning(bool running) static ALenum CheckALError(const char* desc) { - ALenum err = palGetError(); + ALenum const err = palGetError(); if (err != AL_NO_ERROR) { @@ -211,16 +211,16 @@ void OpenALStream::SoundLoop() { Common::SetCurrentThreadName("Audio thread - openal"); - bool float32_capable = palIsExtensionPresent("AL_EXT_float32") != 0; - bool surround_capable = palIsExtensionPresent("AL_EXT_MCFORMATS") || IsCreativeXFi(); + bool const float32_capable = palIsExtensionPresent("AL_EXT_float32") != 0; + bool const surround_capable = palIsExtensionPresent("AL_EXT_MCFORMATS") || IsCreativeXFi(); bool use_surround = Config::ShouldUseDPL2Decoder() && surround_capable; // As there is no extension to check for 32-bit fixed point support // and we know that only a X-Fi with hardware OpenAL supports it, // we just check if one is being used. - bool fixed32_capable = IsCreativeXFi(); + bool const fixed32_capable = IsCreativeXFi(); - u32 frequency = m_mixer->GetSampleRate(); + u32 const frequency = m_mixer->GetSampleRate(); u32 frames_per_buffer; // Can't have zero samples per buffer @@ -288,12 +288,12 @@ void OpenALStream::SoundLoop() num_buffers_queued -= num_buffers_processed; } - unsigned int min_frames = frames_per_buffer; + unsigned int const min_frames = frames_per_buffer; if (use_surround) { std::array<float, OAL_MAX_FRAMES * SURROUND_CHANNELS> dpl2; - u32 rendered_frames = static_cast<u32>(m_mixer->MixSurround(dpl2.data(), min_frames)); + u32 const rendered_frames = static_cast<u32>(m_mixer->MixSurround(dpl2.data(), min_frames)); if (rendered_frames < min_frames) continue; @@ -351,7 +351,8 @@ void OpenALStream::SoundLoop() } else { - u32 rendered_frames = static_cast<u32>(m_mixer->Mix(m_realtime_buffer.data(), min_frames)); + u32 const rendered_frames = + static_cast<u32>(m_mixer->Mix(m_realtime_buffer.data(), min_frames)); if (!rendered_frames) continue; |
