Merge pull request #1196 from Frank-74/patch-1
GetLength must be multiple of 8
This commit is contained in:
commit
b2317f2e19
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue