Skip to content

Commit

Permalink
fix: AttributeError from not calling setIsPlaying() on session state
Browse files Browse the repository at this point in the history
  • Loading branch information
thegamecracks committed Jun 18, 2024
1 parent a5de026 commit 38b3294
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions sardine_core/clock/link_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ def hook(self, event: str, *args):

self._time_shift += delta * self.beat_duration

# Broadcast start/stop from sardine transport methods if needed
if event == "pause" and self._playing:
self._link.setIsPlaying(False, self._link_time)
elif event == "resume" and not self._playing:
self._link.setIsPlaying(True, self._link_time)
if self._last_capture is not None:
# Allow boradcasting start/stop from sardine transport methods.
# This will cause a second pause/resume call from _capture_link_info(),
# but Sardine's transport methods are idempotent so it should be fine.
if event == "pause" and self._playing:
self._last_capture.setIsPlaying(False, self._link_time)
elif event == "resume" and not self._playing:
self._last_capture.setIsPlaying(True, self._link_time)

0 comments on commit 38b3294

Please sign in to comment.