mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
audio: Use (*Context).NewPlayer
This commit is contained in:
parent
3f5d1762bb
commit
69087cdc40
@ -39,7 +39,7 @@ func TestGC(t *testing.T) {
|
|||||||
setup()
|
setup()
|
||||||
defer teardown()
|
defer teardown()
|
||||||
|
|
||||||
p, _ := audio.NewPlayer(context, bytes.NewReader(make([]byte, 4)))
|
p, _ := context.NewPlayer(bytes.NewReader(make([]byte, 4)))
|
||||||
got := audio.PlayersNumForTesting()
|
got := audio.PlayersNumForTesting()
|
||||||
if want := 0; got != want {
|
if want := 0; got != want {
|
||||||
t.Errorf("PlayersNum(): got: %d, want: %d", got, want)
|
t.Errorf("PlayersNum(): got: %d, want: %d", got, want)
|
||||||
@ -76,11 +76,11 @@ func TestSameSourcePlayers(t *testing.T) {
|
|||||||
defer teardown()
|
defer teardown()
|
||||||
|
|
||||||
src := bytes.NewReader(make([]byte, 4))
|
src := bytes.NewReader(make([]byte, 4))
|
||||||
p0, err := audio.NewPlayer(context, src)
|
p0, err := context.NewPlayer(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
p1, err := audio.NewPlayer(context, src)
|
p1, err := context.NewPlayer(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ func TestPauseBeforeInit(t *testing.T) {
|
|||||||
defer teardown()
|
defer teardown()
|
||||||
|
|
||||||
src := bytes.NewReader(make([]byte, 4))
|
src := bytes.NewReader(make([]byte, 4))
|
||||||
p, err := audio.NewPlayer(context, src)
|
p, err := context.NewPlayer(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user