mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
examples/flappy: use DecodeWithSampleRate instead of Decode
This commit is contained in:
parent
9b7328442b
commit
648c8ed1f9
@ -179,7 +179,7 @@ func (g *Game) init() {
|
|||||||
g.audioContext = audio.NewContext(48000)
|
g.audioContext = audio.NewContext(48000)
|
||||||
}
|
}
|
||||||
|
|
||||||
jumpD, err := vorbis.Decode(g.audioContext, bytes.NewReader(raudio.Jump_ogg))
|
jumpD, err := vorbis.DecodeWithSampleRate(48000, bytes.NewReader(raudio.Jump_ogg))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ func (g *Game) init() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
jabD, err := wav.Decode(g.audioContext, bytes.NewReader(raudio.Jab_wav))
|
jabD, err := wav.DecodeWithSampleRate(48000, bytes.NewReader(raudio.Jab_wav))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user