func (d *Decoder) EOF() bool {
	if d == nil || d.err == io.EOF {
		return true
	}
	return false
}
EOF returns positively if the underlying reader reached the end of file.
package wav
import (
	"bytes"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"time"
	"github.com/go-audio/audio"
	"github.com/go-audio/riff"
)
var (
	CIDList = [4]byte{'L', 'I', 'S', 'T'}
	CIDSmpl = [4]byte{'s', 'm', 'p', 'l'}
	CIDInfo = []byte{'I', 'N', 'F', 'O'}
	CIDCue = [4]byte{'c', 'u', 'e', 0x20}
)
type Decoder struct {
	r      io.ReadSeeker
	parser *riff.Parser
	NumChans   uint16
	BitDepth   uint16
	SampleRate uint32
	AvgBytesPerSec uint32
	WavAudioFormat uint16
	err             error
	PCMSize         int
	pcmDataAccessed bool
	PCMChunk *riff.Chunk
	Metadata *Metadata
}
func NewDecoder(r io.ReadSeeker) *Decoder {
	return &Decoder{
		r:      r,
		parser: riff.New(r),
	}
}
func (d *Decoder) Seek(offset int64, whence int) (int64, error) {
	return d.r.Seek(offset, whence)
}
func (d *Decoder) SampleBitDepth() int32 {
	if d == nil {
		return 0
	}
	return int32(d.BitDepth)
}
func (d *Decoder) PCMLen() int64 {
	if d == nil {
		return 0
	}
	return int64(d.PCMSize)
}
func (d *Decoder) Err() error {
	if d.err == io.EOF {
		return nil
	}
	return d.err
}