<commit_before>"use strict";

var _ = require("./utils");

_.NeuDC = require("./dc");

/**
 * Apply mul, add
 *
 * @param {AudioContext} context
 * @param {NeuUGen}      ugen
 * @param {object}       spec
 * @return {AudioNode}   applied mul, add
 */
function makeOutlet(context, ugen, spec) {
  var outlet;

  var mul = spec.mul;
  var add = spec.add;
  var node = _.findAudioNode(ugen);

  if (!_.isAudioNode(node)) {
    return null;
  }

  if (mul === 0) {
    if (_.isValidInput(add)) {
      if (_.isNumber(add)) {
        add = _.findAudioNode(new _.NeuDC(context, add));
      }
      return add;
    }
    return _.findAudioNode(new _.NeuDC(context, 0));
  }

  if (_.isValidInput(mul) && mul !== 0 && mul !== 1) {
    /*
     * +------+
     * | node |
     * +------+
     *   |
     * +--------------+
     * | GainNode     |
     * | - gain: mul  |
     * +--------------+
     *   |
     */
    if (node.$maddOptimizable && node.gain.value === 1) {
      outlet = node;
      node.$maddOptimizable = false;
    } else {<commit_msg>fix NeuUGen::makeOutlet: variable name typo<commit_after>"use strict";

var _ = require("./utils");

_.NeuDC = require("./dc");

/**
 * Apply mul, add
 *
 * @param {AudioContext} context
 * @param {NeuUnit}      unit
 * @param {object}       spec
 * @return {AudioNode}   applied mul, add
 */
function makeOutlet(context, unit, spec) {
  var outlet;

  var mul = spec.mul;
  var add = spec.add;
  var node = _.findAudioNode(unit);

  if (!_.isAudioNode(node)) {
    return null;
  }

  if (mul === 0) {
    if (_.isValidInput(add)) {
      if (_.isNumber(add)) {
        add = _.findAudioNode(new _.NeuDC(context, add));
      }
      return add;
    }
    return _.findAudioNode(new _.NeuDC(context, 0));
  }

  if (_.isValidInput(mul) && mul !== 0 && mul !== 1) {
    /*
     * +------+
     * | node |
     * +------+
     *   |
     * +--------------+
     * | GainNode     |
     * | - gain: mul  |
     * +--------------+
     *   |
     */
    if (node.$maddOptimizable && node.gain.value === 1) {
      outlet = node;
      node.$maddOptimizable = false;
    } else {
{'fraction_non_alphanumeric': 0.2089622641509434, 'fraction_numerical': 0.0047169811320754715, 'mean_word_length': 1.8242343541944075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2846085', 'n_tokens_mistral': 774, 'n_tokens_neox': 754, 'n_words': 160}