Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooManyPlayers = errors.New("audio: too many players exist")
Functions ¶
This section is empty.
Types ¶
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
func NewPlayer ¶
func NewPlayer(src io.ReadSeeker, sampleRate int) (*Player, error)
NewPlayer creates a new player with the given data to the given channel. The given data is queued to the end of the buffer. This may not be played immediately when data already exists in the buffer.
src's format must be linear PCM (16bits, 2 channel stereo, little endian) without a header (e.g. RIFF header).
TODO: Pass sample rate and num of channels.
Click to show internal directories.
Click to hide internal directories.