player

package
v0.0.0-...-a1d808b Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: GPL-3.0, GPL-3.0-or-later Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlayer

func NewPlayer(basepath string, volume float64, stdlog *log.Logger, dbglog *log.Logger) (p *player, err error)

Types

type Meter

type Meter []MeterChannel

type MeterChannel

type MeterChannel struct {
	Peak  float64
	Decay float64
}

type Player

type Player struct {
	// contains filtered or unexported fields
}

func (*Player) AddStateChangeHandler

func (p *Player) AddStateChangeHandler(callback StateChangeCB, userdata interface{}) error

func (*Player) AddUpdateHandler

func (p *Player) AddUpdateHandler(callback UpdateCB, userdata interface{}) error

func (*Player) Load

func (p *Player) Load(cart, cut uint) error

func (*Player) Pause

func (p *Player) Pause() error

func (*Player) Play

func (p *Player) Play() error

func (*Player) PlayPause

func (p *Player) PlayPause() error

func (*Player) Seek

func (p *Player) Seek(pos float64) error

func (*Player) Stop

func (p *Player) Stop() error

func (*Player) Unload

func (p *Player) Unload() error

type State

type State int
const (
	IDLE State = 1 + iota
	PAUSED
	PLAYING
)

type StateChangeCB

type StateChangeCB func(state State, userdata interface{}) bool

type UpdateCB

type UpdateCB func(duration time.Duration, pos time.Duration, meter Meter, userdata interface{}) bool

Jump to

Keyboard shortcuts

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