hound icon indicating copy to clipboard operation
hound copied to clipboard

Subchunks are not word-aligned

Open nliberg opened this issue 7 years ago • 1 comments

If hound is used to, for example, create a .wav file containing a single 24-bit sample the resulting file will have an odd-numbered file size. My understanding is that each subchunk should be zero-padded to an even number of bytes.

For what it's worth I noticed that this seems to be properly handled in pull request #27:

        if self.len % 2 == 1 {
            try!(writer.write_u8(0));
        }

(note that the padding byte should not be included in the size specified in the subchunk header)

nliberg avatar Sep 26 '18 09:09 nliberg

Yes, that was indeed discovered and fixed by @kali, I just haven’t had the time to review the PR yet, I’m sorry about that. Will try and take a look right now.

ruuda avatar Sep 26 '18 16:09 ruuda