Skip to content

Conversation

@illwieckz
Copy link
Member

@illwieckz illwieckz commented Oct 8, 2025

Read samples from “first sample byte” to “first sample byte + size” instead of reading from “first sample byte” to “first header byte + size”.

It means we now:

  • don't wrongfully truncate the end of the file from the size of the header,
  • can load files with less samples than the header size.

Fixes #1851:

Read samples from “first sample byte” to “first sample byte + size”
instead of reading from “first sample byte” to “first header byte + size”.

It means we now:

- don't wrongfully truncate the end of the file from the size of the header,
- can load files with less samples than the header size.
@illwieckz illwieckz force-pushed the illwieckz/fix-wav-loading branch from c69616c to 3c2a33b Compare October 8, 2025 02:29
@illwieckz illwieckz changed the title wavcodec: fix WAV file loading fix WAV file loading Oct 8, 2025
@illwieckz illwieckz changed the title fix WAV file loading Fix WAV file loading Oct 8, 2025
@slipher
Copy link
Member

slipher commented Oct 8, 2025

Nice! LGTM.

@illwieckz illwieckz mentioned this pull request Oct 8, 2025
@illwieckz illwieckz merged commit e636540 into master Oct 9, 2025
9 checks passed
@illwieckz illwieckz deleted the illwieckz/fix-wav-loading branch October 9, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Engine rejects small but valid WAV files

3 participants