func OpenFile(filename string) (Decoder, error) {
	f, err := os.Open(filename)
	if err != nil {
		return nil, err
	}
	return FromReader(f)
}
OpenFile is a small helper to open the filename given and passing it to
FromReader. Acts the same as FromReader with the exception of a possible
error returned from os.Open being returned.
package audec
import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"os"
)
var UnsupportedFormatError = fmt.Errorf("unsupported format")
var decoderReg = map[Format]DecoderFunc{}
type DecoderFunc func(io.Reader) (Decoder, error)
type Decoder interface {
	io.ReadCloser
}
func RegisterDecoder(form Format, fn DecoderFunc) {
	if _, ok := decoderReg[form]; ok {
		panic("double registration for decoder of format: " + string(form))
	}
	decoderReg[form] = fn
}
func GetDecoder(f Format) DecoderFunc {
	return decoderReg[f]
}