diff --git a/internal/uidriver/mobile/ui.go b/internal/uidriver/mobile/ui.go index f0d9b0c1a..2f81fd552 100644 --- a/internal/uidriver/mobile/ui.go +++ b/internal/uidriver/mobile/ui.go @@ -269,19 +269,16 @@ func (u *UserInterface) scaleImpl() float64 { } func (u *UserInterface) update(context driver.UIContext) error { -render: - for { - t := time.NewTimer(500 * time.Millisecond) - defer t.Stop() + t := time.NewTimer(500 * time.Millisecond) + defer t.Stop() - select { - case <-renderCh: - break render - case <-t.C: - context.SuspendAudio() - continue - } + select { + case <-renderCh: + case <-t.C: + context.SuspendAudio() + <-renderCh } + context.ResumeAudio() defer func() {