Merge pull request #1196 from Frank-74/patch-1

GetLength must be multiple of 8
This commit is contained in:
zilmar 2016-09-02 06:01:14 +10:00 committed by GitHub
commit b2317f2e19
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;
}
}