examples: Remove callsites of audio.Context.Update

This commit is contained in:
Hajime Hoshi 2017-12-01 02:20:37 +09:00
parent 3db965d547
commit 65b44928ad
6 changed files with 0 additions and 18 deletions

View File

@ -169,9 +169,6 @@ func (p *Player) update() error {
b := ebiten.IsRunnableInBackground() b := ebiten.IsRunnableInBackground()
ebiten.SetRunnableInBackground(!b) ebiten.SetRunnableInBackground(!b)
} }
if err := p.audioContext.Update(); err != nil {
return err
}
return nil return nil
} }

View File

@ -65,9 +65,6 @@ func update(screen *ebiten.Image) error {
} }
player.Play() player.Play()
} }
if err := audioContext.Update(); err != nil {
return err
}
if ebiten.IsRunningSlowly() { if ebiten.IsRunningSlowly() {
return nil return nil

View File

@ -138,9 +138,6 @@ func update(screen *ebiten.Image) error {
currentNote = addNote() currentNote = addNote()
} }
frames++ frames++
if err := audioContext.Update(); err != nil {
return err
}
if ebiten.IsRunningSlowly() { if ebiten.IsRunningSlowly() {
return nil return nil
} }

View File

@ -183,9 +183,6 @@ func update(screen *ebiten.Image) error {
} }
addNote(220*math.Exp2(float64(i-1)/12.0), 1.0) addNote(220*math.Exp2(float64(i-1)/12.0), 1.0)
} }
if err := audioContext.Update(); err != nil {
return err
}
if ebiten.IsRunningSlowly() { if ebiten.IsRunningSlowly() {
return nil return nil
} }

View File

@ -97,9 +97,6 @@ func update(screen *ebiten.Image) error {
} }
player.Play() player.Play()
} }
if err := audioContext.Update(); err != nil {
return err
}
if ebiten.IsRunningSlowly() { if ebiten.IsRunningSlowly() {
return nil return nil
} }

View File

@ -64,9 +64,6 @@ func update(screen *ebiten.Image) error {
audioPlayer.Rewind() audioPlayer.Rewind()
audioPlayer.Play() audioPlayer.Play()
} }
if err := audioContext.Update(); err != nil {
return err
}
if ebiten.IsRunningSlowly() { if ebiten.IsRunningSlowly() {
return nil return nil
} }