From 2686c98a8515c9a3ca06b32d22bb3cd7ef6dc6e6 Mon Sep 17 00:00:00 2001 From: Frank-74 Date: Sun, 15 Oct 2017 17:53:01 +0100 Subject: [PATCH] fix unlimited fps with tiny buffer --- Source/Project64-audio/Driver/SoundBase.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Project64-audio/Driver/SoundBase.cpp b/Source/Project64-audio/Driver/SoundBase.cpp index db5d2f8fb..26bf84cff 100644 --- a/Source/Project64-audio/Driver/SoundBase.cpp +++ b/Source/Project64-audio/Driver/SoundBase.cpp @@ -38,6 +38,10 @@ void SoundDriverBase::AI_SetFrequency(uint32_t Frequency, uint32_t BufferSize) { SetFrequency(Frequency, BufferSize); m_MaxBufferSize = (BufferSize * 4); + if (g_settings->TinyBuffer() == true) + { + m_MaxBufferSize = m_MaxBufferSize * 2; + ] m_BufferRemaining = 0; m_CurrentReadLoc = m_CurrentWriteLoc = m_BufferRemaining = 0; }