AudioCommon: Use left const for non-pointer variables

This commit is contained in:
Dentomologist
2026-03-23 16:30:30 -07:00
parent c05b231015
commit f5dfb7e3d3
6 changed files with 22 additions and 22 deletions

View File

@@ -168,7 +168,7 @@ bool OpenALStream::SetRunning(bool running)
static ALenum CheckALError(const char* desc)
{
ALenum const err = palGetError();
const ALenum err = palGetError();
if (err != AL_NO_ERROR)
{
@@ -211,16 +211,16 @@ void OpenALStream::SoundLoop()
{
Common::SetCurrentThreadName("Audio thread - openal");
bool const float32_capable = palIsExtensionPresent("AL_EXT_float32") != 0;
bool const surround_capable = palIsExtensionPresent("AL_EXT_MCFORMATS") || IsCreativeXFi();
const bool float32_capable = palIsExtensionPresent("AL_EXT_float32") != 0;
const bool 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 const fixed32_capable = IsCreativeXFi();
const bool fixed32_capable = IsCreativeXFi();
u32 const frequency = m_mixer->GetSampleRate();
const u32 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 const min_frames = frames_per_buffer;
const unsigned int min_frames = frames_per_buffer;
if (use_surround)
{
std::array<float, OAL_MAX_FRAMES * SURROUND_CHANNELS> dpl2;
u32 const rendered_frames = static_cast<u32>(m_mixer->MixSurround(dpl2.data(), min_frames));
const u32 rendered_frames = static_cast<u32>(m_mixer->MixSurround(dpl2.data(), min_frames));
if (rendered_frames < min_frames)
continue;
@@ -351,7 +351,7 @@ void OpenALStream::SoundLoop()
}
else
{
u32 const rendered_frames =
const u32 rendered_frames =
static_cast<u32>(m_mixer->Mix(m_realtime_buffer.data(), min_frames));
if (!rendered_frames)