audio

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

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.

func (*Player) Close

func (p *Player) Close() error

func (*Player) Play

func (p *Player) Play() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL