mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Audio dumper: append filename with titleid and date-time
prevents overwrite of old file Co-authored-by: Megamouse <studienricky89@googlemail.com>
This commit is contained in:
parent
437f374bae
commit
0315781306
1 changed files with 9 additions and 1 deletions
|
@ -1,13 +1,21 @@
|
|||
#include "stdafx.h"
|
||||
#include "AudioDumper.h"
|
||||
|
||||
#include "Utilities/date_time.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
AudioDumper::AudioDumper(u16 ch)
|
||||
: m_header(ch)
|
||||
{
|
||||
if (GetCh())
|
||||
{
|
||||
m_output.open(fs::get_cache_dir() + "audio.wav", fs::rewrite);
|
||||
std::string path = fs::get_cache_dir() + "audio_";
|
||||
if (const std::string id = Emu.GetTitleID(); !id.empty())
|
||||
{
|
||||
path += id + "_";
|
||||
};
|
||||
path += date_time::current_time_narrow<'_'>() + ".wav";
|
||||
m_output.open(path, fs::rewrite);
|
||||
m_output.write(m_header); // write initial file header
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue