Skip to content

Commit

Permalink
YSF: fixed voice on indicator setting
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Oct 8, 2016
1 parent a263cdc commit 57c8760
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ysf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,32 @@ void DSDYSF::process() // just pass the frames for now
if (m_symbolIndex < 100)
{
processFICH(m_symbolIndex, dibit);

if (m_symbolIndex == 100 -1)
{
if (m_fich.getFrameInformation() == FICommunication)
{
switch (m_fich.getDataType())
{
case DTVoiceData1:
m_dsdDecoder->m_voice1On = true;
break;
case DTVoiceData2:
m_dsdDecoder->m_voice1On = true;
break;
case DTVoiceFullRate:
m_dsdDecoder->m_voice1On = true;
break;
default:
m_dsdDecoder->m_voice1On = false;
break;
}
}
else
{
m_dsdDecoder->m_voice1On = false;
}
}
}
else if (m_symbolIndex < 480 - 20) // frame is 480 dibits and sync is 20 dibits
{
Expand Down Expand Up @@ -231,6 +257,7 @@ void DSDYSF::process() // just pass the frames for now
}
else
{
m_dsdDecoder->m_voice1On = false;
m_dsdDecoder->resetFrameSync(); // end
return;
}
Expand Down

0 comments on commit 57c8760

Please sign in to comment.