fix unlimited fps with tiny buffer

This commit is contained in:
Frank-74 2017-10-15 17:53:01 +01:00 committed by GitHub
parent f57e2f6bf7
commit 2686c98a85
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}