mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
change return type of Tempo::set_{ramped,clamped} and fix call sites
This commit is contained in:
parent
99c8c0b658
commit
ce3fb0507c
3 changed files with 22 additions and 33 deletions
|
|
@ -113,18 +113,16 @@ Tempo::Tempo (XMLNode const & node)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
Tempo::set_ramped (bool yn)
|
||||
{
|
||||
_type = (yn ? Ramped : Constant);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Tempo::set_clamped (bool)
|
||||
void
|
||||
Tempo::set_clamped (bool yn)
|
||||
{
|
||||
#warning implement Tempo::set_clamped
|
||||
return true;
|
||||
_clamped = yn;
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
|
|
@ -1115,7 +1113,7 @@ TempoMap::reset_starting_at (superclock_t sc)
|
|||
}
|
||||
|
||||
if (advance_meter && (m != _meters.end())) {
|
||||
++m;
|
||||
++m;
|
||||
}
|
||||
if (advance_tempo && (t != _tempos.end())) {
|
||||
++t;
|
||||
|
|
@ -2892,15 +2890,12 @@ TempoMap::metric_at (BBT_Time const & bbt, bool can_match) const
|
|||
return TempoMetric (*const_cast<TempoPoint*>(prev_t), *const_cast<MeterPoint*> (prev_m));
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
TempoMap::set_ramped (TempoPoint & tp, bool yn)
|
||||
{
|
||||
Rampable & r (tp);
|
||||
bool ret = r.set_ramped (yn);
|
||||
if (ret) {
|
||||
reset_starting_at (tp.sclock());
|
||||
}
|
||||
return ret;
|
||||
r.set_ramped (yn);
|
||||
reset_starting_at (tp.sclock());
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class LIBTEMPORAL_API Rampable {
|
|||
|
||||
private:
|
||||
friend class TempoMap;
|
||||
virtual bool set_ramped (bool yn) = 0;
|
||||
virtual void set_ramped (bool yn) = 0;
|
||||
};
|
||||
|
||||
/** Tempo, the speed at which musical time progresses (BPM).
|
||||
|
|
@ -246,7 +246,7 @@ class LIBTEMPORAL_API Tempo : public Rampable {
|
|||
void set_locked_to_meter (bool yn) { _locked_to_meter = yn; }
|
||||
|
||||
bool clamped() const { return _clamped; }
|
||||
bool set_clamped (bool yn);
|
||||
void set_clamped (bool yn);
|
||||
|
||||
Type type() const { return _type; }
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ class LIBTEMPORAL_API Tempo : public Rampable {
|
|||
static inline superclock_t double_npm_to_scpn (double npm) { return (superclock_t) llround ((60./npm) * superclock_ticks_per_second); }
|
||||
|
||||
private:
|
||||
bool set_ramped (bool yn);
|
||||
void set_ramped (bool yn);
|
||||
};
|
||||
|
||||
/** Meter, or time signature (subdivisions per bar, and which note type is a single subdivision). */
|
||||
|
|
@ -675,7 +675,7 @@ class LIBTEMPORAL_API TempoMap : public PBD::StatefulDestructible
|
|||
* the RCU manager.
|
||||
*/
|
||||
|
||||
bool set_ramped (TempoPoint&, bool);
|
||||
void set_ramped (TempoPoint&, bool);
|
||||
|
||||
void insert_time (timepos_t const & pos, timecnt_t const & duration);
|
||||
bool remove_time (timepos_t const & pos, timecnt_t const & duration);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue