diff --git a/Source/Project64-audio/Driver/SoundBase.cpp b/Source/Project64-audio/Driver/SoundBase.cpp index 4f00e7234..d16c0ab0c 100644 --- a/Source/Project64-audio/Driver/SoundBase.cpp +++ b/Source/Project64-audio/Driver/SoundBase.cpp @@ -33,6 +33,10 @@ void SoundDriverBase::AI_SetFrequency(uint32_t Frequency, uint32_t BufferSize) { SetFrequency(Frequency, BufferSize); m_MaxBufferSize = (BufferSize * 8); + if (m_MaxBufferSize > MAX_SIZE) + { + m_MaxBufferSize = MAX_SIZE; + } m_CurrentReadLoc = m_CurrentWriteLoc = m_BufferRemaining = 0; }