Audio logging: actually use the audio backend sample rate when dumping HLE audio; this means that both sample rate settings now dump audio properly.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7161 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
675687bf3c
commit
1ad211b3ad
|
@ -70,7 +70,7 @@ public:
|
|||
virtual void StartLogAudio(const char *filename) {
|
||||
if (! m_logAudio) {
|
||||
m_logAudio = true;
|
||||
g_wave_writer.Start(filename);
|
||||
g_wave_writer.Start(filename, GetSampleRate());
|
||||
g_wave_writer.SetSkipSilence(false);
|
||||
NOTICE_LOG(DSPHLE, "Starting Audio logging");
|
||||
} else {
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
virtual void StartLogAudio(const char *filename) {
|
||||
if (! m_logAudio) {
|
||||
m_logAudio = true;
|
||||
g_wave_writer.Start(filename);
|
||||
g_wave_writer.Start(filename, m_mixer->GetSampleRate());
|
||||
g_wave_writer.SetSkipSilence(false);
|
||||
NOTICE_LOG(DSPHLE, "Starting Audio logging");
|
||||
} else {
|
||||
|
|
|
@ -34,7 +34,7 @@ WaveFileWriter::~WaveFileWriter()
|
|||
Stop();
|
||||
}
|
||||
|
||||
bool WaveFileWriter::Start(const char *filename)
|
||||
bool WaveFileWriter::Start(const char *filename, unsigned int HLESampleRate)
|
||||
{
|
||||
if (!conv_buffer)
|
||||
conv_buffer = new short[BUF_SIZE];
|
||||
|
@ -64,7 +64,7 @@ bool WaveFileWriter::Start(const char *filename)
|
|||
Write(16); // size of fmt block
|
||||
Write(0x00020001); //two channels, uncompressed
|
||||
|
||||
const u32 sample_rate = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE ? 48000 : 32000;
|
||||
const u32 sample_rate = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE ? HLESampleRate : 32000;
|
||||
Write(sample_rate);
|
||||
Write(sample_rate * 2 * 2); //two channels, 16bit
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
WaveFileWriter();
|
||||
~WaveFileWriter();
|
||||
|
||||
bool Start(const char *filename);
|
||||
bool Start(const char *filename, unsigned int HLESampleRate);
|
||||
void Stop();
|
||||
|
||||
void SetSkipSilence(bool skip) { skip_silence = skip; }
|
||||
|
|
Loading…
Reference in New Issue