doc: Explaing about audio syncing

This commit is contained in:
Hajime Hoshi 2017-07-14 02:26:41 +09:00
parent bfb6a2bfe7
commit 8dda875c30
5 changed files with 6 additions and 3 deletions

View File

@ -20,7 +20,7 @@ Note: Gamepad is not available on Safari/Android/iOS. Keyboard is not available
* 2D Graphics (Geometry/Color matrix transformation, Various composition modes, Offscreen rendering, Fullscreen) * 2D Graphics (Geometry/Color matrix transformation, Various composition modes, Offscreen rendering, Fullscreen)
* Input (Mouse, Keyboard, Gamepads, Touches) * Input (Mouse, Keyboard, Gamepads, Touches)
* Audio (MP3, Ogg/Vorbis, WAV, PCM) * Audio (MP3, Ogg/Vorbis, WAV, PCM, Syncing with game progress)
## Web Site ## Web Site

View File

@ -51,7 +51,7 @@
<dt>Input</dt> <dt>Input</dt>
<dd>Mouse, Keyboard, Gamepads, Touches</dd> <dd>Mouse, Keyboard, Gamepads, Touches</dd>
<dt>Audio</dt> <dt>Audio</dt>
<dd>MP3, Ogg/Vorbis, WAV, PCM</dd> <dd>MP3, Ogg/Vorbis, WAV, PCM, Syncing with game progress</dd>
</dl> </dl>
<h2 id="examples">Examples</h2> <h2 id="examples">Examples</h2>

View File

@ -24,6 +24,8 @@
// and you can play sound by calling Play function of players. // and you can play sound by calling Play function of players.
// When multiple players play, mixing is automatically done. // When multiple players play, mixing is automatically done.
// Note that too many players may cause distortion. // Note that too many players may cause distortion.
//
// Ebiten's game progress always synchronizes with audio progress.
package audio package audio
import ( import (

View File

@ -302,6 +302,7 @@ func main() {
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
musicPlayer, err = NewPlayer(audioContext) musicPlayer, err = NewPlayer(audioContext)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)

View File

@ -51,7 +51,7 @@
<dt>Input</dt> <dt>Input</dt>
<dd>Mouse, Keyboard, Gamepads, Touches</dd> <dd>Mouse, Keyboard, Gamepads, Touches</dd>
<dt>Audio</dt> <dt>Audio</dt>
<dd>MP3, Ogg/Vorbis, WAV, PCM</dd> <dd>MP3, Ogg/Vorbis, WAV, PCM, Syncing with game progress</dd>
</dl> </dl>
<h2 id="examples">Examples</h2> <h2 id="examples">Examples</h2>