Fix rewind() with bit_count > 1
This commit is contained in:
parent
74db8e5fe6
commit
8607aacc15
|
@ -170,8 +170,8 @@ class Track:
|
||||||
n += b << bit_index
|
n += b << bit_index
|
||||||
yield n
|
yield n
|
||||||
|
|
||||||
def rewind(self, bit_count):
|
def rewind(self, bit_count=1):
|
||||||
self.bit_index -= 1
|
self.bit_index -= bit_count
|
||||||
if self.bit_index < 0:
|
if self.bit_index < 0:
|
||||||
self.bit_index = self.bit_count - 1
|
self.bit_index = self.bit_count - 1
|
||||||
self.revolutions -= 1
|
self.revolutions -= 1
|
||||||
|
|
Loading…
Reference in New Issue