[Audio] Make sure m_MaxBufferSize is not bigger than MAX_SIZE
This commit is contained in:
parent
80c21b4d5a
commit
a3d32d5b46
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue