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:
parent
286f184a34
commit
f24c464f3f
|
@ -38,10 +38,10 @@ uint32_t CAudio::GetLength()
|
||||||
uint32_t TimeLeft = g_SystemTimer->GetTimer(CSystemTimer::AiTimerInterrupt), Res = 0;
|
uint32_t TimeLeft = g_SystemTimer->GetTimer(CSystemTimer::AiTimerInterrupt), Res = 0;
|
||||||
if (TimeLeft > 0)
|
if (TimeLeft > 0)
|
||||||
{
|
{
|
||||||
Res = (TimeLeft / m_CountsPerByte);
|
Res = (TimeLeft / m_CountsPerByte)&~7;
|
||||||
}
|
}
|
||||||
WriteTrace(TraceAudio, TraceDebug, "Done (res = %d, TimeLeft = %d)", Res, TimeLeft);
|
WriteTrace(TraceAudio, TraceDebug, "Done (res = %d, TimeLeft = %d)", Res, TimeLeft);
|
||||||
return (Res + 3)&~3;
|
return Res;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t CAudio::GetStatus()
|
uint32_t CAudio::GetStatus()
|
||||||
|
@ -157,4 +157,4 @@ void CAudio::SetFrequency(uint32_t Dacrate, uint32_t System)
|
||||||
//m_BytesPerSecond = 128024;
|
//m_BytesPerSecond = 128024;
|
||||||
|
|
||||||
m_FramesPerSecond = System == SYSTEM_PAL ? 50 : 60;
|
m_FramesPerSecond = System == SYSTEM_PAL ? 50 : 60;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue