From 3f78d74fc111c7633d06b302aa154e3433b926d8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 9 Aug 2015 21:36:00 -0400 Subject: [PATCH 1/2] AudioCommon: Log to AUDIO, not DSPHLE This code is not related to DSPHLE. --- Source/Core/AudioCommon/AudioCommon.cpp | 6 +++--- Source/Core/AudioCommon/Mixer.cpp | 16 ++++++++-------- Source/Core/AudioCommon/SoundStream.h | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index f5438faca9..5e7005cad1 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -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(); } @@ -84,7 +84,7 @@ namespace AudioCommon void ShutdownSoundStream() { - INFO_LOG(DSPHLE, "Shutting down sound stream"); + INFO_LOG(AUDIO, "Shutting down sound stream"); if (g_sound_stream) { @@ -95,7 +95,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 GetSoundBackends() diff --git a/Source/Core/AudioCommon/Mixer.cpp b/Source/Core/AudioCommon/Mixer.cpp index dbf7167bb4..d582f5596f 100644 --- a/Source/Core/AudioCommon/Mixer.cpp +++ b/Source/Core/AudioCommon/Mixer.cpp @@ -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"); } } diff --git a/Source/Core/AudioCommon/SoundStream.h b/Source/Core/AudioCommon/SoundStream.h index 18b1f6ba2e..510a3a5af0 100644 --- a/Source/Core/AudioCommon/SoundStream.h +++ b/Source/Core/AudioCommon/SoundStream.h @@ -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"); } } }; From 4c6930d36c9daa098ee58898f62c427d8b020d26 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 9 Aug 2015 21:37:34 -0400 Subject: [PATCH 2/2] AudioCommon: Remove unused code from XAudio streams --- Source/Core/AudioCommon/XAudio2Stream.cpp | 15 --------------- Source/Core/AudioCommon/XAudio2Stream.h | 1 - Source/Core/AudioCommon/XAudio2_7Stream.cpp | 15 --------------- Source/Core/AudioCommon/XAudio2_7Stream.h | 1 - 4 files changed, 32 deletions(-) diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index 6e8762b4e9..d5e0595802 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -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; diff --git a/Source/Core/AudioCommon/XAudio2Stream.h b/Source/Core/AudioCommon/XAudio2Stream.h index 5db92ef907..5561c4af91 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.h +++ b/Source/Core/AudioCommon/XAudio2Stream.h @@ -57,7 +57,6 @@ public: bool Start() override; void Stop() override; - void Update() override; void Clear(bool mute) override; void SetVolume(int volume) override; diff --git a/Source/Core/AudioCommon/XAudio2_7Stream.cpp b/Source/Core/AudioCommon/XAudio2_7Stream.cpp index 853bc2289e..9541476798 100644 --- a/Source/Core/AudioCommon/XAudio2_7Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2_7Stream.cpp @@ -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; diff --git a/Source/Core/AudioCommon/XAudio2_7Stream.h b/Source/Core/AudioCommon/XAudio2_7Stream.h index e1eccbdbdf..e47ebbd39c 100644 --- a/Source/Core/AudioCommon/XAudio2_7Stream.h +++ b/Source/Core/AudioCommon/XAudio2_7Stream.h @@ -64,7 +64,6 @@ public: bool Start() override; void Stop() override; - void Update() override; void Clear(bool mute) override; void SetVolume(int volume) override;