mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
audio/vorbis: Use consts
This commit is contained in:
parent
8eba9cfc7f
commit
38f0ec40b4
@ -58,11 +58,11 @@ func (s *Stream) Read(b []byte) (int, error) {
|
|||||||
func (s *Stream) Seek(offset int64, whence int) (int64, error) {
|
func (s *Stream) Seek(offset int64, whence int) (int64, error) {
|
||||||
next := int64(0)
|
next := int64(0)
|
||||||
switch whence {
|
switch whence {
|
||||||
case 0:
|
case io.SeekStart:
|
||||||
next = offset
|
next = offset
|
||||||
case 1:
|
case io.SeekCurrent:
|
||||||
next = int64(s.posInBytes) + offset
|
next = int64(s.posInBytes) + offset
|
||||||
case 2:
|
case io.SeekEnd:
|
||||||
next = int64(len(s.leftData)*4) + offset
|
next = int64(len(s.leftData)*4) + offset
|
||||||
}
|
}
|
||||||
s.posInBytes = int(next)
|
s.posInBytes = int(next)
|
||||||
|
Loading…
Reference in New Issue
Block a user