audio: Better error message

This commit is contained in:
Hajime Hoshi 2018-07-23 02:28:07 +09:00
parent 05ac690db5
commit 082556ad5c

View File

@ -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)