Versions in this module Expand all Collapse all v0 v0.1.0 Oct 4, 2026 Changes in this version + var COMMID = [4]byte + var COMTID = [4]byte + var Debug = false + var ErrFmtNotSupported = errors.New("format not supported") + var ErrUnexpectedData = errors.New("unexpected data content") + var SSNDID = [4]byte + func AppleNoteToPitch(note uint16) string + func AppleScaleToString(scale uint16) string + type AppleMetadata struct + Beats uint32 + Denominator uint16 + IsLooping bool + Note uint16 + Numerator uint16 + Scale uint16 + Tags []string + type Chunk struct + ID [4]byte + Pos int + R io.Reader + Size int + func (ch *Chunk) Done() + func (ch *Chunk) IsFullyRead() bool + func (ch *Chunk) Jump(bytesAhead int) error + func (ch *Chunk) Read(p []byte) (n int, err error) + func (ch *Chunk) ReadBE(dst interface{}) error + func (ch *Chunk) ReadByte() (byte, error) + func (ch *Chunk) ReadLE(dst interface{}) error + type Decoder struct + AppleInfo AppleMetadata + BitDepth uint16 + Comments []string + Encoding [4]byte + EncodingName string + Form [4]byte + HasAppleInfo bool + ID [4]byte + NumChans uint16 + NumSampleFrames uint32 + PCMChunk *Chunk + PCMSize uint32 + SampleRate int + Size uint32 + func NewDecoder(r io.ReadSeeker) *Decoder + func (d *Decoder) Drain() error + func (d *Decoder) Duration() (time.Duration, error) + func (d *Decoder) EOF() bool + func (d *Decoder) Err() error + func (d *Decoder) Format() *audio.Format + func (d *Decoder) FullPCMBuffer() (*audio.IntBuffer, error) + func (d *Decoder) FwdToPCM() error + func (d *Decoder) IsValidFile() bool + func (d *Decoder) NextChunk() (*Chunk, error) + func (d *Decoder) PCMBuffer(buf *audio.IntBuffer) (n int, err error) + func (d *Decoder) PCMLen() int64 + func (d *Decoder) ReadInfo() + func (d *Decoder) Reset() + func (d *Decoder) Rewind() error + func (d *Decoder) SampleBitDepth() int32 + func (d *Decoder) Seek(offset int64, whence int) (int64, error) + func (d *Decoder) String() string + func (d *Decoder) Tempo() float64 + func (d *Decoder) WasPCMAccessed() bool + type Encoder struct + BitDepth int + NumChans int + SampleRate int + WrittenBytes int + func NewEncoder(w io.WriteSeeker, sampleRate, bitDepth, numChans int) *Encoder + func (e *Encoder) AddBE(src interface{}) error + func (e *Encoder) AddLE(src interface{}) error + func (e *Encoder) Close() error + func (e *Encoder) Write(buf *audio.IntBuffer) error + type PCMFormat struct + BitDepth int + Channels int + Frames int64 + SampleRate int + type PCMReader struct + Format PCMFormat + func NewPCMReader(r io.ReadSeeker) (*PCMReader, error) + func (d *PCMReader) ReadPCM(dst []int32) (int, error) + type PCMWriter struct + Format PCMFormat + func NewPCMWriter(w io.Writer, f PCMFormat) (*PCMWriter, error) + func (e *PCMWriter) Close() error + func (e *PCMWriter) WritePCM(src []int32) error