Temporal: remove BarTime
This commit is contained in:
@@ -74,19 +74,11 @@ Point::sample() const
|
||||
timepos_t
|
||||
Point::time() const
|
||||
{
|
||||
switch (_map->time_domain()) {
|
||||
case AudioTime:
|
||||
if (_map->time_domain() == AudioTime) {
|
||||
return timepos_t::from_superclock (sclock());
|
||||
case BeatTime:
|
||||
return timepos_t (beats());
|
||||
case BarTime:
|
||||
/*NOTREACHED*/
|
||||
break;
|
||||
}
|
||||
/*NOTREACHED*/
|
||||
abort();
|
||||
/*NOTREACHED*/
|
||||
return timepos_t (AudioTime);
|
||||
|
||||
return timepos_t (beats());
|
||||
}
|
||||
|
||||
Tempo::Tempo (XMLNode const & node)
|
||||
@@ -654,10 +646,6 @@ TempoMap::add_meter (MeterPoint & mp)
|
||||
case BeatTime:
|
||||
for (m = _meters.begin(); m != _meters.end() && m->beats() < mp.beats(); ++m);
|
||||
break;
|
||||
case BarTime:
|
||||
for (m = _meters.begin(); m != _meters.end() && m->bbt() < mp.bbt(); ++m);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
bool replaced = false;
|
||||
@@ -757,9 +745,6 @@ TempoMap::add_tempo (TempoPoint & tp)
|
||||
case BeatTime:
|
||||
for (t = _tempos.begin(); t != _tempos.end() && t->beats() < tp.beats(); ++t);
|
||||
break;
|
||||
case BarTime:
|
||||
for (t = _tempos.begin(); t != _tempos.end() && t->bbt() < tp.bbt(); ++t);
|
||||
break;
|
||||
}
|
||||
|
||||
bool replaced = false;
|
||||
@@ -1035,7 +1020,6 @@ bool
|
||||
TempoMap::move_meter (MeterPoint const & mp, timepos_t const & when, bool push)
|
||||
{
|
||||
{
|
||||
assert (time_domain() != BarTime);
|
||||
assert (!_tempos.empty());
|
||||
assert (!_meters.empty());
|
||||
|
||||
@@ -1175,7 +1159,6 @@ bool
|
||||
TempoMap::move_tempo (TempoPoint const & tp, timepos_t const & when, bool push)
|
||||
{
|
||||
{
|
||||
assert (time_domain() != BarTime);
|
||||
assert (!_tempos.empty());
|
||||
assert (!_meters.empty());
|
||||
|
||||
@@ -2270,10 +2253,6 @@ TempoMap::full_duration_at (timepos_t const & pos, timecnt_t const & duration, T
|
||||
Beats b;
|
||||
superclock_t s;
|
||||
|
||||
assert (pos.time_domain() != BarTime);
|
||||
assert (duration.time_domain() != BarTime);
|
||||
assert (return_domain != BarTime);
|
||||
|
||||
if (return_domain == duration.time_domain()) {
|
||||
return duration;
|
||||
}
|
||||
@@ -2380,7 +2359,6 @@ TempoMap::n_tempos () const
|
||||
void
|
||||
TempoMap::insert_time (timepos_t const & pos, timecnt_t const & duration)
|
||||
{
|
||||
assert (time_domain() != BarTime);
|
||||
assert (!_tempos.empty());
|
||||
assert (!_meters.empty());
|
||||
|
||||
|
||||
@@ -52,8 +52,7 @@
|
||||
|
||||
Beats increase monotonically throughout the tempo map (BBT may not).
|
||||
|
||||
The map has a single time domain at any time, and can only be using either
|
||||
AudioTime or BeatTime. BarTime is not legal as a map time domain.
|
||||
The map has a single time domain at any time.
|
||||
*/
|
||||
|
||||
namespace Temporal {
|
||||
@@ -498,7 +497,7 @@ class LIBTEMPORAL_API TempoMetric {
|
||||
|
||||
};
|
||||
|
||||
/* A music time point is a place where BBT time (BarTime) is reset from
|
||||
/* A music time point is a place where BBT time is reset from
|
||||
* whatever it would be when just inferring from the usual counting. Its
|
||||
* position is given by a Point that might use superclock or Beats, and the
|
||||
* Point's BBT time member is overwritten.
|
||||
|
||||
@@ -104,7 +104,6 @@ enum TimeDomain {
|
||||
/* simple ordinals, since these are mutually exclusive */
|
||||
AudioTime = 0,
|
||||
BeatTime = 1,
|
||||
BarTime = 2,
|
||||
};
|
||||
|
||||
enum Dirty {
|
||||
|
||||
Reference in New Issue
Block a user