function AudioBufferManager(context, audioFileData, resolve, reject, progress) {
    this._context = context;
    this._resolve = resolve;
    this._reject = reject;
    this._progress = progress;

    this._buffers = new Map();
    this._loadingTasks = {};

    // Iterating file loading.
    for (var i = 0; i < audioFileData.length; i++) {
      var fileInfo = audioFileData[i];

      // Check for duplicates filename and quit if it happens.
      if (this._loadingTasks.hasOwnProperty(fileInfo.name)) {
        console.log('[VRAudioPanner] Duplicated filename in AudioBufferManager: ' + fileInfo.name);
        return;
      }

      // Mark it as pending (0)
      this._loadingTasks[fileInfo.name] = 0;
      _loadAudioFile(this._context, fileInfo, this._done.bind(this));
    }
  }
/**
   * A wrapper/container class for multiple file loaders.
   * @param {Object} context       AudioContext
   * @param {Object} audioFileData Audio file info in the format of {name, url}
   * @param {Function} resolve       Resolution handler for promise.
   * @param {Function} reject        Rejection handler for promise.
   * @param {Function} progress      Progress event handler.
   */
A wrapper/container class for multiple file loaders.
@param {Object} context       AudioContext
@param {Object} audioFileData Audio file info in the format of {name, url}
@param {Function} resolve       Resolution handler for promise.
@param {Function} reject        Rejection handler for promise.
@param {Function} progress      Progress event handler.
A wrapper / container class for multiple file loaders . @param { Object } context AudioContext @param { Object } audioFileData Audio file info in the format of { name url } @param { Function } resolve Resolution handler for promise . @param { Function } reject Rejection handler for promise . @param { Function } progress Progress event handler .
function AudioBufferManager(context, audioFileData, resolve, reject, progress) {
    this._context = context;
    this._resolve = resolve;
    this._reject = reject;
    this._progress = progress;
    this._buffers = new Map();
    this._loadingTasks = {};
    for (var i = 0; i < audioFileData.length; i++) {
      var fileInfo = audioFileData[i];
      if (this._loadingTasks.hasOwnProperty(fileInfo.name)) {
        console.log('[VRAudioPanner] Duplicated filename in AudioBufferManager: ' + fileInfo.name);
        return;
      }
      this._loadingTasks[fileInfo.name] = 0;
      _loadAudioFile(this._context, fileInfo, this._done.bind(this));
    }
  }
function AudioBufferManager ( context , audioFileData , resolve , reject , progress ) { this . _context = context ; this . _resolve = resolve ; this . _reject = reject ; this . _progress = progress ; this . _buffers = new Map ( ) ; this . _loadingTasks = { } ; for ( var i = 0 ; i < audioFileData . length ; i ++ ) { var fileInfo = audioFileData [ i ] ; if ( this . _loadingTasks . hasOwnProperty ( fileInfo . name ) ) { console . log ( '[VRAudioPanner] Duplicated filename in AudioBufferManager: ' + fileInfo . name ) ; return ; } this . _loadingTasks [ fileInfo . name ] = 0 ; _loadAudioFile ( this . _context , fileInfo , this . _done . bind ( this ) ) ; } }
A wrapper/container class for multiple file loaders.
A wrapper / container class for multiple file loaders .
// Iterating file loading. // Check for duplicates filename and quit if it happens. // Mark it as pending (0)