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

wavread: always read next chunk, to handle chunk padding #91

Merged
merged 2 commits into from
Oct 4, 2020

Conversation

mgkuhn
Copy link
Contributor

@mgkuhn mgkuhn commented Oct 3, 2020

This is exactly the modification of wavread suggested 2020-09-09 by @Jazzdoodle in issue #90, presented here as a PR, for easier review and discussion.

up the entire chunk size. I have encountered WAV files with chunk
padding, that means the next chunk starts only after a few unused
padding bytes. Before reading the next subchunk header, you should
explicitly seek to the next subchunk start as indicated by the actual
chunk size in the chunk header instead on relying on things lining up.

I've fixed the issue (dancasimiro#90), and while I was at it I've also fixed the
restriction of the format and data chunk order.
@mgkuhn
Copy link
Contributor Author

mgkuhn commented Oct 3, 2020

@Jazzdoodle Is the case data_size == 0 really handled correctly here? That seems to cause some test failures.

@coveralls
Copy link

Coverage Status

Coverage increased (+4.6%) to 72.844% when pulling 8e5e6f3 on mgkuhn:handle-chunk-padding into e182794 on dancasimiro:main.

@coveralls
Copy link

coveralls commented Oct 3, 2020

Coverage Status

Coverage increased (+0.1%) to 68.421% when pulling 8e5e6f3 on mgkuhn:handle-chunk-padding into e182794 on dancasimiro:main.

@dancasimiro dancasimiro merged commit 8e04c3d into dancasimiro:main Oct 4, 2020
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

Successfully merging this pull request may close these issues.

None yet

4 participants