diff options
| author | Léo Lam <leo@leolam.fr> | 2020-11-28 16:33:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-28 16:33:50 +0100 |
| commit | a34f19cb9609424c743e82ebb1e33005aef6b724 (patch) | |
| tree | 9a4f6bc8502af0427edccf1ceb13c0bffcff8da8 /Source/Core/AudioCommon/WaveFile.cpp | |
| parent | 5a554e8e5dcb6623fcbfbe3066cafb0892e74e51 (diff) | |
| parent | 56d233c47cde87ae36204f150b40220f9141f1b9 (diff) | |
Merge pull request #9291 from lioncash/alert-audio
AudioCommon: Convert alerts over to fmt-based variants
Diffstat (limited to 'Source/Core/AudioCommon/WaveFile.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/WaveFile.cpp | 19 |
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) { |
