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

Fix reading of Wave-Files with odd Chunk-Lengths #386

Merged
merged 1 commit into from
Oct 2, 2018
Merged

Fix reading of Wave-Files with odd Chunk-Lengths #386

merged 1 commit into from
Oct 2, 2018

Conversation

Windoze345
Copy link
Contributor

This fixes the problem of reading Wave-Files with odd chunk lengths.
The specification says that odd chunks have to be filled with a padding byte (value zero)
which is not included in the chunk length. So the next chunk is word aligned.
This also fixes the problem in pull request #220 but IMO in a way more aligned
with the wave spec.
To allow for malformed wave-files with no padding byte I check if the byte is zero before skipping it.

@markheath markheath merged commit 7e46987 into naudio:master Oct 2, 2018
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.

2 participants