GetLength must be multiple of 8

According to LaC's n64 hardware dox, the AI_LEN_REG must be a multiple of 8 not 4.
This commit is contained in:
Frank-74 2016-09-01 16:28:23 +01:00 committed by GitHub
parent 286f184a34
commit f24c464f3f
1 changed files with 3 additions and 3 deletions

View File

@ -38,10 +38,10 @@ uint32_t CAudio::GetLength()
uint32_t TimeLeft = g_SystemTimer->GetTimer(CSystemTimer::AiTimerInterrupt), Res = 0;
if (TimeLeft > 0)
{
Res = (TimeLeft / m_CountsPerByte);
Res = (TimeLeft / m_CountsPerByte)&~7;
}
WriteTrace(TraceAudio, TraceDebug, "Done (res = %d, TimeLeft = %d)", Res, TimeLeft);
return (Res + 3)&~3;
return Res;
}
uint32_t CAudio::GetStatus()
@ -157,4 +157,4 @@ void CAudio::SetFrequency(uint32_t Dacrate, uint32_t System)
//m_BytesPerSecond = 128024;
m_FramesPerSecond = System == SYSTEM_PAL ? 50 : 60;
}
}