Merge pull request #5 from KrisKennaway/master

Fix rewind() with bit_count > 1
pull/2/merge
4am 4 months ago committed by GitHub
commit 03e7bdc116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      wozardry.py

@ -182,8 +182,8 @@ class Track(RawTrack):
n += b << bit_index
yield n
def rewind(self, bit_count):
self.bit_index -= 1
def rewind(self, bit_count=1):
self.bit_index -= bit_count
if self.bit_index < 0:
self.bit_index = self.bit_count - 1
self.revolutions -= 1

Loading…
Cancel
Save