code: func (c *Parser) Duration() (time.Duration, error) {
  	if c == nil {
  		return 0, errors.New("can't calculate the duration of a nil pointer")
  	}
  	if c.ID == [4]byte{} || c.AvgBytesPerSec == 0 {
  		err := c.Parse()
  		if err != nil {
  			return 0, nil
  		}
  	}
  	switch c.Format {
  	case WavFormatID:
  		return c.wavDuration()
  	default:
  		return 0, ErrFmtNotSupported
  	}
  }
docs: // Duration returns the time duration for the current RIFF container
  // based on the sub format (wav etc...)