Merge pull request #2825 from lioncash/log
AudioCommon: Log to AUDIO, not DSPHLE
This commit is contained in:
commit
e297e3e666
|
@ -57,7 +57,7 @@ namespace AudioCommon
|
||||||
|
|
||||||
if (!g_sound_stream && NullSound::isValid())
|
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);
|
backend.c_str(), BACKEND_NULLSOUND);
|
||||||
g_sound_stream = new NullSound();
|
g_sound_stream = new NullSound();
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace AudioCommon
|
||||||
|
|
||||||
void ShutdownSoundStream()
|
void ShutdownSoundStream()
|
||||||
{
|
{
|
||||||
INFO_LOG(DSPHLE, "Shutting down sound stream");
|
INFO_LOG(AUDIO, "Shutting down sound stream");
|
||||||
|
|
||||||
if (g_sound_stream)
|
if (g_sound_stream)
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ namespace AudioCommon
|
||||||
g_sound_stream = nullptr;
|
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()
|
std::vector<std::string> GetSoundBackends()
|
||||||
|
|
|
@ -210,11 +210,11 @@ void CMixer::StartLogDTKAudio(const std::string& filename)
|
||||||
m_log_dtk_audio = true;
|
m_log_dtk_audio = true;
|
||||||
m_wave_writer_dtk.Start(filename, 48000);
|
m_wave_writer_dtk.Start(filename, 48000);
|
||||||
m_wave_writer_dtk.SetSkipSilence(false);
|
m_wave_writer_dtk.SetSkipSilence(false);
|
||||||
NOTICE_LOG(DSPHLE, "Starting DTK Audio logging");
|
NOTICE_LOG(AUDIO, "Starting DTK Audio logging");
|
||||||
}
|
}
|
||||||
else
|
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_log_dtk_audio = false;
|
||||||
m_wave_writer_dtk.Stop();
|
m_wave_writer_dtk.Stop();
|
||||||
NOTICE_LOG(DSPHLE, "Stopping DTK Audio logging");
|
NOTICE_LOG(AUDIO, "Stopping DTK Audio logging");
|
||||||
}
|
}
|
||||||
else
|
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_log_dsp_audio = true;
|
||||||
m_wave_writer_dsp.Start(filename, 32000);
|
m_wave_writer_dsp.Start(filename, 32000);
|
||||||
m_wave_writer_dsp.SetSkipSilence(false);
|
m_wave_writer_dsp.SetSkipSilence(false);
|
||||||
NOTICE_LOG(DSPHLE, "Starting DSP Audio logging");
|
NOTICE_LOG(AUDIO, "Starting DSP Audio logging");
|
||||||
}
|
}
|
||||||
else
|
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_log_dsp_audio = false;
|
||||||
m_wave_writer_dsp.Stop();
|
m_wave_writer_dsp.Stop();
|
||||||
NOTICE_LOG(DSPHLE, "Stopping DSP Audio logging");
|
NOTICE_LOG(AUDIO, "Stopping DSP Audio logging");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WARN_LOG(DSPHLE, "DSP Audio logging has already been stopped");
|
WARN_LOG(AUDIO, "DSP Audio logging has already been stopped");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,11 @@ public:
|
||||||
m_logAudio = true;
|
m_logAudio = true;
|
||||||
g_wave_writer.Start(filename, m_mixer->GetSampleRate());
|
g_wave_writer.Start(filename, m_mixer->GetSampleRate());
|
||||||
g_wave_writer.SetSkipSilence(false);
|
g_wave_writer.SetSkipSilence(false);
|
||||||
NOTICE_LOG(DSPHLE, "Starting Audio logging");
|
NOTICE_LOG(AUDIO, "Starting Audio logging");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WARN_LOG(DSPHLE, "Audio logging already started");
|
WARN_LOG(AUDIO, "Audio logging already started");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,11 +53,11 @@ public:
|
||||||
{
|
{
|
||||||
m_logAudio = false;
|
m_logAudio = false;
|
||||||
g_wave_writer.Stop();
|
g_wave_writer.Stop();
|
||||||
NOTICE_LOG(DSPHLE, "Stopping Audio logging");
|
NOTICE_LOG(AUDIO, "Stopping Audio logging");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WARN_LOG(DSPHLE, "Audio logging already stopped");
|
WARN_LOG(AUDIO, "Audio logging already stopped");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -210,21 +210,6 @@ void XAudio2::SetVolume(int volume)
|
||||||
m_mastering_voice->SetVolume(m_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)
|
void XAudio2::Clear(bool mute)
|
||||||
{
|
{
|
||||||
m_muted = mute;
|
m_muted = mute;
|
||||||
|
|
|
@ -57,7 +57,6 @@ public:
|
||||||
bool Start() override;
|
bool Start() override;
|
||||||
void Stop() override;
|
void Stop() override;
|
||||||
|
|
||||||
void Update() override;
|
|
||||||
void Clear(bool mute) override;
|
void Clear(bool mute) override;
|
||||||
void SetVolume(int volume) override;
|
void SetVolume(int volume) override;
|
||||||
|
|
||||||
|
|
|
@ -198,21 +198,6 @@ void XAudio2_7::SetVolume(int volume)
|
||||||
m_mastering_voice->SetVolume(m_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)
|
void XAudio2_7::Clear(bool mute)
|
||||||
{
|
{
|
||||||
m_muted = mute;
|
m_muted = mute;
|
||||||
|
|
|
@ -64,7 +64,6 @@ public:
|
||||||
bool Start() override;
|
bool Start() override;
|
||||||
void Stop() override;
|
void Stop() override;
|
||||||
|
|
||||||
void Update() override;
|
|
||||||
void Clear(bool mute) override;
|
void Clear(bool mute) override;
|
||||||
void SetVolume(int volume) override;
|
void SetVolume(int volume) override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue