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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user