diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-20 15:15:58 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-20 15:15:58 +0000 |
commit | 50e967a363e74bb855f4c0cdd922132a84d4fe54 (patch) | |
tree | 1e27a6c981b80c74332a8e977268e2afb5add242 /gtk2_ardour/engine_dialog.cc | |
parent | a883d9bcecc37e1ee3dba68cef756e27b8df20f0 (diff) |
(backport from a3) heuristic to workaround over-eager translation of NN000Hz as NN kHz
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@11280 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index f67268a04a..322ea529df 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -897,7 +897,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 |