mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
audio: Fix doc
This commit is contained in:
parent
0379e3c591
commit
3db965d547
@ -158,27 +158,7 @@ func (p *players) hasSource(src ReadSeekCloser) bool {
|
|||||||
// At most one Context object can exist in one process.
|
// At most one Context object can exist in one process.
|
||||||
// This means only one constant sample rate is valid in your one application.
|
// This means only one constant sample rate is valid in your one application.
|
||||||
//
|
//
|
||||||
// The typical usage with ebiten package is:
|
// For a typical usage example, see examples/wav/main.go.
|
||||||
//
|
|
||||||
// var audioContext *audio.Context
|
|
||||||
//
|
|
||||||
// func update(screen *ebiten.Image) error {
|
|
||||||
// // Update just checks the current audio error.
|
|
||||||
// if err := audioContext.Update(); err != nil {
|
|
||||||
// return err
|
|
||||||
// }
|
|
||||||
// // ...
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func main() {
|
|
||||||
// audioContext, err = audio.NewContext(sampleRate)
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
// if err := ebiten.Run(run, update, 320, 240, 2, "Audio test"); err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
type Context struct {
|
type Context struct {
|
||||||
players *players
|
players *players
|
||||||
initCh chan struct{}
|
initCh chan struct{}
|
||||||
|
Loading…
Reference in New Issue
Block a user