From 6d7c2e09a8e469f3a9badad2b72f755bb3b45174 Mon Sep 17 00:00:00 2001 From: Frank-74 Date: Wed, 16 Jan 2019 22:53:49 +0000 Subject: [PATCH 1/2] [Project64-Audio] Fix clicks with Sync using audio OFF --- Source/Project64-audio/Driver/SoundBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Project64-audio/Driver/SoundBase.cpp b/Source/Project64-audio/Driver/SoundBase.cpp index 15a41aff4..7c25ae025 100644 --- a/Source/Project64-audio/Driver/SoundBase.cpp +++ b/Source/Project64-audio/Driver/SoundBase.cpp @@ -51,7 +51,7 @@ void SoundDriverBase::AI_LenChanged(uint8_t *start, uint32_t length) WriteTrace(TraceAudioDriver, TraceDebug, "Start"); // Bleed off some of this buffer to smooth out audio - if (length < m_MaxBufferSize && g_settings->SyncAudio()) + if (g_settings->SyncAudio() || !g_settings->FullSpeed()) { while ((m_BufferRemaining) == m_MaxBufferSize) { From 57884f1091cdb103e2825bdbc6497d14015e1e55 Mon Sep 17 00:00:00 2001 From: Frank-74 Date: Wed, 16 Jan 2019 22:57:35 +0000 Subject: [PATCH 2/2] [Project64-Audio] Fix sync using audio toggle Fixes running unlimited if turning sync using audio off while a game is running. --- Source/Project64-audio/AudioSettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Project64-audio/AudioSettings.cpp b/Source/Project64-audio/AudioSettings.cpp index 798e9d0aa..b136e79d3 100644 --- a/Source/Project64-audio/AudioSettings.cpp +++ b/Source/Project64-audio/AudioSettings.cpp @@ -163,7 +163,7 @@ void CSettings::ReadSettings(void) m_FPSBuffer = GetSetting(Set_FPSBuffer) != 0; m_FullSpeed = m_Set_FullSpeed ? GetSystemSetting(m_Set_FullSpeed) != 0 : false; - m_SyncAudio = ((!m_advanced_options || bLimitFPS) && SyncAudio && m_FullSpeed); + m_SyncAudio = ((!m_advanced_options || bLimitFPS); if (m_Set_log_dir != 0) {