Allow for excluded TGs.

This commit is contained in:
Jonathan Naylor
2020-04-07 23:03:27 +01:00
parent efed75f160
commit 6b470c92a7
10 changed files with 178 additions and 66 deletions

View File

@@ -35,11 +35,11 @@ const unsigned char COLOR_CODE = 3U;
const unsigned int SILENCE_LENGTH = 9U;
const unsigned int AMBE_LENGTH = 9U;
CDynVoice::CDynVoice(const std::string& directory, const std::string& language, unsigned int id) :
CDynVoice::CDynVoice(const std::string& directory, const std::string& language, unsigned int id, unsigned int slot, unsigned int tg) :
m_indxFile(),
m_ambeFile(),
m_id(id),
m_slot(0U),
m_slot(slot),
m_lc(),
m_embeddedLC(),
m_status(DYNVS_NONE),
@@ -60,6 +60,12 @@ m_it()
m_indxFile = directory + "/" + language + ".indx";
m_ambeFile = directory + "/" + language + ".ambe";
#endif
m_lc.setFLCO(FLCO_GROUP);
m_lc.setSrcId(id);
m_lc.setDstId(tg);
m_embeddedLC.setLC(m_lc);
}
CDynVoice::~CDynVoice()
@@ -76,17 +82,6 @@ CDynVoice::~CDynVoice()
delete[] m_ambe;
}
void CDynVoice::setSlotAndTG(unsigned int slot, unsigned int tg)
{
m_slot = slot;
m_lc.setFLCO(FLCO_GROUP);
m_lc.setSrcId(m_id);
m_lc.setDstId(tg);
m_embeddedLC.setLC(m_lc);
}
bool CDynVoice::open()
{
FILE* fpindx = ::fopen(m_indxFile.c_str(), "rt");