snd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetPulseBufferSize

func SetPulseBufferSize(d time.Duration) error

Types

type Batch

type Batch struct {
	Data []int16
	Err  error
}

type Params

type Params struct {
	DeviceOrFile string
	Rate         int
	Channels     int
	FrameLength  time.Duration
}

type PulsePlayer

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

func NewPulsePlayer

func NewPulsePlayer(params Params) (*PulsePlayer, error)

func (*PulsePlayer) Batches

func (p *PulsePlayer) Batches() chan<- []int16

func (*PulsePlayer) Errors

func (p *PulsePlayer) Errors() <-chan error

func (*PulsePlayer) Stop

func (p *PulsePlayer) Stop()

func (*PulsePlayer) Stopped

func (p *PulsePlayer) Stopped() <-chan struct{}

type PulseRecorder

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

func NewPulseRecorder

func NewPulseRecorder(params Params) (*PulseRecorder, error)

func (*PulseRecorder) Batches

func (p *PulseRecorder) Batches() <-chan Batch

func (*PulseRecorder) Stop

func (p *PulseRecorder) Stop()

type Reader

type Reader interface {
	Batches() <-chan Batch
	Stop()
}

func NewReader

func NewReader(params Params) (Reader, error)

type WavReader

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

func NewWavReader

func NewWavReader(params Params) (*WavReader, error)

func (*WavReader) Batches

func (w *WavReader) Batches() <-chan Batch

func (*WavReader) Stop

func (w *WavReader) Stop()

Jump to

Keyboard shortcuts

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