From 562c362b3fd1b273afabb5da77ac8c96832aae68 Mon Sep 17 00:00:00 2001 From: Sakari Bergen Date: Mon, 21 Jul 2008 13:28:44 +0000 Subject: [PATCH] Fix import dialog clocks to display times that are correct in the current session git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3635 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/sfdb_ui.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 97d74d479c..56c693a87d 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -262,8 +262,10 @@ SoundFileBox::setup_labels (const ustring& filename) samplerate.set_name ("NewSessionSR2Label"); } - length_clock.set (sf_info.length, true); - timecode_clock.set (sf_info.timecode, true); + double src_coef = (double) _session->nominal_frame_rate() / sf_info.samplerate; + + length_clock.set (sf_info.length * src_coef + 0.5, true); + timecode_clock.set (sf_info.timecode * src_coef + 0.5, true); // this is a hack that is fixed in trunk, i think (august 26th, 2007)