audio: Bug fix: wav.Decoder.Seek's returning value was wrong

This commit is contained in:
Hajime Hoshi 2017-01-15 01:16:36 +09:00
parent 9620c4efb2
commit f78f4002fa

View File

@ -57,7 +57,7 @@ func (s *Stream) Seek(offset int64, whence int) (int64, error) {
return 0, fmt.Errorf("wav: invalid offset")
}
s.remaining = s.dataSize - (n - s.headerSize)
return n, nil
return n - s.headerSize, nil
}
// Read is implementation of io.Closer's Close.