diff options
author | Robin Gareus <robin@gareus.org> | 2012-10-15 02:46:54 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-10-15 02:46:54 +0000 |
commit | 4ff1cd78fb2c2c6741553f045dd4a1f0664fee64 (patch) | |
tree | 4877ab2e3df67d395e43de1af61abc409d5486fe /gtk2_ardour | |
parent | 6584ae1ce7837d6796cda61eb04830804439b604 (diff) |
audio-clock: use Timecode::timecode_format_time
git-svn-id: svn://localhost/ardour2/branches/3.0@13278 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 2e5628214d..a67e086db7 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -1071,7 +1071,6 @@ AudioClock::set_minsec (framepos_t when, bool /*force*/) void AudioClock::set_timecode (framepos_t when, bool /*force*/) { - char buf[32]; Timecode::Time TC; bool negative = false; @@ -1095,14 +1094,10 @@ AudioClock::set_timecode (framepos_t when, bool /*force*/) } else { _session->timecode_time (when, TC); } - - if (TC.negative || negative) { - snprintf (buf, sizeof (buf), "-%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, TC.hours, TC.minutes, TC.seconds, TC.frames); - } else { - snprintf (buf, sizeof (buf), " %02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, TC.hours, TC.minutes, TC.seconds, TC.frames); - } - _layout->set_text (buf); + TC.negative = TC.negative || negative; + + _layout->set_text (Timecode::timecode_format_time(TC)); if (_left_layout) { |