Versions in this module Expand all Collapse all v1 v1.1.0 May 22, 2022 Changes in this version type Decoder + func (d *Decoder) Rewind() error v1.0.0 Apr 4, 2019 Changes in this version + var CIDCue = [4]byte + var CIDInfo = []byte + var CIDList = [4]byte + var CIDSmpl = [4]byte + var ErrPCMChunkNotFound = errors.New("PCM Chunk not found in audio file") + func DecodeCueChunk(d *Decoder, ch *riff.Chunk) error + func DecodeListChunk(d *Decoder, ch *riff.Chunk) error + func DecodeSamplerChunk(d *Decoder, ch *riff.Chunk) error + type CuePoint struct + BlockStart uint32 + ChunkStart uint32 + DataChunkID [4]byte + ID [4]byte + Position uint32 + SampleOffset uint32 + type Decoder struct + AvgBytesPerSec uint32 + BitDepth uint16 + Metadata *Metadata + NumChans uint16 + PCMChunk *riff.Chunk + PCMSize int + SampleRate uint32 + WavAudioFormat uint16 + func NewDecoder(r io.ReadSeeker) *Decoder + 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() (*riff.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) ReadMetadata() + func (d *Decoder) SampleBitDepth() int32 + func (d *Decoder) Seek(offset int64, whence int) (int64, error) + func (d *Decoder) String() string + func (d *Decoder) WasPCMAccessed() bool + type Encoder struct + BitDepth int + Metadata *Metadata + NumChans int + SampleRate int + WavAudioFormat int + WrittenBytes int + func NewEncoder(w io.WriteSeeker, sampleRate, bitDepth, numChans, audioFormat 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 + func (e *Encoder) WriteFrame(value interface{}) error + type Metadata struct + Artist string + Comments string + Copyright string + CreationDate string + CuePoints []*CuePoint + Engineer string + Genre string + Keywords string + Location string + Medium string + Product string + SamplerInfo *SamplerInfo + Software string + Source string + Subject string + Technician string + Title string + TrackNbr string + type SampleLoop struct + CuePointID [4]byte + End uint32 + Fraction uint32 + PlayCount uint32 + Start uint32 + Type uint32 + type SamplerInfo struct + Loops []*SampleLoop + MIDIPitchFraction uint32 + MIDIUnityNote uint32 + Manufacturer [4]byte + NumSampleLoops uint32 + Product [4]byte + SMPTEFormat uint32 + SMPTEOffset uint32 + SamplePeriod uint32