Skip to content

Commit

Permalink
fix: apply time shift in internal_time property
Browse files Browse the repository at this point in the history
  • Loading branch information
thegamecracks committed Jun 19, 2024
1 parent 4d922b1 commit 39f034a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sardine_core/clock/link_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def internal_origin(self) -> float:

@property
def internal_time(self) -> float:
return self._internal_time
return self._internal_time + self._time_shift

@property
def phase(self) -> float:
Expand Down Expand Up @@ -160,7 +160,7 @@ def _capture_link_info(self, *, update_transport: bool):
playing: bool = s.isPlaying()
tempo: float = s.tempo()

self._internal_time = self._link_time / 1_000_000 + self._time_shift
self._internal_time = self._link_time / 1_000_000
self._beat = int(beat)
self._beat_duration = 60 / tempo
# Sardine phase is typically defined from 0.0 to the beat duration.
Expand Down

0 comments on commit 39f034a

Please sign in to comment.