-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test-short.ogg and chain-test3.ogg
Fixes comparison to libvorbis for two sample files by fixing two bugs in lewton: 1. In cases where the last header packet was directly followed by audio packets, without any page boundary, libvorbis just ignored those packets. lewton didn't so it treated the packets as normal content. This created a misalignment between lewton and libvorbis when parsing the sample files. Such a situation occured in test-short.ogg as well as chain-test3.ogg. The spec says that audio packets must start in a fresh page, so this means that the files are technically invalid. However, libvorbis parses them just fine. 2. Second, we move the last = 0 resetting into the outer loop. This is what the spec says, and it is also needed in order to fix the comparison to libvorbis for the two files. Otherwise, there'd be just silence, as the floor0 samples would assume crazy values. As we rely on a new function that has been added to the ogg crate for the very purpose of using it in this commit, we bump the version requirement for the ogg crate to 0.6.1. Both files get fixed at once as chain-test3.ogg is just a concatenation of test-short.ogg with another file where no mismatch to libvorbis was present. Transparency notice: this commit marks the first and hopefully last time I've ever looked into the vorbis source code for my work on the lewton crate. I think that this creates no change in the licensing situation of the lewton crate. The changes of this commit are so small that they don't fall under copyright. This commit addresses parts of #26.
- Loading branch information
Showing
6 changed files
with
21 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters