mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio/wav: Bug fix: add header size to offset only when whence is 0
This commit is contained in:
parent
aba404d39f
commit
4e50588c0c
@ -33,7 +33,10 @@ func (s *Stream) Read(p []byte) (int, error) {
|
||||
}
|
||||
|
||||
func (s *Stream) Seek(offset int64, whence int) (int64, error) {
|
||||
return s.src.Seek(offset+s.headerSize, whence)
|
||||
if whence == 0 {
|
||||
offset += s.headerSize
|
||||
}
|
||||
return s.src.Seek(offset, whence)
|
||||
}
|
||||
|
||||
func (s *Stream) Close() error {
|
||||
|
Loading…
Reference in New Issue
Block a user