Restructured IF statement
This commit is contained in:
parent
c970681595
commit
ac8a33a3be
|
@ -59,17 +59,20 @@ void CAudio::LenChanged ( void )
|
||||||
} else {
|
} else {
|
||||||
m_Status |= ai_busy;
|
m_Status |= ai_busy;
|
||||||
DWORD AudioLeft = g_SystemTimer->GetTimer(CSystemTimer::AiTimerInterrupt);
|
DWORD AudioLeft = g_SystemTimer->GetTimer(CSystemTimer::AiTimerInterrupt);
|
||||||
if (AudioLeft == 0 && m_SecondBuff == 0)
|
if (m_SecondBuff == 0)
|
||||||
{
|
{
|
||||||
WriteTraceF(TraceAudio,__FUNCTION__ ": Set Timer AI_LEN_REG: %d m_CountsPerByte: %d",g_Reg->AI_LEN_REG,m_CountsPerByte);
|
if (AudioLeft == 0)
|
||||||
g_SystemTimer->SetTimer(CSystemTimer::AiTimerInterrupt,g_Reg->AI_LEN_REG * m_CountsPerByte,false);
|
{
|
||||||
|
WriteTraceF(TraceAudio, __FUNCTION__ ": Set Timer AI_LEN_REG: %d m_CountsPerByte: %d", g_Reg->AI_LEN_REG, m_CountsPerByte);
|
||||||
|
g_SystemTimer->SetTimer(CSystemTimer::AiTimerInterrupt, g_Reg->AI_LEN_REG * m_CountsPerByte, false);
|
||||||
}
|
}
|
||||||
else if (m_SecondBuff == 0)
|
else
|
||||||
{
|
{
|
||||||
WriteTraceF(TraceAudio,__FUNCTION__ ": Increasing Second Buffer (m_SecondBuff %d Increase: %d)",m_SecondBuff,g_Reg->AI_LEN_REG);
|
WriteTraceF(TraceAudio, __FUNCTION__ ": Increasing Second Buffer (m_SecondBuff %d Increase: %d)", m_SecondBuff, g_Reg->AI_LEN_REG);
|
||||||
m_SecondBuff += g_Reg->AI_LEN_REG;
|
m_SecondBuff += g_Reg->AI_LEN_REG;
|
||||||
m_Status |= ai_full;
|
m_Status |= ai_full;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_Notify->BreakPoint(__FILEW__, __LINE__);
|
g_Notify->BreakPoint(__FILEW__, __LINE__);
|
||||||
|
|
Loading…
Reference in New Issue