// instrument by jscoverage, do not modifly this file
(function () {
  var BASE;
  if (typeof global === 'object') {
    BASE = global;
  } else if (typeof window === 'object') {
    BASE = window;
  } else {
    throw new Error('[jscoverage] unknow ENV!');
  }
  if (!BASE._$jscoverage) {
    BASE._$jscoverage = {};
    BASE._$jscoverage_cond = {};
    BASE._$jscoverage_done = function (file, line, express) {
      if (arguments.length === 2) {
        BASE._$jscoverage[file][line] ++;
      } else {
        BASE._$jscoverage_cond[file][line] ++;
        return express;
      }
    };
    BASE._$jscoverage_init = function (base, file, lines) {
      var tmp = [];
      for (var i = 0; i < lines.length; i ++) {
        tmp[lines[i]] = 0;
      }
      base[file] = tmp;
    };
  }
})();
_$jscoverage_init(_$jscoverage, "lib/options/audio.js",[4,11,20,22,23,24,26,40,42,43,57,59,60,74,76,77,91,93,94,108,110,111,162,166,167,170,171,174,175]);
_$jscoverage_init(_$jscoverage_cond, "lib/options/audio.js",[166,170]);
_$jscoverage["lib/options/audio.js"].source = ["/*jshint node:true*/","'use strict';","","var utils = require('../utils');","","","/*"," *! Audio-related methods"," */","","module.exports = function(proto) {","  /**","   * Disable audio in the output","   *","   * @method FfmpegCommand#noAudio","   * @category Audio","   * @aliases withNoAudio","   * @return FfmpegCommand","   */","  proto.withNoAudio =","  proto.noAudio = function() {","    this._currentOutput.audio.clear();","    this._currentOutput.audioFilters.clear();","    this._currentOutput.audio('-an');","","    return this;","  };","","","  /**","   * Specify audio codec","   *","   * @method FfmpegCommand#audioCodec","   * @category Audio","   * @aliases withAudioCodec","   *","   * @param {String} codec audio codec name","   * @return FfmpegCommand","   */","  proto.withAudioCodec =","  proto.audioCodec = function(codec) {","    this._currentOutput.audio('-acodec', codec);","    return this;","  };","","","  /**","   * Specify audio bitrate","   *","   * @method FfmpegCommand#audioBitrate","   * @category Audio","   * @aliases withAudioBitrate","   *","   * @param {String|Number} bitrate audio bitrate in kbps (with an optional 'k' suffix)","   * @return FfmpegCommand","   */","  proto.withAudioBitrate =","  proto.audioBitrate = function(bitrate) {","    this._currentOutput.audio('-b:a', ('' + bitrate).replace(/k?$/, 'k'));","    return this;","  };","","","  /**","   * Specify audio channel count","   *","   * @method FfmpegCommand#audioChannels","   * @category Audio","   * @aliases withAudioChannels","   *","   * @param {Number} channels channel count","   * @return FfmpegCommand","   */","  proto.withAudioChannels =","  proto.audioChannels = function(channels) {","    this._currentOutput.audio('-ac', channels);","    return this;","  };","","","  /**","   * Specify audio frequency","   *","   * @method FfmpegCommand#audioFrequency","   * @category Audio","   * @aliases withAudioFrequency","   *","   * @param {Number} freq audio frequency in Hz","   * @return FfmpegCommand","   */","  proto.withAudioFrequency =","  proto.audioFrequency = function(freq) {","    this._currentOutput.audio('-ar', freq);","    return this;","  };","","","  /**","   * Specify audio quality","   *","   * @method FfmpegCommand#audioQuality","   * @category Audio","   * @aliases withAudioQuality","   *","   * @param {Number} quality audio quality factor","   * @return FfmpegCommand","   */","  proto.withAudioQuality =","  proto.audioQuality = function(quality) {","    this._currentOutput.audio('-aq', quality);","    return this;","  };","","","  /**","   * Specify custom audio filter(s)","   *","   * Can be called both with one or many filters, or a filter array.","   *","   * @example","   * command.audioFilters('filter1');","   *","   * @example","   * command.audioFilters('filter1', 'filter2=param1=value1:param2=value2');","   *","   * @example","   * command.audioFilters(['filter1', 'filter2']);","   *","   * @example","   * command.audioFilters([","   *   {","   *     filter: 'filter1'","   *   },","   *   {","   *     filter: 'filter2',","   *     options: 'param=value:param=value'","   *   }","   * ]);","   *","   * @example","   * command.audioFilters(","   *   {","   *     filter: 'filter1',","   *     options: ['value1', 'value2']","   *   },","   *   {","   *     filter: 'filter2',","   *     options: { param1: 'value1', param2: 'value2' }","   *   }","   * );","   *","   * @method FfmpegCommand#audioFilters","   * @aliases withAudioFilter,withAudioFilters,audioFilter","   * @category Audio","   *","   * @param {...String|String[]|Object[]} filters audio filter strings, string array or","   *   filter specification array, each with the following properties:","   * @param {String} filters.filter filter name","   * @param {String|String[]|Object} [filters.options] filter option string, array, or object","   * @return FfmpegCommand","   */","  proto.withAudioFilter =","  proto.withAudioFilters =","  proto.audioFilter =","  proto.audioFilters = function(filters) {","    if (arguments.length > 1) {","      filters = [].slice.call(arguments);","    }","","    if (!Array.isArray(filters)) {","      filters = [filters];","    }","","    this._currentOutput.audioFilters(utils.makeFilterStrings(filters));","    return this;","  };","};",""];
"use strict";

