summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-05-14 00:13:27 +0000
committerCarl Hetherington <carl@carlh.net>2009-05-14 00:13:27 +0000
commit015fc7b39fab97cee1875231694adce43155ceb5 (patch)
tree76dded18cc9441e7325af999358ab3a3235cdb1e /gtk2_ardour/sfdb_ui.cc
parent0569107ddc0d2a8df6ca0a2c8cc16ebe8f3dee99 (diff)
First stage of options rework.
- Split Configuration into RCConfiguration and SessionConfiguration; the first for options which are saved to .rc files and the second for options which are saved in a session file. - Move some options from the old `master' Configuration object into SessionConfiguration; this needs more refinement. - Reflect many RCConfiguration options in an expanded Edit->Preferences dialog; my intention is to remove the corresponding menu items eventually. git-svn-id: svn://localhost/ardour2/branches/3.0@5075 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 8ca66fb530..98dd328f55 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -262,7 +262,8 @@ SoundFileBox::setup_labels (const ustring& filename)
samplerate.set_name ("NewSessionSR2Label");
}
- double src_coef = (double) _session->nominal_frame_rate() / sf_info.samplerate;
+ nframes_t const nfr = _session ? _session->nominal_frame_rate() : 25;
+ double src_coef = (double) nfr / 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);