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

Wav loop end point is invalid. #5

Open
jemmons opened this issue Jan 29, 2025 · 0 comments
Open

Wav loop end point is invalid. #5

jemmons opened this issue Jan 29, 2025 · 0 comments

Comments

@jemmons
Copy link

jemmons commented Jan 29, 2025

The loop end point of the smpl chunk suffers from an off-by-one error.

https://github.com/gocha/split700/blob/v2.0/src/WavWriter.cpp#L121

We can see the end of the loop is being set to the size of the sample. But it’s expecting an index (like the loop start above it). So the loop region actually hangs one sample off the end of the wav.

This causes some clients to discard all loop information in the file, and causes others to play random memory for that extra sample.

As a fix, an index should be used instead of a size. In practice, this is just a matter of decrementing the size by one.

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

1 participant