code: func ReadAll(in io.Reader) ([]float32, *Format, error) {
  	r, err := NewReader(in)
  	if err != nil {
  		return nil, nil, err
  	}
  	format := &Format{
  		SampleRate: r.SampleRate(),
  		Channels:   r.Channels(),
  		Bitrate:    r.Bitrate(),
  	}
  	if r.Length() > 0 {
  		result := make([]float32, (r.Length()-r.Position())*int64(r.Channels()))
  		read := 0
  
  		for {
  			n, err := r.Read(result[read:])
  			read += n
  			if err != nil || read == len(result) {
  				if err == io.EOF {
  					err = nil
  				}
  				return result[:read], format, err
  			}
  			if n == 0 {
  				return result[:read], format, io.ErrNoProgress
  			}
  		}
  	}
  	buf := make([]float32, r.dec.BufferSize())
  	var result []float32
  	for {
  		n, err := r.Read(buf)
  		result = append(result, buf[:n]...)
  		if err != nil {
  			if err == io.EOF {
  				err = nil
  			}
  			return result, format, err
  		}
  		if n == 0 {
  			return result, format, io.ErrNoProgress
  		}
  	}
  }
docs: // ReadAll decodes audio from in until an error or EOF.