summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 77c7f59afc..b0b6a577f7 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -266,8 +266,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)