Ignore large (negative) audio DMA buffer
This commit is contained in:
parent
5b67891d9e
commit
4a3fb18f6a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue