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()
ebiten.SetRunnableInBackground(!b)
}
if err := p.audioContext.Update(); err != nil {
return err
}
return nil
}

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}