Skip to content

Commit

Permalink
Merge pull request #183 from gopxl/fix-wav-pop-sound-with-unknown-chunk
Browse files Browse the repository at this point in the history
Fix WAV pop sound after seek with unknown chunk in header
  • Loading branch information
MarkKremer authored Sep 6, 2024
2 parents 01d1fa4 + bf86e64 commit 376f6c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wav/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func Decode(r io.Reader) (s beep.StreamSeekCloser, format beep.Format, err error
if err := binary.Read(r, binary.LittleEndian, trash); err != nil {
return nil, beep.Format{}, errors.Wrap(err, "wav: missing unknown chunk body")
}
d.hsz += 4 + fs //add size of (Unknown formtype + formsize)
d.hsz += 4 + 4 + fs //add size of (Unknown formtype + formsize + its trailing size)
}
}

Expand Down

0 comments on commit 376f6c5

Please sign in to comment.