Fix rewind() with bit_count > 1

This commit is contained in:
kris 2020-12-03 10:49:40 +00:00
parent 74db8e5fe6
commit 8607aacc15
1 changed files with 2 additions and 2 deletions

View File

@ -170,8 +170,8 @@ class Track:
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