Merge pull request #2825 from lioncash/log

AudioCommon: Log to AUDIO, not DSPHLE
This commit is contained in:
Markus Wick 2015-08-10 10:25:51 +02:00
commit e297e3e666
7 changed files with 15 additions and 47 deletions

View File

@ -57,7 +57,7 @@ namespace AudioCommon
if (!g_sound_stream && NullSound::isValid())
{
WARN_LOG(DSPHLE, "Could not initialize backend %s, using %s instead.",
WARN_LOG(AUDIO, "Could not initialize backend %s, using %s instead.",
backend.c_str(), BACKEND_NULLSOUND);
g_sound_stream = new NullSound();
}
@ -89,7 +89,7 @@ namespace AudioCommon
void ShutdownSoundStream()
{
INFO_LOG(DSPHLE, "Shutting down sound stream");
INFO_LOG(AUDIO, "Shutting down sound stream");
if (g_sound_stream)
{
@ -100,7 +100,7 @@ namespace AudioCommon
g_sound_stream = nullptr;
}
INFO_LOG(DSPHLE, "Done shutting down sound stream");
INFO_LOG(AUDIO, "Done shutting down sound stream");
}
std::vector<std::string> GetSoundBackends()

View File

@ -210,11 +210,11 @@ void CMixer::StartLogDTKAudio(const std::string& filename)
m_log_dtk_audio = true;
m_wave_writer_dtk.Start(filename, 48000);
m_wave_writer_dtk.SetSkipSilence(false);
NOTICE_LOG(DSPHLE, "Starting DTK Audio logging");
NOTICE_LOG(AUDIO, "Starting DTK Audio logging");
}
else
{
WARN_LOG(DSPHLE, "DTK Audio logging has already been started");
WARN_LOG(AUDIO, "DTK Audio logging has already been started");
}
}
@ -224,11 +224,11 @@ void CMixer::StopLogDTKAudio()
{
m_log_dtk_audio = false;
m_wave_writer_dtk.Stop();
NOTICE_LOG(DSPHLE, "Stopping DTK Audio logging");
NOTICE_LOG(AUDIO, "Stopping DTK Audio logging");
}
else
{
WARN_LOG(DSPHLE, "DTK Audio logging has already been stopped");
WARN_LOG(AUDIO, "DTK Audio logging has already been stopped");
}
}
@ -239,11 +239,11 @@ void CMixer::StartLogDSPAudio(const std::string& filename)
m_log_dsp_audio = true;
m_wave_writer_dsp.Start(filename, 32000);
m_wave_writer_dsp.SetSkipSilence(false);
NOTICE_LOG(DSPHLE, "Starting DSP Audio logging");
NOTICE_LOG(AUDIO, "Starting DSP Audio logging");
}
else
{
WARN_LOG(DSPHLE, "DSP Audio logging has already been started");
WARN_LOG(AUDIO, "DSP Audio logging has already been started");
}
}
@ -253,11 +253,11 @@ void CMixer::StopLogDSPAudio()
{
m_log_dsp_audio = false;
m_wave_writer_dsp.Stop();
NOTICE_LOG(DSPHLE, "Stopping DSP Audio logging");
NOTICE_LOG(AUDIO, "Stopping DSP Audio logging");
}
else
{
WARN_LOG(DSPHLE, "DSP Audio logging has already been stopped");
WARN_LOG(AUDIO, "DSP Audio logging has already been stopped");
}
}

View File

@ -39,11 +39,11 @@ public:
m_logAudio = true;
g_wave_writer.Start(filename, m_mixer->GetSampleRate());
g_wave_writer.SetSkipSilence(false);
NOTICE_LOG(DSPHLE, "Starting Audio logging");
NOTICE_LOG(AUDIO, "Starting Audio logging");
}
else
{
WARN_LOG(DSPHLE, "Audio logging already started");
WARN_LOG(AUDIO, "Audio logging already started");
}
}
@ -53,11 +53,11 @@ public:
{
m_logAudio = false;
g_wave_writer.Stop();
NOTICE_LOG(DSPHLE, "Stopping Audio logging");
NOTICE_LOG(AUDIO, "Stopping Audio logging");
}
else
{
WARN_LOG(DSPHLE, "Audio logging already stopped");
WARN_LOG(AUDIO, "Audio logging already stopped");
}
}
};

View File

@ -210,21 +210,6 @@ void XAudio2::SetVolume(int volume)
m_mastering_voice->SetVolume(m_volume);
}
void XAudio2::Update()
{
//m_sound_sync_event.Set();
//static int xi = 0;
//if (100000 == ++xi)
//{
// xi = 0;
// XAUDIO2_PERFORMANCE_DATA perfData;
// pXAudio2->GetPerformanceData(&perfData);
// NOTICE_LOG(DSPHLE, "XAudio2 latency (samples): %i", perfData.CurrentLatencyInSamples);
// NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted);
//}
}
void XAudio2::Clear(bool mute)
{
m_muted = mute;

View File

@ -57,7 +57,6 @@ public:
bool Start() override;
void Stop() override;
void Update() override;
void Clear(bool mute) override;
void SetVolume(int volume) override;

View File

@ -198,21 +198,6 @@ void XAudio2_7::SetVolume(int volume)
m_mastering_voice->SetVolume(m_volume);
}
void XAudio2_7::Update()
{
//m_sound_sync_event.Set();
//static int xi = 0;
//if (100000 == ++xi)
//{
// xi = 0;
// XAUDIO2_PERFORMANCE_DATA perfData;
// pXAudio2->GetPerformanceData(&perfData);
// NOTICE_LOG(DSPHLE, "XAudio2_7 latency (samples): %i", perfData.CurrentLatencyInSamples);
// NOTICE_LOG(DSPHLE, "XAudio2_7 total glitches: %i", perfData.GlitchesSinceEngineStarted);
//}
}
void XAudio2_7::Clear(bool mute)
{
m_muted = mute;

View File

@ -64,7 +64,6 @@ public:
bool Start() override;
void Stop() override;
void Update() override;
void Clear(bool mute) override;
void SetVolume(int volume) override;