diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-06-19 02:18:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-19 02:18:30 +0200 |
| commit | 5d7b5822c97285a1b45f54b2ae8046808cbe54d2 (patch) | |
| tree | 341d0c17ea3ea9e364cac57ebb1b86270e904528 /Source/Core/AudioCommon/WaveFile.cpp | |
| parent | 9e06b6964b04829d526609b3cf98bca58f80c318 (diff) | |
| parent | ffabb6c57b59c6ceafd154681c2cde1bd1a65904 (diff) | |
Merge pull request #11972 from Minty-Meeo/string-improvements-part-1c
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; } |
