Merge pull request #5 from KrisKennaway/master

Fix rewind() with bit_count > 1
This commit is contained in:
4am 2022-04-11 20:22:46 -04:00 committed by GitHub
commit 03e7bdc116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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