Add explicit BBT/Beat print functions (like timeline.h has)
This is in preparation for Lua bindings to allow print()ing the value. We cannot use PBD::to_string() here.
This commit is contained in:
parent
f79f3ee301
commit
36aa661a1d
@ -130,6 +130,13 @@ struct LIBTEMPORAL_API BBT_Time
|
||||
<< std::setw (2) << beats << "|"
|
||||
<< std::setw (4) << ticks;
|
||||
}
|
||||
|
||||
std::string str () const {
|
||||
std::ostringstream os;
|
||||
os << bars << '|' << beats << '|' << ticks;
|
||||
return os.str ();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct LIBTEMPORAL_API BBT_Offset
|
||||
|
@ -238,6 +238,12 @@ public:
|
||||
|
||||
static Beats one_tick() { return Beats(0, 1); }
|
||||
|
||||
std::string str () const {
|
||||
std::ostringstream os;
|
||||
os << get_beats() << ':' << get_ticks();
|
||||
return os.str();
|
||||
}
|
||||
|
||||
protected:
|
||||
int64_t _ticks;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user