From 5f1d1ec4122ecdf6a89e3cdebf0ed00086b47f94 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 30 Jul 2023 16:05:17 +0900 Subject: [PATCH] update Oto to v3.0.0-alpha.2 --- audio/export_test.go | 2 +- audio/player.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/audio/export_test.go b/audio/export_test.go index e92159d2d4e8..8a60998a4fbf 100644 --- a/audio/export_test.go +++ b/audio/export_test.go @@ -86,7 +86,7 @@ func (p *dummyPlayer) SetVolume(volume float64) { p.volume = volume } -func (p *dummyPlayer) UnplayedBufferSize() int { +func (p *dummyPlayer) BufferedSize() int { return 0 } diff --git a/audio/player.go b/audio/player.go index f10e2f092178..5b0b991dbd10 100644 --- a/audio/player.go +++ b/audio/player.go @@ -29,7 +29,7 @@ type player interface { IsPlaying() bool Volume() float64 SetVolume(volume float64) - UnplayedBufferSize() int + BufferedSize() int Err() error SetBufferSize(bufferSize int) io.Seeker @@ -251,7 +251,7 @@ func (p *playerImpl) Current() time.Duration { return 0 } - samples := (p.stream.Current() - int64(p.player.UnplayedBufferSize())) / bytesPerSampleInt16 + samples := (p.stream.Current() - int64(p.player.BufferedSize())) / bytesPerSampleInt16 return time.Duration(samples) * time.Second / time.Duration(p.factory.sampleRate) } diff --git a/go.mod b/go.mod index e63b25326441..c337273c9586 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/hajimehoshi/ebiten/v2 go 1.18 require ( - github.com/ebitengine/oto/v3 v3.0.0-alpha.1 + github.com/ebitengine/oto/v3 v3.0.0-alpha.2 github.com/ebitengine/purego v0.5.0-alpha github.com/go-text/typesetting v0.0.0-20230717141307-09c70c30a055 github.com/hajimehoshi/bitmapfont/v3 v3.0.0 diff --git a/go.sum b/go.sum index dd15971ff796..fba8318e1c66 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ebitengine/oto/v3 v3.0.0-alpha.1 h1:179m7zA+RI95RHomdYXO3HBcm18PA1lwJ/AjQfDxeI0= -github.com/ebitengine/oto/v3 v3.0.0-alpha.1/go.mod h1:50zY546V7eVjIb6+jZGPrcSG64nGfKqDgPnwFft05o0= +github.com/ebitengine/oto/v3 v3.0.0-alpha.2 h1:j5Eglr6LHBH/5FE/b6EuZG5a0sC9W8Srbmc2iXmWCqk= +github.com/ebitengine/oto/v3 v3.0.0-alpha.2/go.mod h1:50zY546V7eVjIb6+jZGPrcSG64nGfKqDgPnwFft05o0= github.com/ebitengine/purego v0.5.0-alpha h1:pNZNC8WofBTN3Nm196An50C5taL/87BhFR/RzKy2o4k= github.com/ebitengine/purego v0.5.0-alpha/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= github.com/go-text/typesetting v0.0.0-20230717141307-09c70c30a055 h1:aUv3DYpk2eraRoyB7QZkyxgTVF7DrWcUui93iFRYO+8=