media icon indicating copy to clipboard operation
media copied to clipboard

Fix issue where padding was not skipped when reading odd-sized chunks from WAV files

Open loliball opened this issue 1 year ago • 2 comments

If a chunk body has an odd number of bytes, it must be followed by a padding byte with value 0. In other words, a chunk must always occupy an even number of bytes in the file. The padding byte should not be counted in the chunk header’s size field. For example, if a chunk body is 17 bytes in size, the header’s size field should be set to 17, even though the chunk body occupies 18 bytes (17 bytes of data followed by the padding byte).

https://wavefilegem.com/how_wave_files_work.html

loliball avatar Feb 22 '24 03:02 loliball

I'm going to send this for internal review now. You may see some more commits being added as I make changes in response to review feedback. Please refrain from pushing any more substantive changes as it will complicate the internal review - thanks!

rohitjoins avatar Feb 27 '24 16:02 rohitjoins