code: func (file File) NewWriter(out output) (wr *Writer, err error) {
  	if file.Channels != 1 {
  		err = fmt.Errorf("sorry, only mono currently")
  		return
  	}
  
  	wr = &Writer{}
  	wr.output = out
  	wr.sampleBuf = bufio.NewWriter(out)
  	wr.options = file
  
  	// write header when close to get correct number of samples
  	_, err = wr.Seek(12, os.SEEK_SET)
  	if err != nil {
  		return
  	}
  
  	// fmt.Fprintf(wr, "%s", tokenChunkFmt)
  	n, err := wr.output.Write(tokenChunkFmt[:])
  	if err != nil {
  		return
  	}
  	wr.bytesWritten += n
  
  	chunkFmt := riffChunkFmt{
  		LengthOfHeader: 16,
  		AudioFormat:    1,
  		NumChannels:    file.Channels,
  		SampleRate:     file.SampleRate,
  		BytesPerSec:    uint32(file.Channels) * file.SampleRate * uint32(file.SignificantBits) / 8,
  		BytesPerBloc:   file.SignificantBits / 8 * file.Channels,
  		BitsPerSample:  file.SignificantBits,
  	}
  
  	err = binary.Write(wr.output, binary.LittleEndian, chunkFmt)
  	if err != nil {
  		return
  	}
  	wr.bytesWritten += 20 //sizeof riffChunkFmt
  
  	n, err = wr.output.Write(tokenData[:])
  	if err != nil {
  		return
  	}
  	wr.bytesWritten += n
  
  	// leave space for the data size
  	_, err = wr.Seek(4, os.SEEK_CUR)
  	if err != nil {
  		return
  	}
  
  	return
  }
docs: // NewWriter creates a new WaveWriter and writes the header to it