/*
 * Copyright (c) 2013 Csernik Flaviu Andrei
 *
 * See the file LICENSE.txt for copying permission.
 * 
 */

"use strict";

window.AudioContext = window.AudioContext || window.webkitAudioContext;

function PropertyNotInitialized(obj, propName) {
  this.property = propName;
  this.obj      = obj;
}

PropertyNotInitialized.prototype.toString = function () {
  return this.obj + " : " + this.property + " not initialized.";
};

function isInteger(n) {
   return typeof n === "number" && Math.floor(n) == n;
}

function checkNat(callerName, n) {

  if (isInteger) {
    if (value <= 0) {
      throw new RangeError("downsampleFactor must be a positive." +
                           "given number is not: " + value);
    }
  } else {
    throw new TypeError("downsampleFactor accepts an integer but" +
                        "given type is " + typeof value);
  }

}
/*
 * Copyright (c) 2013 Csernik Flaviu Andrei
 *
 * See the file LICENSE.txt for copying permission.
 * 
 */

"use strict";

function PropertyNotInitialized(obj, propName) {
  this.property = propName;
  this.obj      = obj;
}

PropertyNotInitialized.prototype.toString = function () {
  return this.obj + " : " + this.property + " not initialized.";
};

function isInteger(n) {
   return typeof n === "number" && Math.floor(n) == n;
}

function checkNat(callerName, n) {

  if (isInteger) {
    if (value <= 0) {
      throw new RangeError("downsampleFactor must be a positive." +
                           "given number is not: " + value);
    }
  } else {
    throw new TypeError("downsampleFactor accepts an integer but" +
                        "given type is " + typeof value);
  }

}
--- 
+++ 
@@ -6,6 +6,8 @@
  */
 
 "use strict";
+
+window.AudioContext = window.AudioContext || window.webkitAudioContext;
 
 function PropertyNotInitialized(obj, propName) {
   this.property = propName;
Fix AudioContext not define reference error.
