diff --git a/src/common/audio_emphasis.cpp b/src/common/audio_emphasis.cpp index a1ba52773..39ad2f435 100644 --- a/src/common/audio_emphasis.cpp +++ b/src/common/audio_emphasis.cpp @@ -46,8 +46,8 @@ audio_emphasis_c::init_translations() { if (!s_translations.empty()) return; - s_translations.emplace_back(YT("none")); - s_translations.emplace_back(YT("First order filter found in CD/DVD/MPEG audio")); + s_translations.emplace_back(YT("no emphasis")); + s_translations.emplace_back(YT("first order filter found in CD/DVD/MPEG audio")); s_translations.emplace_back(YT("unknown")); s_translations.emplace_back(YT("CCIT-J.17")); s_translations.emplace_back(YT("FM radio in Europe")); @@ -56,16 +56,21 @@ audio_emphasis_c::init_translations() { s_translations.emplace_back(YT("unknown")); s_translations.emplace_back(YT("unknown")); s_translations.emplace_back(YT("unknown")); - s_translations.emplace_back(YT("Phono filter (RIAA)")); - s_translations.emplace_back(YT("Phono filter (IEC N78)")); - s_translations.emplace_back(YT("Phono filter (Teldec)")); - s_translations.emplace_back(YT("Phono filter (EMI)")); - s_translations.emplace_back(YT("Phono filter (Columbia LP")); - s_translations.emplace_back(YT("Phono filter (London)")); - s_translations.emplace_back(YT("Phono filter (NARTB)")); + s_translations.emplace_back(YT("phono filter (RIAA)")); + s_translations.emplace_back(YT("phono filter (IEC N78)")); + s_translations.emplace_back(YT("phono filter (Teldec)")); + s_translations.emplace_back(YT("phono filter (EMI)")); + s_translations.emplace_back(YT("phono filter (Columbia LP)")); + s_translations.emplace_back(YT("phono filter (London)")); + s_translations.emplace_back(YT("phono filter (NARTB)")); } -const std::string +std::string const +audio_emphasis_c::symbol(unsigned int mode) { + return mode < s_modes.size() ? s_modes[mode] : std::string{}; +} + +std::string const audio_emphasis_c::translate(unsigned int mode) { init_translations(); return mode < s_translations.size() ? s_translations[mode].get_translated() : Y("unknown"); @@ -115,3 +120,8 @@ audio_emphasis_c::list() { mxinfo(formatter.format()); } + +int +audio_emphasis_c::max_index() { + return 16; +} diff --git a/src/common/audio_emphasis.h b/src/common/audio_emphasis.h index 24d8171b4..833028aa2 100644 --- a/src/common/audio_emphasis.h +++ b/src/common/audio_emphasis.h @@ -41,9 +41,11 @@ public: static void init(); static void init_translations(); - static const std::string translate(unsigned int mode); - static const std::string displayable_modes_list(); + static std::string const symbol(unsigned int mode); + static std::string const translate(unsigned int mode); + static std::string const displayable_modes_list(); static mode_e parse_mode(const std::string &str); static bool valid_index(int index); static void list(); + static int max_index(); };