Skip to content

Commit

Permalink
update Oto to v3.0.0-alpha.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jul 30, 2023
1 parent d3d095a commit 5f1d1ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion audio/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions audio/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand Down

0 comments on commit 5f1d1ec

Please sign in to comment.