AudioCommon: Migrate logging over to fmt

printf specifiers, begone!
This commit is contained in:
Lioncash
2020-10-21 13:32:25 -04:00
parent 09e87b79f1
commit 22a79289d3
9 changed files with 69 additions and 70 deletions

View File

@ -101,7 +101,7 @@ bool OpenALStream::Init()
}
const char* default_device_dame = palcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER);
INFO_LOG(AUDIO, "Found OpenAL device %s", default_device_dame);
INFO_LOG_FMT(AUDIO, "Found OpenAL device {}", default_device_dame);
ALCdevice* device = palcOpenDevice(default_device_dame);
if (!device)
@ -204,7 +204,7 @@ static ALenum CheckALError(const char* desc)
break;
}
ERROR_LOG(AUDIO, "Error %s: %08x %s", desc, err, type.c_str());
ERROR_LOG_FMT(AUDIO, "Error {}: {:08x} {}", desc, err, type);
}
return err;
@ -246,8 +246,8 @@ void OpenALStream::SoundLoop()
frames_per_buffer = OAL_MAX_FRAMES;
}
INFO_LOG(AUDIO, "Using %d buffers, each with %d audio frames for a total of %d.", OAL_BUFFERS,
frames_per_buffer, frames_per_buffer * OAL_BUFFERS);
INFO_LOG_FMT(AUDIO, "Using {} buffers, each with {} audio frames for a total of {}.", OAL_BUFFERS,
frames_per_buffer, frames_per_buffer * OAL_BUFFERS);
// Should we make these larger just in case the mixer ever sends more samples
// than what we request?
@ -352,8 +352,8 @@ void OpenALStream::SoundLoop()
if (err == AL_INVALID_ENUM)
{
// 5.1 is not supported by the host, fallback to stereo
WARN_LOG(AUDIO,
"Unable to set 5.1 surround mode. Updating OpenAL Soft might fix this issue.");
WARN_LOG_FMT(
AUDIO, "Unable to set 5.1 surround mode. Updating OpenAL Soft might fix this issue.");
use_surround = false;
}
}