-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaudio.go
40 lines (34 loc) · 865 Bytes
/
audio.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Package audio provides is a cross platform go audio library.
It currently supports desktop and mobile using golang.org/x/mobile/exp/audio.
To use this library on linux desktop, you will need an OpenAL library
as an external dependency. You can get this on Ubuntu using:
sudo apt-get install libopenal-dev
Web support via Gopherjs is planned.
*/
package audio //import "engo.io/audio"
import (
"io"
)
// State indicates the current playing state of the player.
type State int
const (
Unknown State = iota
Initial
Playing
Paused
Stopped
)
var stateStrings = [...]string{
Unknown: "unknown",
Initial: "initial",
Playing: "playing",
Paused: "paused",
Stopped: "stopped",
}
func (s State) String() string { return stateStrings[s] }
// ReadSeekCloser is an io.ReadSeeker and io.Closer.
type ReadSeekCloser interface {
io.ReadSeeker
io.Closer
}