Add confirmation message to indicate that the voice files have been found.

This commit is contained in:
Jonathan Naylor 2018-03-15 22:46:42 +00:00
parent 0180802df2
commit 0998cfc1dc
2 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,7 @@ const unsigned char BIT_MASK_TABLE[] = { 0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04
#define READ_BIT1(p,i) (p[(i)>>3] & BIT_MASK_TABLE[(i)&7])
CVoice::CVoice(const std::string& directory, const std::string& language, unsigned int srcId) :
m_language(language),
m_indxFile(),
m_ambeFile(),
m_srcId(srcId),
@ -57,6 +58,9 @@ m_voiceData(NULL),
m_voiceLength(0U),
m_positions()
{
assert(!directory.empty());
assert(!language.empty());
#if defined(_WIN32) || defined(_WIN64)
m_indxFile = directory + "\\" + language + ".indx";
m_ambeFile = directory + "\\" + language + ".nxdn";
@ -130,6 +134,8 @@ bool CVoice::open()
::fclose(fpindx);
::fclose(fpambe);
LogInfo("Loaded the audio and index file for %s", m_language.c_str());
return true;
}

View File

@ -54,6 +54,7 @@ public:
void clock(unsigned int ms);
private:
std::string m_language;
std::string m_indxFile;
std::string m_ambeFile;
unsigned int m_srcId;