hound
hound copied to clipboard
Subchunks are not word-aligned
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)
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.