_$jscoverage_done("lib/options/audio.js", 4);
var utils = require("../utils");

_$jscoverage_done("lib/options/audio.js", 11);
module.exports = function(proto) {
    _$jscoverage_done("lib/options/audio.js", 20);
    proto.withNoAudio = proto.noAudio = function() {
        _$jscoverage_done("lib/options/audio.js", 22);
        this._currentOutput.audio.clear();
        _$jscoverage_done("lib/options/audio.js", 23);
        this._currentOutput.audioFilters.clear();
        _$jscoverage_done("lib/options/audio.js", 24);
        this._currentOutput.audio("-an");
        _$jscoverage_done("lib/options/audio.js", 26);
        return this;
    };
    _$jscoverage_done("lib/options/audio.js", 40);
    proto.withAudioCodec = proto.audioCodec = function(codec) {
        _$jscoverage_done("lib/options/audio.js", 42);
        this._currentOutput.audio("-acodec", codec);
        _$jscoverage_done("lib/options/audio.js", 43);
        return this;
    };
    _$jscoverage_done("lib/options/audio.js", 57);
    proto.withAudioBitrate = proto.audioBitrate = function(bitrate) {
        _$jscoverage_done("lib/options/audio.js", 59);
        this._currentOutput.audio("-b:a", ("" + bitrate).replace(/k?$/, "k"));
        _$jscoverage_done("lib/options/audio.js", 60);
        return this;
    };
    _$jscoverage_done("lib/options/audio.js", 74);
    proto.withAudioChannels = proto.audioChannels = function(channels) {
        _$jscoverage_done("lib/options/audio.js", 76);
        this._currentOutput.audio("-ac", channels);
        _$jscoverage_done("lib/options/audio.js", 77);
        return this;
    };
    _$jscoverage_done("lib/options/audio.js", 91);
    proto.withAudioFrequency = proto.audioFrequency = function(freq) {
        _$jscoverage_done("lib/options/audio.js", 93);
        this._currentOutput.audio("-ar", freq);
        _$jscoverage_done("lib/options/audio.js", 94);
        return this;
    };
    _$jscoverage_done("lib/options/audio.js", 108);
    proto.withAudioQuality = proto.audioQuality = function(quality) {
        _$jscoverage_done("lib/options/audio.js", 110);
        this._currentOutput.audio("-aq", quality);
        _$jscoverage_done("lib/options/audio.js", 111);
        return this;
    };
    _$jscoverage_done("lib/options/audio.js", 162);
    proto.withAudioFilter = proto.withAudioFilters = proto.audioFilter = proto.audioFilters = function(filters) {
        _$jscoverage_done("lib/options/audio.js", 166);
        if (_$jscoverage_done("lib/options/audio.js", 166, arguments.length > 1)) {
            _$jscoverage_done("lib/options/audio.js", 167);
            filters = [].slice.call(arguments);
        }
        _$jscoverage_done("lib/options/audio.js", 170);
        if (_$jscoverage_done("lib/options/audio.js", 170, !Array.isArray(filters))) {
            _$jscoverage_done("lib/options/audio.js", 171);
            filters = [ filters ];
        }
        _$jscoverage_done("lib/options/audio.js", 174);
        this._currentOutput.audioFilters(utils.makeFilterStrings(filters));
        _$jscoverage_done("lib/options/audio.js", 175);
        return this;
    };
};