heuristic to workaround over-eager translation of NN000Hz as NN kHz

git-svn-id: svn://localhost/ardour2/branches/3.0@11279 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2012-01-20 15:08:44 +00:00
parent 052a0785b5
commit a4578d02b0

View File

@@ -955,7 +955,14 @@ EngineControl::driver_changed ()
uint32_t
EngineControl::get_rate ()
{
return atoi (sample_rate_combo.get_active_text ());
double r = atof (sample_rate_combo.get_active_text ());
/* the string may have been translated with an abbreviation for
* thousands, so use a crude heuristic to fix this.
*/
if (r < 1000.0) {
r *= 1000.0;
}
return lrint (r);
}
void