<commit_before>/**
 * Copyright 2016 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file Omnitone library name space and user-facing APIs.
 */


'use strict';

var BufferList = require('./buffer-list.js');
var FOAConvolver = require('./foa-convolver.js');
var FOADecoder = require('./foa-decoder.js');
var FOAPhaseMatchedFilter = require('./foa-phase-matched-filter.js');
var FOARenderer = require('./foa-renderer.js');
var FOARotator = require('./foa-rotator.js');
var FOARouter = require('./foa-router.js');
var FOAVirtualSpeaker = require('./foa-virtual-speaker.js');
var HOAConvolver = require('./hoa-convolver.js');
var HOARenderer = require('./hoa-renderer.js');
var HOARotator = require('./hoa-rotator.js');
var Polyfill = require('./polyfill.js');
var Utils = require('./utils.js');
var Version = require('./version.js');

// DEPRECATED in V1, in favor of BufferList.
var AudioBufferManager = require('./audiobuffer-manager.js');


/**
 * @class Omnitone namespace.
 */
var Omnitone = {};


/**
 * An object contains the detected browser name and version.
 * @type {Object} info
 * @type {string} info.name - Browser name.
 * @type {string} info.version - Browser version.
 */
Omnitone.BrowserInfo = Polyfill.getBrowserInfo();


/**
 * DEPRECATED in V1. DO. NOT. USE.
 */
Omnitone.loadAudioBuffers = function(context, speakerData) {
  return new Promise(function(resolve, reject) {
    new AudioBufferManager(context, speakerData, function(buffers) {
      resolve(buffers);
    }, reject);
  });
};


/**
 * Performs the async loading/decoding of multiple AudioBuffers from multiple
 * URLs.
 * @param {BaseAudioContext} context - Associated BaseAudioContext.<commit_msg>Updated comment<commit_after>/**
 * Copyright 2016 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file Omnitone library name space and user-facing APIs.
 */


'use strict';

var BufferList = require('./buffer-list.js');
var FOAConvolver = require('./foa-convolver.js');
var FOADecoder = require('./foa-decoder.js');
var FOAPhaseMatchedFilter = require('./foa-phase-matched-filter.js');
var FOARenderer = require('./foa-renderer.js');
var FOARotator = require('./foa-rotator.js');
var FOARouter = require('./foa-router.js');
var FOAVirtualSpeaker = require('./foa-virtual-speaker.js');
var HOAConvolver = require('./hoa-convolver.js');
var HOARenderer = require('./hoa-renderer.js');
var HOARotator = require('./hoa-rotator.js');
var Polyfill = require('./polyfill.js');
var Utils = require('./utils.js');
var Version = require('./version.js');

// DEPRECATED in V1, in favor of BufferList.
var AudioBufferManager = require('./audiobuffer-manager.js');


/**
 * @class Omnitone namespace.
 */
var Omnitone = {};


/**
 * An object contains the detected browser name and version.
 * @type {Object} info
 * @type {string} info.name - Browser name.
 * @type {string} info.version - Browser version.
 */
Omnitone.BrowserInfo = Polyfill.getBrowserInfo();


// DEPRECATED in V1. DO. NOT. USE.
Omnitone.loadAudioBuffers = function(context, speakerData) {
  return new Promise(function(resolve, reject) {
    new AudioBufferManager(context, speakerData, function(buffers) {
      resolve(buffers);
    }, reject);
  });
};


/**
 * Performs the async loading/decoding of multiple AudioBuffers from multiple
 * URLs.
 * @param {BaseAudioContext} context - Associated BaseAudioContext.
{'fraction_non_alphanumeric': 0.13670999551770507, 'fraction_numerical': 0.0044822949350067235, 'mean_word_length': 4.0600907029478455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6294730', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1300, 'n_words': 422}