Versions in this module Expand all Collapse all v0 v0.0.2 Mar 13, 2024 v0.0.1 Feb 1, 2024 Changes in this version + var Float32SampleFormat = SampleFormatFunc(func(s Sample) Sample { ... }) + var Int16SampleFormat = SampleFormatFunc(func(s Sample) Sample { ... }) + func RegisterDecoder(builder DecoderBuilder) error + type Audio interface + At func(i, ch int) Sample + ChunkInfo func() ChunkInfo + SampleFormat func() SampleFormat + type Buffer struct + func NewBuffer() *Buffer + func (buff *Buffer) Load() Audio + func (buff *Buffer) StoreCopy(src Audio) + type ChunkInfo struct + Channels int + Len int + SamplingRate int + type Decoder interface + Decode func(endian binary.ByteOrder, chunk []byte, channels int) (Audio, error) + func NewDecoder(format Format) (Decoder, error) + type DecoderBuilder interface + NewDecoder func() (Decoder, Format) + type DecoderBuilderFunc func() (Decoder, Format) + func (builderFunc DecoderBuilderFunc) NewDecoder() (Decoder, Format) + type DecoderFunc func(endian binary.ByteOrder, chunk []byte, channels int) (Audio, error) + func (f DecoderFunc) Decode(endian binary.ByteOrder, chunk []byte, channels int) (Audio, error) + type EditableAudio interface + Set func(i, ch int, s Sample) + type Float32Interleaved struct + Data []float32 + Size ChunkInfo + func NewFloat32Interleaved(size ChunkInfo) *Float32Interleaved + func (a *Float32Interleaved) At(i, ch int) Sample + func (a *Float32Interleaved) ChunkInfo() ChunkInfo + func (a *Float32Interleaved) SampleFormat() SampleFormat + func (a *Float32Interleaved) Set(i, ch int, s Sample) + func (a *Float32Interleaved) SetFloat32(i, ch int, s Float32Sample) + func (a *Float32Interleaved) SubAudio(offsetSamples, nSamples int) *Float32Interleaved + type Float32NonInterleaved struct + Data [][]float32 + Size ChunkInfo + func NewFloat32NonInterleaved(size ChunkInfo) *Float32NonInterleaved + func (a *Float32NonInterleaved) At(i, ch int) Sample + func (a *Float32NonInterleaved) ChunkInfo() ChunkInfo + func (a *Float32NonInterleaved) SampleFormat() SampleFormat + func (a *Float32NonInterleaved) Set(i, ch int, s Sample) + func (a *Float32NonInterleaved) SetFloat32(i, ch int, s Float32Sample) + func (a *Float32NonInterleaved) SubAudio(offsetSamples, nSamples int) *Float32NonInterleaved + type Float32Sample float32 + func (s Float32Sample) Int() int64 + type Format fmt.Stringer + type Int16Interleaved struct + Data []int16 + Size ChunkInfo + func NewInt16Interleaved(size ChunkInfo) *Int16Interleaved + func (a *Int16Interleaved) At(i, ch int) Sample + func (a *Int16Interleaved) ChunkInfo() ChunkInfo + func (a *Int16Interleaved) SampleFormat() SampleFormat + func (a *Int16Interleaved) Set(i, ch int, s Sample) + func (a *Int16Interleaved) SetInt16(i, ch int, s Int16Sample) + func (a *Int16Interleaved) SubAudio(offsetSamples, nSamples int) *Int16Interleaved + type Int16NonInterleaved struct + Data [][]int16 + Size ChunkInfo + func NewInt16NonInterleaved(size ChunkInfo) *Int16NonInterleaved + func (a *Int16NonInterleaved) At(i, ch int) Sample + func (a *Int16NonInterleaved) ChunkInfo() ChunkInfo + func (a *Int16NonInterleaved) SampleFormat() SampleFormat + func (a *Int16NonInterleaved) Set(i, ch int, s Sample) + func (a *Int16NonInterleaved) SetInt16(i, ch int, s Int16Sample) + func (a *Int16NonInterleaved) SubAudio(offsetSamples, nSamples int) *Int16NonInterleaved + type Int16Sample int16 + func (s Int16Sample) Int() int64 + type Int64Sample int64 + func (s Int64Sample) Int() int64 + type RawFormat struct + Interleaved bool + IsFloat bool + SampleSize int + func (f *RawFormat) String() string + type Sample interface + Int func() int64 + type SampleFormat interface + Convert func(c Sample) Sample + func SampleFormatFunc(f func(Sample) Sample) SampleFormat