From 65b44928ad4582ea4bbfd02cb59bb37a9ea83b84 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 1 Dec 2017 02:20:37 +0900 Subject: [PATCH] examples: Remove callsites of audio.Context.Update --- examples/audio/main.go | 3 --- examples/audioinfiniteloop/main.go | 3 --- examples/pcm/main.go | 3 --- examples/piano/main.go | 3 --- examples/sinewave/main.go | 3 --- examples/wav/main.go | 3 --- 6 files changed, 18 deletions(-) diff --git a/examples/audio/main.go b/examples/audio/main.go index f17727aa0..4de199006 100644 --- a/examples/audio/main.go +++ b/examples/audio/main.go @@ -169,9 +169,6 @@ func (p *Player) update() error { b := ebiten.IsRunnableInBackground() ebiten.SetRunnableInBackground(!b) } - if err := p.audioContext.Update(); err != nil { - return err - } return nil } diff --git a/examples/audioinfiniteloop/main.go b/examples/audioinfiniteloop/main.go index 7fcc9414c..ba5a02356 100644 --- a/examples/audioinfiniteloop/main.go +++ b/examples/audioinfiniteloop/main.go @@ -65,9 +65,6 @@ func update(screen *ebiten.Image) error { } player.Play() } - if err := audioContext.Update(); err != nil { - return err - } if ebiten.IsRunningSlowly() { return nil diff --git a/examples/pcm/main.go b/examples/pcm/main.go index bad21edf6..4e3331b1b 100644 --- a/examples/pcm/main.go +++ b/examples/pcm/main.go @@ -138,9 +138,6 @@ func update(screen *ebiten.Image) error { currentNote = addNote() } frames++ - if err := audioContext.Update(); err != nil { - return err - } if ebiten.IsRunningSlowly() { return nil } diff --git a/examples/piano/main.go b/examples/piano/main.go index d50e11b06..2d0c64845 100644 --- a/examples/piano/main.go +++ b/examples/piano/main.go @@ -183,9 +183,6 @@ func update(screen *ebiten.Image) error { } addNote(220*math.Exp2(float64(i-1)/12.0), 1.0) } - if err := audioContext.Update(); err != nil { - return err - } if ebiten.IsRunningSlowly() { return nil } diff --git a/examples/sinewave/main.go b/examples/sinewave/main.go index 125eddc61..e12ad405e 100644 --- a/examples/sinewave/main.go +++ b/examples/sinewave/main.go @@ -97,9 +97,6 @@ func update(screen *ebiten.Image) error { } player.Play() } - if err := audioContext.Update(); err != nil { - return err - } if ebiten.IsRunningSlowly() { return nil } diff --git a/examples/wav/main.go b/examples/wav/main.go index 9911ff511..fbf21c31b 100644 --- a/examples/wav/main.go +++ b/examples/wav/main.go @@ -64,9 +64,6 @@ func update(screen *ebiten.Image) error { audioPlayer.Rewind() audioPlayer.Play() } - if err := audioContext.Update(); err != nil { - return err - } if ebiten.IsRunningSlowly() { return nil }