use centralized SMF tempo method in both places where we show it
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Feb 2017 18:07:28 +0000 (19:07 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Feb 2017 18:07:28 +0000 (19:07 +0100)
gtk2_ardour/editor_audio_import.cc
gtk2_ardour/sfdb_ui.cc

index 1bbcf80b6f3e8441467457cad8e8b1f022e09aa0..d006b2ca15712936db0e70e11ad0697d7ca69049 100644 (file)
@@ -285,7 +285,7 @@ Editor::import_smf_tempo_map (Evoral::SMF const & smf, framepos_t pos)
                Evoral::SMF::Tempo* t = smf.nth_tempo (n);
                assert (t);
 
-               Tempo tempo (60 * (1000000 / (double) t->microseconds_per_quarter_note), 4.0);
+               Tempo tempo (t->tempo(), 4.0);
                Meter meter (t->numerator, t->denominator);
                Timecode::BBT_Time bbt; /* 1|1|0 which is correct for the no-meter case */
 
index d3979959fd715defc15da7169bf4e42f9c8154fd..fd08e1441962791646963e9bd5e26f46020a6eb8 100644 (file)
@@ -344,7 +344,7 @@ SoundFileBox::setup_labels (const string& filename)
                                tempomap_value.set_text (string_compose (_("%1/%2 \u2669 = %3"),
                                                                         t->numerator,
                                                                         t->denominator,
-                                                                        (1000000 / t->microseconds_per_quarter_note) * 60));
+                                                                        t->tempo ()));
                                break;
                        }
                        default: