mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
parent
9b05d9eb35
commit
875113782a
@ -17,11 +17,11 @@ package audio
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/hajimehoshi/oto/v2"
|
||||
"github.com/ebitengine/oto/v3"
|
||||
)
|
||||
|
||||
func newContext(sampleRate int) (context, chan struct{}, error) {
|
||||
ctx, ready, err := oto.NewContextWithOptions(&oto.NewContextOptions{
|
||||
ctx, ready, err := oto.NewContext(&oto.NewContextOptions{
|
||||
SampleRate: sampleRate,
|
||||
ChannelCount: channelCount,
|
||||
Format: oto.FormatSignedInt16LE,
|
||||
@ -32,7 +32,7 @@ func newContext(sampleRate int) (context, chan struct{}, error) {
|
||||
|
||||
// otoContext is an interface for *oto.Context.
|
||||
type otoContext interface {
|
||||
NewPlayer(io.Reader) oto.Player
|
||||
NewPlayer(io.Reader) *oto.Player
|
||||
Suspend() error
|
||||
Resume() error
|
||||
Err() error
|
||||
@ -45,5 +45,5 @@ type contextProxy struct {
|
||||
|
||||
// NewPlayer implements context.
|
||||
func (c *contextProxy) NewPlayer(r io.Reader) player {
|
||||
return c.otoContext.NewPlayer(r).(player)
|
||||
return c.otoContext.NewPlayer(r)
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@ -3,11 +3,11 @@ module github.com/hajimehoshi/ebiten/v2
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/ebitengine/oto/v3 v3.0.0-alpha.0.20230730050451-6a8a3187e7ac
|
||||
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
|
||||
github.com/hajimehoshi/go-mp3 v0.3.4
|
||||
github.com/hajimehoshi/oto/v2 v2.5.0-alpha.1
|
||||
github.com/jakecoffman/cp v1.2.1
|
||||
github.com/jezek/xgb v1.1.0
|
||||
github.com/jfreymuth/oggvorbis v1.0.5
|
||||
|
4
go.sum
4
go.sum
@ -1,4 +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.0.20230730050451-6a8a3187e7ac h1:2TqRbIcWt8FxkKueI6qT8HY78oDF2Q1ckbddjp0uUp8=
|
||||
github.com/ebitengine/oto/v3 v3.0.0-alpha.0.20230730050451-6a8a3187e7ac/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=
|
||||
@ -9,8 +11,6 @@ github.com/hajimehoshi/bitmapfont/v3 v3.0.0/go.mod h1:+CxxG+uMmgU4mI2poq944i3uZ6
|
||||
github.com/hajimehoshi/go-mp3 v0.3.4 h1:NUP7pBYH8OguP4diaTZ9wJbUbk3tC0KlfzsEpWmYj68=
|
||||
github.com/hajimehoshi/go-mp3 v0.3.4/go.mod h1:fRtZraRFcWb0pu7ok0LqyFhCUrPeMsGRSVop0eemFmo=
|
||||
github.com/hajimehoshi/oto/v2 v2.3.1/go.mod h1:seWLbgHH7AyUMYKfKYT9pg7PhUu9/SisyJvNTT+ASQo=
|
||||
github.com/hajimehoshi/oto/v2 v2.5.0-alpha.1 h1:ldztpxgRmIZeOFOhXh4CBz8yQxn5mRmEVtVXD7S+Wxw=
|
||||
github.com/hajimehoshi/oto/v2 v2.5.0-alpha.1/go.mod h1:XoAqcfGced8SVzCvx7DO2YA69Zpr1NiHNhnxJawxaZ0=
|
||||
github.com/jakecoffman/cp v1.2.1 h1:zkhc2Gpo9l4NLUZfeG3j33+3bQD7MkqPa+n5PdX+5mI=
|
||||
github.com/jakecoffman/cp v1.2.1/go.mod h1:JjY/Fp6d8E1CHnu74gWNnU0+b9VzEdUVPoJxg2PsTQg=
|
||||
github.com/jezek/xgb v1.1.0 h1:wnpxJzP1+rkbGclEkmwpVFQWpuE2PUGNUzP8SbfFobk=
|
||||
|
Loading…
Reference in New Issue
Block a user