13
0

Fix negated origin time in main clock

When selecting "Origin" for the clock, it is expected that it should
work like "Absolute", except measuring from the selected Origin.
Positions to the right of origin should be positive.

However, recently, it got negated. As playback progressed, time got more
and more negative. Fix that by negating again.
This commit is contained in:
Mads Kiilerich 2022-11-02 16:57:49 +01:00 committed by Robin Gareus
parent d23c506088
commit 6e9730ad6e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -131,7 +131,7 @@ MainClock::set (timepos_t const & when, bool force)
case DeltaOriginMarker:
{
Location* loc = AudioEngine::instance()->session()->locations()->clock_origin_location ();
AudioClock::set_duration (when.distance (loc ? loc->start() : timepos_t (when.time_domain())), force);
AudioClock::set_duration (-when.distance (loc ? loc->start() : timepos_t (when.time_domain())), force);
}
break;
}