83 bool is_zero ()
const {
return val() == 0; }
84 bool operator! ()
const {
return val() == 0; }
91 int64_t
ticks()
const {
if (is_beats())
return val();
return _ticks (); }
102 bool operator!= (
timepos_t const & other)
const {
return (val() != 0 || other.
val() != 0) && (v != other.
v); }
110 bool operator< (
timepos_t const & other)
const {
if (is_beats() == other.
is_beats())
return val() < other.
val();
return expensive_lt (other); }
111 bool operator> (
timepos_t const & other)
const {
if (is_beats() == other.
is_beats())
return val() > other.
val();
return expensive_gt (other); }
112 bool operator<= (
timepos_t const & other)
const {
if (is_beats() == other.
is_beats())
return val() <= other.
val();
return expensive_lte (other); }
113 bool operator>= (
timepos_t const & other)
const {
if (is_beats() == other.
is_beats())
return val() >= other.
val();
return expensive_gte (other); }
194 (val() > 0 ? val() - 1 : 0) :
277 using int62_t::operator int64_t;
278 using int62_t::operator-=;
349 bool is_zero()
const {
return _distance.val() == 0; }
362 int64_t
ticks ()
const {
return beats().to_ticks(); }
369 timecnt_t operator++ () { _distance += 1;
return *
this; }
370 timecnt_t operator-- () { _distance -= 1;
return *
this; }
403 bool operator> (
timecnt_t const & other)
const {
if (_distance.flagged() == other.
distance().
flagged())
return _distance > other.
distance ();
else return expensive_gt (other); }
404 bool operator>= (
timecnt_t const & other)
const {
if (_distance.flagged() == other.
distance().
flagged())
return _distance >= other.
distance();
else return expensive_gte (other); }
405 bool operator< (
timecnt_t const & other)
const {
if (_distance.flagged() == other.
distance().
flagged())
return _distance < other.
distance();
else return expensive_lt (other); }
406 bool operator<= (
timecnt_t const & other)
const {
if (_distance.flagged() == other.
distance().
flagged())
return _distance <= other.
distance();
else return expensive_lte (other); }
409 if (
this != &other) {
480 #ifdef TEMPORAL_DOMAIN_WARNING
481 #undef TEMPORAL_DOMAIN_WARNING
484 #define TEMPORAL_DOMAIN_WARNING(d) if (t.time_domain() != (d)) std::cerr << "DOMAIN CONVERSION WARNING IN COMPARATOR with t.domain = " << enum_2_string (t.time_domain()) << " not " << enum_2_string (d) << std::endl;
499 #undef TEMPORAL_DOMAIN_WARNING
bool operator<(const TextIter &lhs, const TextIter &rhs)
bool operator>=(const TextIter &lhs, const TextIter &rhs)
bool operator<=(const TextIter &lhs, const TextIter &rhs)
bool operator>(const TextIter &lhs, const TextIter &rhs)
static Beats ticks(int64_t ticks)
void set_position(timepos_t const &pos)
Temporal::Beats beats() const
timecnt_t(timecnt_t const &other)
static timecnt_t max(Temporal::TimeDomain td)
static timecnt_t from_samples(samplepos_t s)
bool expensive_lte(timecnt_t const &other) const
Temporal::TimeDomain time_domain() const
void set_time_domain(Temporal::TimeDomain)
Beats compute_beats() const
bool expensive_lt(timecnt_t const &other) const
static timecnt_t from_superclock(superclock_t s)
timecnt_t(timepos_t const &d)
timecnt_t operator-() const
superclock_t compute_superclocks() const
timepos_t const & position() const
timecnt_t decrement() const
bool expensive_gte(timecnt_t const &other) const
timecnt_t(timepos_t const &d, timepos_t const &p)
static timecnt_t from_ticks(int64_t ticks)
static timecnt_t from_superclock(superclock_t s, timepos_t const &pos)
timepos_t end(TimeDomain) const
int64_t magnitude() const
timecnt_t(samplepos_t s, timepos_t const &pos)
timecnt_t & operator%=(timecnt_t const &)
bool string_to(std::string const &str)
timecnt_t(Temporal::Beats const &b)
timecnt_t(Temporal::Beats const &b, timepos_t const &pos)
static timecnt_t zero(TimeDomain td)
bool expensive_gt(timecnt_t const &other) const
timecnt_t(timecnt_t const &, timepos_t const &pos)
timecnt_t scale(ratio_t const &) const
timecnt_t(int62_t d, timepos_t p)
static timecnt_t from_ticks(int64_t ticks, timepos_t const &pos)
int62_t const & distance() const
superclock_t superclocks() const
timecnt_t increment() const
static timecnt_t const & max()
static timecnt_t _max_timecnt
timepos_t increment() const
superclock_t superclocks() const
timepos_t & shift_earlier(timecnt_t const &d)
timepos_t scale(ratio_t const &n) const
static timepos_t max(TimeDomain td)
timepos_t & shift_earlier(Temporal::BBT_Offset const &)
timepos_t earlier(BBT_Offset const &d) const
timepos_t earlier(timepos_t const &d) const
timepos_t(timecnt_t const &)
timepos_t decrement() const
timepos_t & shift_earlier(timepos_t const &d)
static timepos_t from_ticks(int64_t t)
bool is_superclock() const
timepos_t operator-() const
timepos_t & operator+=(timecnt_t const &d)
timepos_t(int62_t const &v)
timepos_t(Temporal::Beats const &b)
timepos_t expensive_add(timepos_t const &s) const
timepos_t(bool b, int64_t v)
bool expensive_lt(timecnt_t const &) const
Temporal::TimeDomain time_domain() const
bool expensive_gt(timecnt_t const &) const
bool expensive_lt(timepos_t const &) const
timepos_t & operator+=(timepos_t const &d)
bool expensive_lte(timecnt_t const &) const
static timepos_t zero(bool is_beats)
bool string_to(std::string const &str)
static timepos_t from_superclock(superclock_t s)
bool expensive_gte(timecnt_t const &) const
timepos_t operator+(timepos_t const &d) const
superclock_t _superclocks() const
bool expensive_gte(timepos_t const &) const
bool expensive_lte(timepos_t const &) const
timepos_t & operator+=(Temporal::BBT_Offset const &)
static timepos_t smallest_step(TimeDomain td)
void set_time_domain(Temporal::TimeDomain)
timecnt_t distance(timepos_t const &p) const
timecnt_t expensive_distance(timepos_t const &p) const
timepos_t earlier(timecnt_t const &d) const
bool expensive_gt(timepos_t const &) const
timepos_t operator+(timecnt_t const &d) const
static bool flagged(int64_t v)
PBD::PropertyDescriptor< Temporal::TimeDomain > time_domain
Temporal::timecnt_t timecnt_t
Temporal::timepos_t timepos_t
static superclock_t superclock_to_samples(superclock_t s, int sr)
static superclock_t samples_to_superclock(int64_t samples, int sr)
void dump_stats(std::ostream &)
bool operator==(const ProcessorSelection &a, const ProcessorSelection &b)
#define TEMPORAL_SAMPLE_RATE