From 7f320f95186fe6f8558af20aec0cad0617afa806 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 14 Jul 2017 01:45:36 +0900 Subject: [PATCH] audio: Fix doc --- audio/audio.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/audio/audio.go b/audio/audio.go index fc0db5c3c..e404cdb53 100644 --- a/audio/audio.go +++ b/audio/audio.go @@ -169,10 +169,6 @@ func (p *players) hasSource(src ReadSeekCloser) bool { // } // ebiten.Run(run, update, 320, 240, 2, "Audio test") // } -// -// This is 'sync mode' in that game's (logical) time and audio time are synchronized. -// You can also call Update independently from the game loop as 'async mode'. -// In this case, audio goes on even when the game stops e.g. by diactivating the screen. type Context struct { players *players errCh chan error @@ -282,6 +278,11 @@ func (c *Context) loop() { } // Update returns an error if some errors happen. +// +// As of 1.6.0-alpha, this just returns the error if an error happens internally, +// and do nothing related to updating the state. +// Then, the audio is available without Update, +// but it is recommended to call Update every frame. func (c *Context) Update() error { select { case err := <-c.errCh: