Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seek function does not update self.data_position #1

Closed
HexAndFlex opened this issue Jan 1, 2021 · 2 comments
Closed

seek function does not update self.data_position #1

HexAndFlex opened this issue Jan 1, 2021 · 2 comments

Comments

@HexAndFlex
Copy link

While the seek function does seem to work to navigate around a file, it does not seem to update the data_position pointer. As such PyWave.Tell() provides an incorrect file position.

To recreate..

rb = pw.open(inWav,'r') #open a read only wav file 
print("pos = " + str(rb.tell()))                 # displays                    "Pos =  0"; good
dat1 = rb.read_samples(10)                       #read 10 samples
print("pos = " + str(rb.tell()))                 # displays                    "Pos =  10"; good
rb.seek(10,1)                                    #skip forward 10 samples
print("pos = " + str(rb.tell()))                 # displays                   "Pos =  10"; should display "Pos = 20"
@Zuzu-Typ
Copy link
Owner

Zuzu-Typ commented Jan 1, 2021

Whoopsie, yeah. That's not how that should be.

Should be fixed now.

Thanks for letting me know!

Also, happy new year! (:

@HexAndFlex
Copy link
Author

Thanks for the quick fix. HNY to you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants