From 648c8ed1f975144134961b6c39582ce74b477ade Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 10 Apr 2022 14:55:48 +0900 Subject: [PATCH] examples/flappy: use DecodeWithSampleRate instead of Decode --- examples/flappy/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/flappy/main.go b/examples/flappy/main.go index 894321d48..e2faea936 100644 --- a/examples/flappy/main.go +++ b/examples/flappy/main.go @@ -179,7 +179,7 @@ func (g *Game) init() { 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 { log.Fatal(err) } @@ -188,7 +188,7 @@ func (g *Game) init() { 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 { log.Fatal(err) }