Versions in this module Expand all Collapse all v1 v1.0.1 Jun 29, 2023 Changes in this version + func Resample(source io.ReadSeeker, size int64, from, to int) io.ReadSeeker + type Context struct + func CurrentContext() *Context + func NewContext(sampleRate int) *Context + func (c *Context) IsReady() bool + func (c *Context) NewPlayer(src io.Reader) (*Player, error) + func (c *Context) NewPlayerFromBytes(src []byte) *Player + func (c *Context) SampleRate() int + type InfiniteLoop struct + func NewInfiniteLoop(src io.ReadSeeker, length int64) *InfiniteLoop + func NewInfiniteLoopWithIntro(src io.ReadSeeker, introLength int64, loopLength int64) *InfiniteLoop + func (i *InfiniteLoop) Read(b []byte) (int, error) + func (i *InfiniteLoop) Seek(offset int64, whence int) (int64, error) + type Player struct + func NewPlayer(context *Context, src io.Reader) (*Player, error) + func NewPlayerFromBytes(context *Context, src []byte) *Player + func (p *Player) Close() error + func (p *Player) Current() time.Duration + func (p *Player) IsPlaying() bool + func (p *Player) Pause() + func (p *Player) Play() + func (p *Player) Rewind() error + func (p *Player) Seek(offset time.Duration) error + func (p *Player) SetBufferSize(bufferSize time.Duration) + func (p *Player) SetVolume(volume float64) + func (p *Player) Volume() float64