extend/fix/improve operator overloads and methods for Timecode::BBT_Time

This commit is contained in:
Paul Davis 2017-09-13 17:12:51 -04:00
parent 9ea43bd5ad
commit 176cdecd03
2 changed files with 56 additions and 11 deletions

View file

@ -29,15 +29,17 @@ using namespace Timecode;
1/Nth divisions are integer numbers of ticks.
1920 has many factors, though going up to 3840 gets a couple more.
This needs to match Evoral::Beats::PPQN
*/
const double BBT_Time::ticks_per_beat = 1920.0;
BBT_Time::BBT_Time (double dbeats)
BBT_Offset::BBT_Offset (double dbeats)
{
/* NOTE: this does not construct a BBT time in a canonical form,
in that beats may be a very large number, and bars will
always be zero.
always be zero. Hence ... it's a BBT_Offset
*/
assert (dbeats >= 0);