Skip to content

Wav loop end point is invalid. #5

@jemmons

Description

@jemmons

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions