diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2021-12-26 21:14:40 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2021-12-26 21:14:40 +0100 |
commit | 8622638f99277b43d40b61029dc3c56164d06cae (patch) | |
tree | 1a632e3b7969d780abbb0b7575964fcf63d8bb33 /abcontroller.py | |
parent | 10aa8140b5e52cc0cf8cea794daf81fb0ffdcad3 (diff) |
Changed default behaviour of AB controller
Diffstat (limited to 'abcontroller.py')
-rw-r--r-- | abcontroller.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/abcontroller.py b/abcontroller.py index 80f6a4d..b67d38a 100644 --- a/abcontroller.py +++ b/abcontroller.py @@ -7,7 +7,7 @@ class ABController: self._setPositionCallback = callback self._limits = dict() # dictionary of all songs self._songLimits = None # list of limits for selected song - self._currentLimits = None # a/b positions of selected limit + self._currentLimits = _AB(0.0, 0.0) # a/b positions of selected limit self._enabled = enabled def _ensureSongExists(self, path): @@ -17,7 +17,7 @@ class ABController: def setCurrentSong(self, path): self._ensureSongExists(path) self._songLimits = self._limits[path] - self._currentLimits = None + #self._currentLimits = None def storeLimits(self, aLimit, bLimit, song=None): if song is not None: @@ -42,6 +42,7 @@ class ABController: def positionChanged(self, position): if not self._currentLimits: return + print("No early return") if position > self._currentLimits.b and self._setPositionCallback and self._enabled: self._setPositionCallback(self._currentLimits.a) |