docs: function ResonanceAudio(context, options) {
    // Public variables.
    /**
     * Binaurally-rendered stereo (2-channel) output {@link
     * https://developer.mozilla.org/en-US/docs/Web/API/AudioNode AudioNode}.
     * @member {AudioNode} output
     * @memberof ResonanceAudio
     * @instance
     */
    /**
     * Ambisonic (multichannel) input {@link
     * https://developer.mozilla.org/en-US/docs/Web/API/AudioNode AudioNode}
     * (For rendering input soundfields).
     * @member {AudioNode} ambisonicInput
     * @memberof ResonanceAudio
     * @instance
     */
    /**
     * Ambisonic (multichannel) output {@link
     * https://developer.mozilla.org/en-US/docs/Web/API/AudioNode AudioNode}
     * (For allowing external rendering / post-processing).
     * @member {AudioNode} ambisonicOutput
     * @memberof ResonanceAudio
     * @instance
     */
  
    // Use defaults for undefined arguments.
    if (options == undefined) {
      options = {};
    }
    if (options.ambisonicOrder == undefined) {
      options.ambisonicOrder = Utils.DEFAULT_AMBISONIC_ORDER;
    }
    if (options.listenerPosition == undefined) {
      options.listenerPosition = Utils.DEFAULT_POSITION.slice();
    }
    if (options.listenerForward == undefined) {
      options.listenerForward = Utils.DEFAULT_FORWARD.slice();
    }
    if (options.listenerUp == undefined) {
      options.listenerUp = Utils.DEFAULT_UP.slice();
    }
    if (options.dimensions == undefined) {
      options.dimensions = {};
      Object.assign(options.dimensions, Utils.DEFAULT_ROOM_DIMENSIONS);
    }
    if (options.materials == undefined) {
      options.materials = {};
      Object.assign(options.materials, Utils.DEFAULT_ROOM_MATERIALS);
    }
    if (options.speedOfSound == undefined) {
      options.speedOfSound = Utils.DEFAULT_SPEED_OF_SOUND;
    }
  
    // Create member submodules.
    this._ambisonicOrder = Encoder.validateAmbisonicOrder(options.ambisonicOrder);
    this._sources = [];
    this._room = new Room(context, {
      listenerPosition: options.listenerPosition,
      dimensions: options.dimensions,
      materials: options.materials,
      speedOfSound: options.speedOfSound,
    });
    this._listener = new Listener(context, {
      ambisonicOrder: options.ambisonicOrder,
      position: options.listenerPosition,
      forward: options.listenerForward,
      up: options.listenerUp,
    });
  
    // Create auxillary audio nodes.
    this._context = context;
    this.output = context.createGain();
    this.ambisonicOutput = context.createGain();
    this.ambisonicInput = this._listener.input;
  
    // Connect audio graph.
    this._room.output.connect(this._listener.input);
    this._listener.output.connect(this.output);
    this._listener.ambisonicOutput.connect(this.ambisonicOutput);
  }