mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 17:03:06 +01:00
audio-clock: use Timecode::timecode_format_time
git-svn-id: svn://localhost/ardour2/branches/3.0@13278 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6584ae1ce7
commit
4ff1cd78fb
1 changed files with 3 additions and 8 deletions
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue