+ auto relaxed_string_to_float = [](std::string s) {
+ try {
+ boost::algorithm::replace_all(s, ",", ".");
+ return boost::lexical_cast<float>(s);
+ } catch (boost::bad_lexical_cast &) {
+ boost::algorithm::replace_all(s, ".", ",");
+ return boost::lexical_cast<float>(s);
+ }
+ };
+
+ return CinemaSoundProcessor::from_index(
+ _processor->GetSelection())->db_for_fader_change(
+ relaxed_string_to_float(wx_to_std(_wanted->GetValue())),
+ relaxed_string_to_float(wx_to_std(_actual->GetValue()))
+ );