diff options
| author | get <45425365+Minty-Meeo@users.noreply.github.com> | 2023-06-17 19:23:49 -0500 |
|---|---|---|
| committer | get <45425365+Minty-Meeo@users.noreply.github.com> | 2023-06-18 18:37:32 -0500 |
| commit | ffabb6c57b59c6ceafd154681c2cde1bd1a65904 (patch) | |
| tree | 05eb0486ca6620cdd18af9b65000bfa5be6ad104 /Source/Core/AudioCommon/WaveFile.cpp | |
| parent | 44498872e9dbf0c3d14397df2b4255ac2efe0f11 (diff) | |
Replace std::ostringstream usage with fmt::format
Diffstat (limited to 'Source/Core/AudioCommon/WaveFile.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/WaveFile.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp index 2e67d86519..b2345aca59 100644 --- a/Source/Core/AudioCommon/WaveFile.cpp +++ b/Source/Core/AudioCommon/WaveFile.cpp @@ -6,6 +6,8 @@ #include <string> +#include <fmt/format.h> + #include "Common/CommonTypes.h" #include "Common/FileUtil.h" #include "Common/IOFile.h" @@ -159,9 +161,9 @@ void WaveFileWriter::AddStereoSamplesBE(const short* sample_data, u32 count, { Stop(); file_index++; - std::ostringstream filename; - filename << File::GetUserPath(D_DUMPAUDIO_IDX) << basename << file_index << ".wav"; - Start(filename.str(), sample_rate_divisor); + const std::string filename = + fmt::format("{}{}{}.wav", File::GetUserPath(D_DUMPAUDIO_IDX), basename, file_index); + Start(filename, sample_rate_divisor); current_sample_rate_divisor = sample_rate_divisor; } |
