diff --git a/reflector/Configure.cpp b/reflector/Configure.cpp index 720993b..145129d 100644 --- a/reflector/Configure.cpp +++ b/reflector/Configure.cpp @@ -91,6 +91,8 @@ #define JUSRP "USRP" #define JWHITELISTPATH "WhitelistPath" #define JXMLPATH "XmlPath" +#define JYSFAUTOLINKMOD "AutoLinkModule" +#define JAUDIO "Audio" #define JYSF "YSF" #define JYSFTXRXDB "YSF TX/RX DB" @@ -233,6 +235,8 @@ bool CConfigure::ReadData(const std::string &path) section = ESection::ysffreq; else if (0 == hname.compare(JFILES)) section = ESection::files; + else if (0 == hname.compare(JAUDIO)) + section = ESection::audio; else { std::cerr << "WARNING: unknown ini file section: " << line << std::endl; @@ -533,6 +537,14 @@ bool CConfigure::ReadData(const std::string &path) else badParam(key); break; + case ESection::audio: + if (0 == key.compare(JENABLE)) + data[g_Keys.audio.enable] = IS_TRUE(value[0]); + else if (0 == key.compare("Path")) + data[g_Keys.audio.path] = value; + else + badParam(key); + break; default: std::cout << "WARNING: parameter '" << line << "' defined before any [section]" << std::endl; } diff --git a/reflector/Configure.h b/reflector/Configure.h index dfcd524..8a9e4c2 100644 --- a/reflector/Configure.h +++ b/reflector/Configure.h @@ -25,7 +25,7 @@ enum class ErrorLevel { fatal, mild }; enum class ERefreshType { file, http, both }; -enum class ESection { none, names, ip, modules, urf, dplus, dextra, dcs, g3, imrs, dmrplus, mmdvm, nxdn, bm, ysf, p25, m17, usrp, dmrid, nxdnid, ysffreq, files, tc, dashboard }; +enum class ESection { none, names, ip, modules, urf, dplus, dextra, dcs, g3, imrs, dmrplus, mmdvm, nxdn, bm, ysf, p25, m17, usrp, dmrid, nxdnid, ysffreq, files, tc, dashboard, audio }; #define IS_TRUE(a) ((a)=='t' || (a)=='T' || (a)=='1')