audio: wav: fix seeking to include the header

This commit is contained in:
faiface 2017-07-11 20:12:04 +02:00
parent ce53548e84
commit 35a24edbda
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ func (s *Streamer) Seek(d time.Duration) {
}
frame := int32(d / (time.Second / time.Duration(s.h.sampleRate)))
pos := frame * int32(s.h.bytesPerFrame)
_, err := s.rsc.Seek(int64(pos), io.SeekStart)
_, err := s.rsc.Seek(int64(pos)+44, io.SeekStart) // 44 is the size of the header
if err != nil {
s.err = err
return