mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
audio: Better error message
This commit is contained in:
parent
05ac690db5
commit
082556ad5c
@ -58,7 +58,7 @@ func (i *InfiniteLoop) Seek(offset int64, whence int) (int64, error) {
|
|||||||
}
|
}
|
||||||
next = current + offset
|
next = current + offset
|
||||||
case io.SeekEnd:
|
case io.SeekEnd:
|
||||||
return 0, fmt.Errorf("audio: whence must be 0 or 1 for InfiniteLoop")
|
return 0, fmt.Errorf("audio: whence must be io.SeekStart or io.SeekCurrent for InfiniteLoop")
|
||||||
}
|
}
|
||||||
next %= i.size
|
next %= i.size
|
||||||
pos, err := i.stream.Seek(next, io.SeekStart)
|
pos, err := i.stream.Seek(next, io.SeekStart)
|
||||||
|
Loading…
Reference in New Issue
Block a user