diff --git a/Source/Project64/N64 System/Mips/Audio.cpp b/Source/Project64/N64 System/Mips/Audio.cpp index 4ebd135d8..d0ef23e3b 100644 --- a/Source/Project64/N64 System/Mips/Audio.cpp +++ b/Source/Project64/N64 System/Mips/Audio.cpp @@ -38,13 +38,18 @@ void CAudio::LenChanged ( void ) WriteTraceF(TraceAudio,__FUNCTION__ ": _Reg->AI_LEN_REG = %d",_Reg->AI_LEN_REG); if (_Reg->AI_LEN_REG != 0) { - if (GetLength() == 0) + if (_Reg->AI_LEN_REG > 0x8000) { - WriteTraceF(TraceAudio,__FUNCTION__ ": Set Timer AI_LEN_REG: %d m_CountsPerByte: %d",_Reg->AI_LEN_REG,m_CountsPerByte); - _SystemTimer->SetTimer(CSystemTimer::AiTimer,_Reg->AI_LEN_REG * m_CountsPerByte,false); + WriteTraceF(TraceAudio,__FUNCTION__ ": Ignoring Write, To Large (%X)",_Reg->AI_LEN_REG); } else { - m_SecondBuff = _Reg->AI_LEN_REG; - m_Status |= 0x80000000; + if (GetLength() == 0) + { + WriteTraceF(TraceAudio,__FUNCTION__ ": Set Timer AI_LEN_REG: %d m_CountsPerByte: %d",_Reg->AI_LEN_REG,m_CountsPerByte); + _SystemTimer->SetTimer(CSystemTimer::AiTimer,_Reg->AI_LEN_REG * m_CountsPerByte,false); + } else { + m_SecondBuff = _Reg->AI_LEN_REG; + m_Status |= 0x80000000; + } } } else { _SystemTimer->StopTimer(CSystemTimer::AiTimer);