summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/WaveFile.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-11-26 21:36:49 -0500
committerLioncash <mathew1800@gmail.com>2020-11-27 10:10:11 -0500
commit56d233c47cde87ae36204f150b40220f9141f1b9 (patch)
tree32a3cadf76b01ff3ea2532fdd3ade54d79d409f0 /Source/Core/AudioCommon/WaveFile.cpp
parent9b03cdf93eec36ac10e95d1ff494ae41441e084e (diff)
AudioCommon: Convert alerts over to fmt-based variants
Continues the migration over to fmt Converts two panic alerts into error logs, since they aren't really things a user can do anything about.
Diffstat (limited to 'Source/Core/AudioCommon/WaveFile.cpp')
-rw-r--r--Source/Core/AudioCommon/WaveFile.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp
index 70cdc5aee9..e870c8a487 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)
{