Versions in this module Expand all Collapse all v1 v1.0.0 Mar 4, 2019 Changes in this version + type Buffer struct + func NewBuffer(f Format) *Buffer + func (b *Buffer) Append(s Streamer) + func (b *Buffer) Format() Format + func (b *Buffer) Len() int + func (b *Buffer) Pop(n int) + func (b *Buffer) Streamer(from, to int) StreamSeeker + type Ctrl struct + Paused bool + Streamer Streamer + func (c *Ctrl) Err() error + func (c *Ctrl) Stream(samples [][2]float64) (n int, ok bool) + type Format struct + NumChannels int + Precision int + SampleRate SampleRate + func (f Format) DecodeSigned(p []byte) (sample [2]float64, n int) + func (f Format) DecodeUnsigned(p []byte) (sample [2]float64, n int) + func (f Format) EncodeSigned(p []byte, sample [2]float64) (n int) + func (f Format) EncodeUnsigned(p []byte, sample [2]float64) (n int) + func (f Format) Width() int + type Mixer struct + func (m *Mixer) Add(s ...Streamer) + func (m *Mixer) Clear() + func (m *Mixer) Err() error + func (m *Mixer) Len() int + func (m *Mixer) Stream(samples [][2]float64) (n int, ok bool) + type Resampler struct + func Resample(quality int, old, new SampleRate, s Streamer) *Resampler + func ResampleRatio(quality int, ratio float64, s Streamer) *Resampler + func (r *Resampler) Err() error + func (r *Resampler) Ratio() float64 + func (r *Resampler) SetRatio(ratio float64) + func (r *Resampler) Stream(samples [][2]float64) (n int, ok bool) + type SampleRate int + func (sr SampleRate) D(n int) time.Duration + func (sr SampleRate) N(d time.Duration) int + type StreamCloser interface + Close func() error + type StreamSeekCloser interface + Close func() error + Len func() int + Position func() int + Seek func(p int) error + type StreamSeeker interface + Len func() int + Position func() int + Seek func(p int) error + type Streamer interface + Err func() error + Stream func(samples [][2]float64) (n int, ok bool) + func Callback(f func()) Streamer + func Dup(s Streamer) (t, u Streamer) + func Iterate(g func() Streamer) Streamer + func Loop(count int, s StreamSeeker) Streamer + func Mix(s ...Streamer) Streamer + func Seq(s ...Streamer) Streamer + func Silence(num int) Streamer + func Take(num int, s Streamer) Streamer + type StreamerFunc func(samples [][2]float64) (n int, ok bool) + func (sf StreamerFunc) Err() error + func (sf StreamerFunc) Stream(samples [][2]float64) (n int, ok bool)