From 1cb36f5a81d806132b366aeabd5c6da2bbbcf7e0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 4 Nov 2010 20:37:46 +0000 Subject: Add column headings and length field to export timespan selector. Fixes #3518. git-svn-id: svn://localhost/ardour2/branches/3.0@7968 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/bbt_time.h | 12 ++++++++++++ libs/ardour/ardour/session.h | 2 +- libs/ardour/session_time.cc | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/bbt_time.h b/libs/ardour/ardour/bbt_time.h index 76e91d5752..2157e794a2 100644 --- a/libs/ardour/ardour/bbt_time.h +++ b/libs/ardour/ardour/bbt_time.h @@ -22,6 +22,7 @@ #include #include +#include namespace ARDOUR { @@ -59,4 +60,15 @@ operator<< (std::ostream& o, const ARDOUR::BBT_Time& bbt) return o; } +inline std::ostream& +print_padded (std::ostream& o, const ARDOUR::BBT_Time& bbt) +{ + o << std::setfill ('0') << std::right + << std::setw (3) << bbt.bars << "|" + << std::setw (2) << bbt.beats << "|" + << std::setw (4) << bbt.ticks; + + return o; +} + #endif /* __ardour_bbt_time_h__ */ diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 82b5d1360d..7c7ff820e9 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -453,7 +453,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi void timecode_time (nframes_t when, Timecode::Time&); void timecode_time_subframes (nframes_t when, Timecode::Time&); - void timecode_duration (nframes_t, Timecode::Time&) const; + void timecode_duration (framecnt_t, Timecode::Time&) const; void timecode_duration_string (char *, framecnt_t) const; void set_timecode_offset (nframes_t); diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index f7511b398d..b39c9399b3 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -424,7 +424,7 @@ Session::timecode_time_subframes (nframes_t when, Timecode::Time& timecode) } void -Session::timecode_duration (nframes_t when, Timecode::Time& timecode) const +Session::timecode_duration (framecnt_t when, Timecode::Time& timecode) const { sample_to_timecode( when, timecode, false /* use_offset */, true /* use_subframes */ ); } -- cgit v1.2.3