mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
allow negative superclock -> negative beats computation
This commit is contained in:
parent
1e84f217ac
commit
fee4292bde
1 changed files with 5 additions and 1 deletions
|
|
@ -527,7 +527,7 @@ TempoPoint::quarters_at_superclock (superclock_t sc) const
|
||||||
|
|
||||||
if (!actually_ramped()) {
|
if (!actually_ramped()) {
|
||||||
|
|
||||||
assert (sc >= _sclock);
|
// assert (sc >= _sclock);
|
||||||
superclock_t sc_delta = sc - _sclock;
|
superclock_t sc_delta = sc - _sclock;
|
||||||
|
|
||||||
/* convert sc into superbeats, given that sc represents some number of seconds */
|
/* convert sc into superbeats, given that sc represents some number of seconds */
|
||||||
|
|
@ -544,6 +544,10 @@ TempoPoint::quarters_at_superclock (superclock_t sc) const
|
||||||
|
|
||||||
Tempo::superbeats_to_beats_ticks (superbeats, b, t);
|
Tempo::superbeats_to_beats_ticks (superbeats, b, t);
|
||||||
|
|
||||||
|
if (sc < _sclock) {
|
||||||
|
std::cout << string_compose ("%8 => \nsc %1 delta %9 = %2 secs rem = %3 rem snotes %4 sbeats = %5 => %6 : %7\n", sc, whole_seconds, remainder, supernotes, superbeats, b , t, *this, sc_delta);
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::TemporalMap, string_compose ("%8 => \nsc %1 delta %9 = %2 secs rem = %3 rem snotes %4 sbeats = %5 => %6 : %7\n", sc, whole_seconds, remainder, supernotes, superbeats, b , t, *this, sc_delta));
|
DEBUG_TRACE (DEBUG::TemporalMap, string_compose ("%8 => \nsc %1 delta %9 = %2 secs rem = %3 rem snotes %4 sbeats = %5 => %6 : %7\n", sc, whole_seconds, remainder, supernotes, superbeats, b , t, *this, sc_delta));
|
||||||
|
|
||||||
return _quarters + Beats (b, t);
|
return _quarters + Beats (b, t);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue