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/OpenALStream.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/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; |
