diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index ae04cab0b917..ed38b1e3e29b 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -96,7 +96,7 @@ bool OpenALStream::Init() { if (!palcIsExtensionPresent(nullptr, "ALC_ENUMERATION_EXT")) { - PanicAlertT("OpenAL: can't find sound devices"); + PanicAlertFmtT("OpenAL: can't find sound devices"); return false; } @@ -106,7 +106,7 @@ bool OpenALStream::Init() ALCdevice* device = palcOpenDevice(default_device_dame); if (!device) { - PanicAlertT("OpenAL: can't open device %s", default_device_dame); + PanicAlertFmtT("OpenAL: can't open device {0}", default_device_dame); return false; } @@ -114,7 +114,7 @@ bool OpenALStream::Init() if (!context) { palcCloseDevice(device); - PanicAlertT("OpenAL: can't create context for device %s", default_device_dame); + PanicAlertFmtT("OpenAL: can't create context for device {0}", default_device_dame); return false; } diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp index 70cdc5aee9b2..e870c8a4870f 100644 --- a/Source/Core/AudioCommon/WaveFile.cpp +++ b/Source/Core/AudioCommon/WaveFile.cpp @@ -9,6 +9,7 @@ #include "Common/CommonTypes.h" #include "Common/File.h" #include "Common/FileUtil.h" +#include "Common/Logging/Log.h" #include "Common/MsgHandler.h" #include "Common/StringUtil.h" #include "Common/Swap.h" @@ -31,7 +32,7 @@ bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRa if (File::Exists(filename)) { if (SConfig::GetInstance().m_DumpAudioSilent || - AskYesNoT("Delete the existing file '%s'?", filename.c_str())) + AskYesNoFmtT("Delete the existing file '{0}'?", filename)) { File::Delete(filename); } @@ -45,17 +46,17 @@ bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRa // Check if the file is already open if (file) { - PanicAlertT("The file %s was already open, the file header will not be written.", - filename.c_str()); + PanicAlertFmtT("The file {0} was already open, the file header will not be written.", filename); return false; } file.Open(filename, "wb"); if (!file) { - PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened " - "by another program.", - filename.c_str()); + PanicAlertFmtT( + "The file {0} could not be opened for writing. Please check if it's already opened " + "by another program.", + filename); return false; } @@ -87,7 +88,7 @@ bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRa // We are now at offset 44 if (file.Tell() != 44) - PanicAlert("Wrong offset: %lld", (long long)file.Tell()); + PanicAlertFmt("Wrong offset: {}", file.Tell()); return true; } @@ -117,10 +118,10 @@ void WaveFileWriter::Write4(const char* ptr) void WaveFileWriter::AddStereoSamplesBE(const short* sample_data, u32 count, int sample_rate) { if (!file) - PanicAlertT("WaveFileWriter - file not open."); + ERROR_LOG_FMT(AUDIO, "WaveFileWriter - file not open."); if (count > BUFFER_SIZE * 2) - PanicAlert("WaveFileWriter - buffer too small (count = %u).", count); + ERROR_LOG_FMT(AUDIO, "WaveFileWriter - buffer too small (count = {}).", count); if (skip_silence) {