wav icon indicating copy to clipboard operation
wav copied to clipboard

When chunkSize ==18 error:unexpected EOF

Open ghost opened this issue 8 years ago • 1 comments

hi~ i have some problem。 if wav.canonical == false { var extraparams uint32 // Get extra params size if err = binary.Read(wav.input, binary.LittleEndian, &extraparams); err != nil { return err } // Skip them if _, err = wav.input.Seek(int64(extraparams), os.SEEK_CUR); err != nil { return err } } when wav.canonical == false,skip too many byte?

ghost avatar Sep 19 '17 09:09 ghost

This worked for me... The length of the fmt extension (cbSize) is two bytes long. Therefore, extraparams should be uint16 and not uint32 to prevent binary.Read from reading too many bytes. To correct this, in reader.go, change to: var extraparams uint16

jbrentoliver avatar Nov 21 '17 02:11 jbrentoliver