audio

package
v0.0.0-...-d5cfa09 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrShortBuffer = errors.New("buffer too short")
)

Functions

func NewRecordStream

func NewRecordStream() io.ReadCloser

Types

type Player

type Player struct {
	Writer *Writer
}

func NewPlayer

func NewPlayer() *Player

func (*Player) LoadAndPlay

func (p *Player) LoadAndPlay(uri string) error

func (*Player) LoadMP3

func (p *Player) LoadMP3(uri string) (*Writer, error)

func (*Player) LoadMP3Reader

func (p *Player) LoadMP3Reader(r io.Reader) (*Writer, error)

type Reader

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

func NewReader

func NewReader(rate, channel, frames int) (*Reader, error)

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Read

func (r *Reader) Read(buf []byte) (int, error)

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}
var (
	DefaultRecorder *Recorder
)

func NewRecorder

func NewRecorder(rate, channel int) (*Recorder, error)

func (*Recorder) NewStream

func (r *Recorder) NewStream() io.ReadCloser

type Writer

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

func NewWriter

func NewWriter(rate, channel int, buffer []byte) (*Writer, error)

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Closed

func (w *Writer) Closed() bool

func (*Writer) Len

func (w *Writer) Len() time.Duration

func (*Writer) Offset

func (w *Writer) Offset() time.Duration

func (*Writer) Pause

func (w *Writer) Pause()

func (*Writer) Play

func (w *Writer) Play() error

func (*Writer) Resume

func (w *Writer) Resume()

func (*Writer) SetOffset

func (w *Writer) SetOffset(offset time.Duration)

func (*Writer) Start

func (w *Writer) Start() error

func (*Writer) Wait

func (w *Writer) Wait()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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