diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2007-01-02 13:57:06 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2007-01-02 13:57:06 +0000 |
commit | 1bddf1bc884feedb5deb5c35f08c7b9730936dae (patch) | |
tree | bb8ef1d1fb866027a671ce3f641ee9475804c361 /gtk2_ardour/audio_clock.cc | |
parent | a3a1e4b413776cf6f0d72be831a33d8a8e6048ae (diff) |
General SMPTE fixes mostly relating to non-integer frame rates. Please Test. Fix for sometimes entering an invalid SMPTE format by CHANGING THE SESSION FILE. ****Warning. the SMPTE frame rate will be reset to 30 NDF if you load an old sessionardour2_broken/***. Calculate the HMS verbose canvas cursor properly. Fix incorrect SMPTE display in clocks/VCC. Standardise size of SMPTE display in editor clocks. Make the zoom controls smaller (anyone with some smaller icons?).
git-svn-id: svn://localhost/ardour2/trunk@1257 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_clock.cc')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 87a6257fee..fb452d41cf 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -90,6 +90,9 @@ AudioClock::AudioClock (std::string name, bool allow_edit, bool duration, bool w bbt_upper_info_label->set_name ("AudioClockBBTUpperInfo"); bbt_lower_info_label->set_name ("AudioClockBBTLowerInfo"); + Gtkmm2ext::set_size_request_to_display_given_text(*smpte_upper_info_label, "23.98",0,0); + Gtkmm2ext::set_size_request_to_display_given_text(*smpte_lower_info_label, "NDF",0,0); + frames_info_box.pack_start (*frames_upper_info_label, true, true); frames_info_box.pack_start (*frames_lower_info_label, true, true); smpte_info_box.pack_start (*smpte_upper_info_label, true, true); @@ -530,7 +533,7 @@ AudioClock::set_smpte (nframes_t when, bool force) } if (smpte_upper_info_label) { - float smpte_frames = Config->get_smpte_frames_per_second(); + float smpte_frames = session->smpte_frames_per_second(); if ( fmod(smpte_frames, 1.0) == 0.0) { sprintf (buf, "%u", int (smpte_frames)); @@ -540,7 +543,7 @@ AudioClock::set_smpte (nframes_t when, bool force) smpte_upper_info_label->set_text (buf); - if (Config->get_smpte_drop_frames()) { + if (session->smpte_drop_frames()) { sprintf (buf, "DF"); } else { sprintf (buf, "NDF"); @@ -1194,7 +1197,7 @@ AudioClock::get_frames (Field field,nframes_t pos,int dir) frames = session->frame_rate(); break; case SMPTE_Frames: - frames = (nframes_t) floor (session->frame_rate() / Config->get_smpte_frames_per_second()); + frames = (nframes_t) floor (session->frame_rate() / session->smpte_frames_per_second()); break; case AudioFrames: @@ -1302,7 +1305,7 @@ AudioClock::smpte_sanitize_display() seconds_label.set_text("59"); } - switch ((long)rint(Config->get_smpte_frames_per_second())) { + switch ((long)rint(session->smpte_frames_per_second())) { case 24: if (atoi(frames_label.get_text()) > 23) { frames_label.set_text("23"); @@ -1322,7 +1325,7 @@ AudioClock::smpte_sanitize_display() break; } - if (Config->get_smpte_drop_frames()) { + if (session->smpte_drop_frames()) { if ((atoi(minutes_label.get_text()) % 10) && (atoi(seconds_label.get_text()) == 0) && (atoi(frames_label.get_text()) < 2)) { frames_label.set_text("02"); } |