From f78f4002fa6dac791e5d0c02f6e8f92dbdbd1b8e Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 15 Jan 2017 01:16:36 +0900 Subject: [PATCH] audio: Bug fix: wav.Decoder.Seek's returning value was wrong --- audio/wav/decode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/wav/decode.go b/audio/wav/decode.go index e1cd39fc1..326bf7b84 100644 --- a/audio/wav/decode.go +++ b/audio/wav/decode.go @@ -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.