Misc: Replace log printf calls with fmt

This commit is contained in:
Stenzek
2024-05-23 20:20:16 +10:00
parent 49b2e76dea
commit b6d019db66
117 changed files with 1585 additions and 1615 deletions

View File

@ -57,7 +57,7 @@ bool WAVWriter::Open(const char* filename, u32 sample_rate, u32 num_channels)
if (!WriteHeader())
{
Log_ErrorPrintf("Failed to write header to file");
Log_ErrorPrint("Failed to write header to file");
m_sample_rate = 0;
m_num_channels = 0;
std::fclose(m_file);
@ -74,7 +74,7 @@ void WAVWriter::Close()
return;
if (std::fseek(m_file, 0, SEEK_SET) != 0 || !WriteHeader())
Log_ErrorPrintf("Failed to re-write header on file, file may be unplayable");
Log_ErrorPrint("Failed to re-write header on file, file may be unplayable");
std::fclose(m_file);
m_file = nullptr;
@ -88,7 +88,7 @@ void WAVWriter::WriteFrames(const s16* samples, u32 num_frames)
const u32 num_frames_written =
static_cast<u32>(std::fwrite(samples, sizeof(s16) * m_num_channels, num_frames, m_file));
if (num_frames_written != num_frames)
Log_ErrorPrintf("Only wrote %u of %u frames to output file", num_frames_written, num_frames);
Log_ErrorFmt("Only wrote {} of {} frames to output file", num_frames_written, num_frames);
m_num_frames += num_frames_written;
}