code: function Writer (opts) {
    if (!(this instanceof Writer)) {
      return new Writer(opts);
    }
    Transform.call(this, opts);
  
    // TODO: allow/properly handle other WAVE audio formats
    this.endianness = 'LE';
    this.format = 1; // raw PCM
    this.channels = 2;
    this.sampleRate = 44100;
    this.bitDepth = 16;
    this.bytesProcessed = 0;
  
    if (opts) {
      if (opts.format != null) this.format = opts.format;
      if (opts.channels != null) this.channels = opts.channels;
      if (opts.sampleRate != null) this.sampleRate = opts.sampleRate;
      if (opts.bitDepth != null) this.bitDepth = opts.bitDepth;
    }
  
    this._writeHeader();
  }
docs: The `Writer` class accepts raw audio data written to it (only PCM audio data is
  currently supported), and outputs a WAV file with a valid WAVE header at the
  beginning specifying the formatting information of the audio stream.
  
  Note that there's an interesting problem, because the WAVE header also
  specifies the total byte length of the audio data in the file, and there's no
  way that we can know this ahead of time. Therefore the WAVE header will contain
  a byte-length if `0` initially, which most WAVE decoders will know means to
  just read until `EOF`.
  
  Optionally, if you are in a situation where you can seek back to the beginning
  of the destination of the WAVE file (like writing to a regular file, for
  example), then you may listen for the `"header"` event which will be emitted
  _after_ all the data has been written, and you can go back and rewrite the new
  header with proper audio byte length into the beginning of the destination
  (though if your destination _is_ a regular file, you should use the the
  `FileWriter` class instead).
  
  @param {Object} opts optional options object
  @api public