New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apu

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apu - npm Package Compare versions

Comparing version 0.2.23 to 0.2.24

2

dist/apu.js
var workletSource = "\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _possibleConstructorReturn(t,e){return!e||\"object\"!=typeof e&&\"function\"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function _inherits(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _wrapNativeSuper(t){var e=\"function\"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if(\"function\"!=typeof t)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,t)})(t)}function isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _construct(t,e,r){return(_construct=isNativeReflectConstruct()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf(\"[native code]\")}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GameboyProcessor=function(t){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=_possibleConstructorReturn(this,(t=_getPrototypeOf(e)).call.apply(t,[this].concat(o)))).port.onmessage=function(t){var e=t.data;if(\"write\"===e.type)r.s.registerWrite(e.layer,e.register,e.value);else if(\"play\"===e.type){var n=new Uint8Array(e.data);r.ready.then((function(){e.mask?r.s.playSFX(n,e.mask):r.s.playSong(n,e.loop)}))}else if(\"module\"===e.type){var o=WebAssembly.instantiate(e.data).then((function(t){return t.instance.exports}));o.then((function(t){t.init(sampleRate),r.lchan=new Float32Array(t.memory.buffer,t.lchan,128),r.rchan=new Float32Array(t.memory.buffer,t.rchan,128),r.updateGB=t.update,r.s=songContext(t.gb_sound_w,t.enable_channel,t.disable_channel),r.port.postMessage(\"ready\")})),r.ready=o.then((function(){return!0}))}},r}return _inherits(e,_wrapNativeSuper(AudioWorkletProcessor)),_createClass(e,[{key:\"process\",value:function(t,e){if(this.updateGB)for(var r=e[0][0],n=e[0][1],o=0;o<r.length;o+=128){for(var i=0;i<128;++i)this.s.tick();this.updateGB(),r.set(this.lchan,o),n.set(this.rchan,o)}return!0}}]),e}();function songContext(t,e,r){var n=[0,1].map((function(r){return chip(t.bind(null,r),e.bind(null,r))}));return{playSong:function(e,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[0].track=e,n[0].idx=i,n[0].timer=0,n[0].loopPoint=o,n[0].mask=[1,1,1,1],n[0].doneCallback=null,n[1].track=null,n[1].idx=-1,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=[0,0,0,0],n[1].doneCallback=null;for(var a=0;a<4;++a)r(1,a);t(0,22,0)},playSFX:function(t,e){n[0].mask=e.map((function(t){return 1-t})),n[1].track=t,n[1].idx=0,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=e,n[1].doneCallback=function(){n[0].mask=[1,1,1,1],n[1].mask=[0,0,0,0]};for(var o=0;o<4;++o)e[o]&&r(0,o)},tick:function(){n.forEach((function(t){return t.tick()}))},registerWrite:t}}function chip(t,e){var r={track:null,idx:-1,timer:0,loopPoint:-1,mask:[0,0,0,0],doneCallback:null,tick:function(){for(;r.timer<=0&&r.idx>=0;){if(r.idx>=r.track.length&&(r.idx=r.loopPoint,-1===r.idx)){r.doneCallback&&r.doneCallback();break}var n=r.track[r.idx++];if(179===n){var o=r.track[r.idx++],i=r.track[r.idx++];t(o,i),128&i&&(4===o&&r.mask[0]?e(0):9===o&&r.mask[1]?e(1):14===o&&r.mask[2]?e(2):19===o&&r.mask[3]&&e(3))}else if(97===n){var a=r.track[r.idx++]+(r.track[r.idx++]<<8);r.timer+=a}else if(98===n){r.timer+=735}else if(112==(240&n)){var c=1+(15&n);r.timer+=c}else{if(102!==n)throw new Error(\"What is op \"+n.toString(16)+\" at \"+(r.idx-1));r.idx=r.track.length}}var u=44100/sampleRate;r.timer-=u}};return r}registerProcessor(\"gameboy-processor\",GameboyProcessor);\n";
var wasmEncoded = 'AGFzbQEAAAABGQVgAn9/AGABfwBgA39/fwBgAn9/AX9gAAADCwoDAgIAAwEBAAAEBQMBAAMGDwJ/AEGQ6wQLfwBBkO8ECweUAQoGbWVtb3J5AgAKZ2Jfc291bmRfdwABGmRldmljZV9zdGFydF9nYW1lYm95X3NvdW5kAAQaZGV2aWNlX3Jlc2V0X2dhbWVib3lfc291bmQABQRpbml0AAYPZGlzYWJsZV9jaGFubmVsAAcOZW5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AgA2AgAPCyAAIAJBB3FBBnRqIAJBAnZBPHFqQcSAAmooAgAhASAAQfyQAmogAkEDdkEBcTYCACAAQcCQAmogATYCAA8LIABByJACaiACQQZ2QQFxOgAAIAJBGHRBGHVBf0oNAyAALQC0kAJFBEAgAEG8kAJqQQA2AgALIABBAToAtJACIABBxJACakEANgIAIABBgJECakH//wE7AQAgAEHckAJqQT46AAAgAEHYkAJqQQA2AgAgAEHMkAJqIABBoJECai0AAEEEdjYCACAAQaWRAmoiACAALQAAQQhyOgAADwsgAEGFkQJqIAJBB3E6AAAgAEGGkQJqIAJBBHZBB3E6AAAPCyAAQYiRAmogAkEBcToAACAAQY2RAmogAkEHdjoAACAAQYqRAmogAkEBdkEBcToAACAAQYeRAmogAkEEdkEBcToAACAAQYyRAmogAkECdkEBcToAACAAQYmRAmogAkEFdkEBcToAACAAQY6RAmogAkEDdkEBcToAACAAQYuRAmogAkEGdkEBcToAAA8LIAAgAkEHdjoAhJECIAJBGHRBGHVBAEgNACAAQYD/ADsAj5ECIABB+I4CakF/NgIAIABB/I4CaiAAKAIkNgIAIABBkZECakEAOgAAIABB4I4CakH/AToAACAAQdyOAmpBADYCACAAQZKRAmpB/v8COwAAIABB5I4CaiAAKAIEIgE2AgAgAEHwjgJqQv4fNwIAIABB2I4CakEAOwEAIABByI4CaiAAQcCGAmooAgAiAjYCACAAQdCOAmogAEG8gAFqKAIANgIAIAAtAMSOAkUEQCAAQcyOAmpBADYCAAsgAEEANgLcjgIgAEEBOgDEjgIgAEGAjwJqQQA2AgAgAEHojgJqQQA2AgAgAEHUjgJqQQA2AgAgAEHsjgJqQQE6AAAgAEGYjwJqIAI2AgAgAEGVkQJqQb+A/P97NgAAIABBtI8CaiABNgIAIABBsI8CakH/AToAACAAQayPAmpBADYCACAAQaiPAmpBADsBACAAQaCPAmogAEHAgAFqKAIANgIAIABBpZECaiIEIAQtAAAiBEEBcjoAACAALQCUjwJFBEAgAEGcjwJqQQA2AgALIABBADYCrI8CIABBAToA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W50dTE=';
export var C3 = 44, Cs3 = 156, D3 = 263, Ds3 = 363, E3 = 457, F3 = 547, Fs3 = 631, G3 = 710, Gs3 = 786, A3 = 856, As3 = 923, B3 = 986, C4 = 1046, Cs4 = 1102, D4 = 1155, Ds4 = 1205, E4 = 1253, F4 = 1297, Fs4 = 1339, G4 = 1379, Gs4 = 1417, A4 = 1452, As4 = 1486, B4 = 1517, C5 = 1547, Cs5 = 1575, D5 = 1602, Ds5 = 1627, E5 = 1650, F5 = 1673, Fs5 = 1694, G5 = 1714, Gs5 = 1732, A5 = 1750, As5 = 1767, B5 = 1783, C6 = 1798, Cs6 = 1812, D6 = 1825, Ds6 = 1837, E6 = 1849, F6 = 1860, Fs6 = 1871, G6 = 1881, Gs6 = 1890, A6 = 1899, As6 = 1907, B6 = 1915, C7 = 1923, Cs7 = 1930, D7 = 1936, Ds7 = 1943, E7 = 1949, F7 = 1954, Fs7 = 1959, G7 = 1964, Gs7 = 1969, A7 = 1974, As7 = 1978, B7 = 1982, C8 = 1985, Cs8 = 1989, D8 = 1992, Ds8 = 1995, E8 = 1998, F8 = 2001, Fs8 = 2004, G8 = 2006, Gs8 = 2009, A8 = 2011, As8 = 2013, B8 = 2015;

@@ -4,0 +4,0 @@ if ('webkitAudioContext' in window) {

@@ -1,1 +0,1 @@

var workletSource='"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _wrapNativeSuper(t){var e="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,t)})(t)}function isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _construct(t,e,r){return(_construct=isNativeReflectConstruct()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GameboyProcessor=function(t){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=_possibleConstructorReturn(this,(t=_getPrototypeOf(e)).call.apply(t,[this].concat(o)))).port.onmessage=function(t){var e=t.data;if("write"===e.type)r.s.registerWrite(e.layer,e.register,e.value);else if("play"===e.type){var n=new Uint8Array(e.data);r.ready.then((function(){e.mask?r.s.playSFX(n,e.mask):r.s.playSong(n,e.loop)}))}else if("module"===e.type){var o=WebAssembly.instantiate(e.data).then((function(t){return t.instance.exports}));o.then((function(t){t.init(sampleRate),r.lchan=new Float32Array(t.memory.buffer,t.lchan,128),r.rchan=new Float32Array(t.memory.buffer,t.rchan,128),r.updateGB=t.update,r.s=songContext(t.gb_sound_w,t.enable_channel,t.disable_channel),r.port.postMessage("ready")})),r.ready=o.then((function(){return!0}))}},r}return _inherits(e,_wrapNativeSuper(AudioWorkletProcessor)),_createClass(e,[{key:"process",value:function(t,e){if(this.updateGB)for(var r=e[0][0],n=e[0][1],o=0;o<r.length;o+=128){for(var i=0;i<128;++i)this.s.tick();this.updateGB(),r.set(this.lchan,o),n.set(this.rchan,o)}return!0}}]),e}();function songContext(t,e,r){var n=[0,1].map((function(r){return chip(t.bind(null,r),e.bind(null,r))}));return{playSong:function(e,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[0].track=e,n[0].idx=i,n[0].timer=0,n[0].loopPoint=o,n[0].mask=[1,1,1,1],n[0].doneCallback=null,n[1].track=null,n[1].idx=-1,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=[0,0,0,0],n[1].doneCallback=null;for(var a=0;a<4;++a)r(1,a);t(0,22,0)},playSFX:function(t,e){n[0].mask=e.map((function(t){return 1-t})),n[1].track=t,n[1].idx=0,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=e,n[1].doneCallback=function(){n[0].mask=[1,1,1,1],n[1].mask=[0,0,0,0]};for(var o=0;o<4;++o)e[o]&&r(0,o)},tick:function(){n.forEach((function(t){return t.tick()}))},registerWrite:t}}function chip(t,e){var r={track:null,idx:-1,timer:0,loopPoint:-1,mask:[0,0,0,0],doneCallback:null,tick:function(){for(;r.timer<=0&&r.idx>=0;){if(r.idx>=r.track.length&&(r.idx=r.loopPoint,-1===r.idx)){r.doneCallback&&r.doneCallback();break}var n=r.track[r.idx++];if(179===n){var o=r.track[r.idx++],i=r.track[r.idx++];t(o,i),128&i&&(4===o&&r.mask[0]?e(0):9===o&&r.mask[1]?e(1):14===o&&r.mask[2]?e(2):19===o&&r.mask[3]&&e(3))}else if(97===n){var a=r.track[r.idx++]+(r.track[r.idx++]<<8);r.timer+=a}else if(98===n){r.timer+=735}else if(112==(240&n)){var c=1+(15&n);r.timer+=c}else{if(102!==n)throw new Error("What is op "+n.toString(16)+" at "+(r.idx-1));r.idx=r.track.length}}var u=44100/sampleRate;r.timer-=u}};return r}registerProcessor("gameboy-processor",GameboyProcessor);\n',wasmEncoded="AGFzbQEAAAABGQVgAn9/AGABfwBgA39/fwBgAn9/AX9gAAADCwoDAgIAAwEBAAAEBQMBAAMGDwJ/AEGQ6wQLfwBBkO8ECweUAQoGbWVtb3J5AgAKZ2Jfc291bmRfdwABGmRldmljZV9zdGFydF9nYW1lYm95X3NvdW5kAAQaZGV2aWNlX3Jlc2V0X2dhbWVib3lfc291bmQABQRpbml0AAYPZGlzYWJsZV9jaGFubmVsAAcOZW5hYmxlX2NoYW5uZWwACAZ1cGRhdGUACQVyY2hhbgMABWxjaGFuAwEKtDsKKQEBfyABBEAgACECA0AgAkEAOgAAIAJBAWohAiABQX9qIgENAAsLIAALVAACQCABQR9NBEAgAEHAkQJsIQAgAUEWRwRAIABBlNkCai0AAEUNAgsgAEGQyABqIAEgAhACDwsgAUEvSw0AIABBwJECbCABakGf2QJqIAI6AAALC4EWAQJ/IAAgAWpBj5ECaiIDIAI6AAACQCABQRZLDQACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUEBaw4WAQIDBBUFBgcICQoLDA0VDg8QERITFAALIABB9I4CaiACQQdxNgIAIABB+I4CaiACQQN2QQFxIgFBf2ogAXI2AgAgAEH8jgJqIAAgAkECdkEccWpBJGooAgA2AgAPCyAAQdmOAmogAkEGdjoAACAAQciOAmogACACQT9xQQJ0akHEhAJqKAIANgIADwsgAEHgjgJqIAJBA3ZBAXEiAToAAAJAIAEEQCAAQdyOAmoiA0EAIAMoAgAiA0EBaiADQQ5KGzYCAAwBCyAAQdyOAmogAkEEdjYCAAsgACABQX9qIAFyOgDgjgI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cmpBxIABaigCADYCAA8LIABB+I8CaiACQQZ2QQFxOgAAIABB8I8CaiAAIABBnZECai0AAEEPcUEKdCAAQZyRAmotAABBAnRyakHEgAFqKAIANgIAIAJBGHRBGHVBf0oNByAALQDkjwJFBEAgAEGlkAJqQQA6AAAgAEHsjwJqQQA2AgAgAEH5jwJqQQA6AAALIABBAToA5I8CIABBqJACakEANgIAIABB+Y8CakEBOgAAIABB9I8CakEANgIAIABBpZECaiIAIAAtAABBBHI6AAAPCyAAQbiQAmogACACQT9xQQJ0akHEhAJqKAIANgIADwsgAEHQkAJqIAJBA3ZBAXEiAToAAAJAIAEEQCAAQcyQAmoiA0EAIAMoAgAiA0EBaiADQQ5KGzYCAAwBCyAAQcyQAmogAkEEdjYCAAsgACABQX9qIAFyOgDQkAIgAEHUkAJqIAAgAkEHcUECdGpBBGooAgA2AgAPCyAAIAJBB3FBBnRqIAJBAnZBPHFqQcSAAmooAgAhASAAQfyQAmogAkEDdkEBcTYCACAAQcCQAmogATYCAA8LIABByJACaiACQQZ2QQFxOgAAIAJBGHRBGHVBf0oNAyAALQC0kAJFBEAgAEG8kAJqQQA2AgALIABBAToAtJACIABBxJACakEANgIAIABBgJECakH//wE7AQAgAEHckAJqQT46AAAgAEHYkAJqQQA2AgAgAEHMkAJqIABBoJECai0AAEEEdjYCACAAQaWRAmoiACAALQAAQQhyOgAADwsgAEGFkQJqIAJBB3E6AAAgAEGGkQJqIAJBBHZBB3E6AAAPCyAAQYiRAmogAkEBcToAACAAQY2RAmogAkEHdjoAACAAQYqRAmogAkEBdkEBcToAACAAQYeRAmogAkEEdkEBcToAACAAQYyRAmogAkECdkEBcToAACAAQYmRAmogAkEFdkEBcToAACAAQY6RAmogAkEDdkEBcToAACAAQYuRAmogAkEGdkEBcToAAA8LIAAgAkEHdjoAhJECIAJBGHRBGHVBAEgNACAAQYD/ADsAj5ECIABB+I4CakF/NgIAIABB/I4CaiAAKAIkNgIAIABBkZECakEAOgAAIABB4I4CakH/AToAACAAQdyOAmpBADYCACAAQZKRAmpB/v8COwAAIABB5I4CaiAAKAIEIgE2AgAgAEHwjgJqQv4fNwIAIABB2I4CakEAOwEAIABByI4CaiAAQcCGAmooAgAiAjYCACAAQdCOAmogAEG8gAFqKAIANgIAIAAtAMSOAkUEQCAAQcyOAmpBADYCAAsgAEEANgLcjgIgAEEBOgDEjgIgAEGAjwJqQQA2AgAgAEHojgJqQQA2AgAgAEHUjgJqQQA2AgAgAEHsjgJqQQE6AAAgAEGYjwJqIAI2AgAgAEGVkQJqQb+A/P97NgAAIABBtI8CaiABNgIAIABBsI8CakH/AToAACAAQayPAmpBADYCACAAQaiPAmpBADsBACAAQaCPAmogAEHAgAFqKAIANgIAIABBpZECaiIEIAQtAAAiBEEBcjoAACAALQCUjwJFBEAgAEGcjwJqQQA2AgALIABBADYCrI8CIABBAToAlI8CIABBAToA5I8CIABBmZECakH//gM7AAAgAEG8jwJqQQE6AAAgAEG4jwJqQQA2AgAgAEGkjwJqQQA2AgAgAEGbkQJqQZ8BOgAAIABBnJECakH//wI7AAAgAEGkkAJqQQA7AQAgAEHsjwJqQQA2AgAgACAEQQdyOgClkQIgAEGokAJqQQA2AgAgAEH4jwJqQYACOwEAIABB9I8CakEANgIAIABB6I8CaiAAQcCOAmooAgA2AgAgAEHwjwJqIABBwIACaigCADYCACAAQcyQAmpBADYCACAAQbiQAmogAjYCACAAQZ+RAmpB/4GA+Hs2AAAgAEHUkAJqIAE2AgAgAEHQkAJqQf8BOgAAIABB/JACakEANgIAIABByJACakEAOgAAIABBwJACaiAAKALEgAI2AgAgAC0AtJACRQRAIABBvJACakEANgIACyAAQQA2AsyQAiAAQQA6ALSQAiAAQQA6AOSPAiAAQQA6AJSPAiAAQQA6AMSOAiAAIARBD3I6AKWRAiAAQYCRAmpB//8BOwEAIABB3JACakE+OgAAIABB2JACakEANgIAIABBxJACakEANgIAIABBo5ECakEAOwAAIABBhZECakIANwAAIABBjZECakEAOwAAIANBADoAAAsL1xECTH8FfSAAQ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EAOgAAIAJB8tcCakEAOgAAIAJBotcCakEAOgAAIAEFIAILCz8AIABBwJECbCIAQZDIAGpBFkEAEAIgAEHH2QJqQqyIlOfCtbftyAA3AAAgAEG/2QJqQqy768bkxsDnFjcAAAtvAEEAIABBA3QiABAEGkEBIAAQBBpBkMgAQRZBABACQcfZAkKsiJTnwrW37cgANwAAQb/ZAkKsu+vG5MbA5xY3AABB0NkCQRZBABACQYfrBEKsiJTnwrW37cgANwAAQf/qBEKsu+vG5MbA5xY3AAALXwAgAUEDTQRAAn8CQAJAAkACQCABQQFrDgMBAgMACyAAQcCRAmxBotcCagwDCyAAQcCRAmxB8tcCagwCCyAAQcCRAmxBwtgCagwBCyAAQcCRAmxBktkCagtBAToAAAsLXwAgAUEDTQRAAn8CQAJAAkACQCABQQFrDgMBAgMACyAAQcCRAmxBotcCagwDCyAAQcCRAmxB8tcCagwCCyAAQcCRAmxBwtgCagwBCyAAQcCRAmxBktkCagtBADoAAAsLoQEBBn9BAEGQCBADQQFBkCgQA0GQ6wRBgAQQACEDQZDvBEGABBAAIQQDQCABQQF2Qfz///8HcSICIARqIgUgBSoCACAAQZDzBGoqAgAgAEGQkwVqKgIAkkMAAAA+lJI4AgAgAiADaiICIAIqAgAgAEGQswVqKgIAIABBkNMFaioCAJJDAAAAPpSSOAIAIABBBGohACABQQFqIgFBgAhHDQALCwsuAwBBgwgLDUEAAIBAAAAAQI+qqj8AQZAICweQOQEAkFkBAEGQKAsHkEkBAJBpAQAvCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQVjbGFuZw8xMC4wLjAtNHVidW50dTE=";export var C3=44,Cs3=156,D3=263,Ds3=363,E3=457,F3=547,Fs3=631,G3=710,Gs3=786,A3=856,As3=923,B3=986,C4=1046,Cs4=1102,D4=1155,Ds4=1205,E4=1253,F4=1297,Fs4=1339,G4=1379,Gs4=1417,A4=1452,As4=1486,B4=1517,C5=1547,Cs5=1575,D5=1602,Ds5=1627,E5=1650,F5=1673,Fs5=1694,G5=1714,Gs5=1732,A5=1750,As5=1767,B5=1783,C6=1798,Cs6=1812,D6=1825,Ds6=1837,E6=1849,F6=1860,Fs6=1871,G6=1881,Gs6=1890,A6=1899,As6=1907,B6=1915,C7=1923,Cs7=1930,D7=1936,Ds7=1943,E7=1949,F7=1954,Fs7=1959,G7=1964,Gs7=1969,A7=1974,As7=1978,B7=1982,C8=1985,Cs8=1989,D8=1992,Ds8=1995,E8=1998,F8=2001,Fs8=2004,G8=2006,Gs8=2009,A8=2011,As8=2013,B8=2015;"webkitAudioContext"in window&&(window.AudioContext=webkitAudioContext);export var audioContext=new AudioContext({latencyHint:"interactive"});export function allow(){audioContext.resume()}var lastVolume=1,userVolumeNode=audioContext.createGain();userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.connect(audioContext.destination);export function changeUserVolume(A){A>=0&&A<=1&&(userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.gain.linearRampToValueAtTime(A,audioContext.currentTime+.05),lastVolume=A)}export var audioNode=userVolumeNode;var workletBlob=new Blob([workletSource],{type:"application/javascript"}),workletURL=URL.createObjectURL(workletBlob),wasmBuffer=new Uint8Array(atob(wasmEncoded).split("").map((function(A){return A.charCodeAt(0)}))).buffer,nodePromise=audioContext.audioWorklet.addModule(workletURL).then((function(){var A=new AudioWorkletNode(audioContext,"gameboy-processor",{outputChannelCount:[2]});return A.connect(userVolumeNode),new Promise((function(g){A.port.onmessage=function(t){return"ready"===t.data&&g(A)},A.port.postMessage({type:"module",data:wasmBuffer})}))})),nextInstanceId=0,allowSFX=!0;function track(A,g,t){return void 0===t&&(t=null),{play:function(){if(t&&!allowSFX)return null;var e=++nextInstanceId;return nodePromise.then((function(Q){Q.port.postMessage({id:e,type:"play",data:A,loop:g,mask:t})})),{pause:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"pause"})}))},resume:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"resume"})}))}}}}}export function bgm(A,g){return void 0===g&&(g=0),track(A,g)}export function sfx(A,g){return void 0===g&&(g=[1,1,1,1]),track(A,-1,g)}export function fromFile(A){for(var g=new Uint8Array(A,0,4),t=0;t<4;++t)if(g[t]!=="Vgm ".charCodeAt(t))throw new Error("Invalid header");var e=52+new Uint32Array(A,52,1)[0],Q=28+new Uint32Array(A,28,1)[0]-e;return bgm(A.slice(e),Q)}export function fade(A){return void 0===A&&(A=2e3),nodePromise.then((function(g){if(sfx(new ArrayBuffer(0),[0,0,0,0]).play(),A>0){allowSFX=!1;for(var t=function(t){var e=6-t;setTimeout((function(){return g.port.postMessage({type:"write",layer:0,register:20,value:(e<<4)+e})}),A*t/7)},e=0;e<=5;++e)t(e);setTimeout((function(){g.port.postMessage({type:"write",layer:0,register:22,value:0}),bgm(new ArrayBuffer(0),-1).play()}),6*A/7)}return new Promise((function(g){return setTimeout(g,A)})).then((function(){allowSFX=!0}))}))}export function compile(A){}
var workletSource='"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _wrapNativeSuper(t){var e="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,t)})(t)}function isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _construct(t,e,r){return(_construct=isNativeReflectConstruct()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GameboyProcessor=function(t){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=_possibleConstructorReturn(this,(t=_getPrototypeOf(e)).call.apply(t,[this].concat(o)))).port.onmessage=function(t){var e=t.data;if("write"===e.type)r.s.registerWrite(e.layer,e.register,e.value);else if("play"===e.type){var n=new Uint8Array(e.data);r.ready.then((function(){e.mask?r.s.playSFX(n,e.mask):r.s.playSong(n,e.loop)}))}else if("module"===e.type){var o=WebAssembly.instantiate(e.data).then((function(t){return t.instance.exports}));o.then((function(t){t.init(sampleRate),r.lchan=new Float32Array(t.memory.buffer,t.lchan,128),r.rchan=new Float32Array(t.memory.buffer,t.rchan,128),r.updateGB=t.update,r.s=songContext(t.gb_sound_w,t.enable_channel,t.disable_channel),r.port.postMessage("ready")})),r.ready=o.then((function(){return!0}))}},r}return _inherits(e,_wrapNativeSuper(AudioWorkletProcessor)),_createClass(e,[{key:"process",value:function(t,e){if(this.updateGB)for(var r=e[0][0],n=e[0][1],o=0;o<r.length;o+=128){for(var i=0;i<128;++i)this.s.tick();this.updateGB(),r.set(this.lchan,o),n.set(this.rchan,o)}return!0}}]),e}();function songContext(t,e,r){var n=[0,1].map((function(r){return chip(t.bind(null,r),e.bind(null,r))}));return{playSong:function(e,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[0].track=e,n[0].idx=i,n[0].timer=0,n[0].loopPoint=o,n[0].mask=[1,1,1,1],n[0].doneCallback=null,n[1].track=null,n[1].idx=-1,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=[0,0,0,0],n[1].doneCallback=null;for(var a=0;a<4;++a)r(1,a);t(0,22,0)},playSFX:function(t,e){n[0].mask=e.map((function(t){return 1-t})),n[1].track=t,n[1].idx=0,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=e,n[1].doneCallback=function(){n[0].mask=[1,1,1,1],n[1].mask=[0,0,0,0]};for(var o=0;o<4;++o)e[o]&&r(0,o)},tick:function(){n.forEach((function(t){return t.tick()}))},registerWrite:t}}function chip(t,e){var r={track:null,idx:-1,timer:0,loopPoint:-1,mask:[0,0,0,0],doneCallback:null,tick:function(){for(;r.timer<=0&&r.idx>=0;){if(r.idx>=r.track.length&&(r.idx=r.loopPoint,-1===r.idx)){r.doneCallback&&r.doneCallback();break}var n=r.track[r.idx++];if(179===n){var o=r.track[r.idx++],i=r.track[r.idx++];t(o,i),128&i&&(4===o&&r.mask[0]?e(0):9===o&&r.mask[1]?e(1):14===o&&r.mask[2]?e(2):19===o&&r.mask[3]&&e(3))}else if(97===n){var a=r.track[r.idx++]+(r.track[r.idx++]<<8);r.timer+=a}else if(98===n){r.timer+=735}else if(112==(240&n)){var c=1+(15&n);r.timer+=c}else{if(102!==n)throw new Error("What is op "+n.toString(16)+" at "+(r.idx-1));r.idx=r.track.length}}var u=44100/sampleRate;r.timer-=u}};return r}registerProcessor("gameboy-processor",GameboyPro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ZAkKsu+vG5MbA5xY3AABB0NkCQRZBABACQYfrBEKsiJTnwrW37cgANwAAQf/qBEKsu+vG5MbA5xY3AAALXwAgAUEDTQRAAn8CQAJAAkACQCABQQFrDgMBAgMACyAAQcCRAmxBotcCagwDCyAAQcCRAmxB8tcCagwCCyAAQcCRAmxBwtgCagwBCyAAQcCRAmxBktkCagtBAToAAAsLXwAgAUEDTQRAAn8CQAJAAkACQCABQQFrDgMBAgMACyAAQcCRAmxBotcCagwDCyAAQcCRAmxB8tcCagwCCyAAQcCRAmxBwtgCagwBCyAAQcCRAmxBktkCagtBADoAAAsLoQEBBn9BAEGQCBADQQFBkCgQA0GQ6wRBgAQQACEDQZDvBEGABBAAIQQDQCABQQF2Qfz///8HcSICIARqIgUgBSoCACAAQZDzBGoqAgAgAEGQkwVqKgIAkkMAAAA+lJI4AgAgAiADaiICIAIqAgAgAEGQswVqKgIAIABBkNMFaioCAJJDAAAAPpSSOAIAIABBBGohACABQQFqIgFBgAhHDQALCwsuAwBBgwgLDUEAAIBAAAAAQI+qqj8AQZAICweQOQEAkFkBAEGQKAsHkEkBAJBpAQAvCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQVjbGFuZw8xMC4wLjAtNHVidW50dTE=";export var C3=44,Cs3=156,D3=263,Ds3=363,E3=457,F3=547,Fs3=631,G3=710,Gs3=786,A3=856,As3=923,B3=986,C4=1046,Cs4=1102,D4=1155,Ds4=1205,E4=1253,F4=1297,Fs4=1339,G4=1379,Gs4=1417,A4=1452,As4=1486,B4=1517,C5=1547,Cs5=1575,D5=1602,Ds5=1627,E5=1650,F5=1673,Fs5=1694,G5=1714,Gs5=1732,A5=1750,As5=1767,B5=1783,C6=1798,Cs6=1812,D6=1825,Ds6=1837,E6=1849,F6=1860,Fs6=1871,G6=1881,Gs6=1890,A6=1899,As6=1907,B6=1915,C7=1923,Cs7=1930,D7=1936,Ds7=1943,E7=1949,F7=1954,Fs7=1959,G7=1964,Gs7=1969,A7=1974,As7=1978,B7=1982,C8=1985,Cs8=1989,D8=1992,Ds8=1995,E8=1998,F8=2001,Fs8=2004,G8=2006,Gs8=2009,A8=2011,As8=2013,B8=2015;"webkitAudioContext"in window&&(window.AudioContext=webkitAudioContext);export var audioContext=new AudioContext({latencyHint:"interactive"});export function allow(){audioContext.resume()}var lastVolume=1,userVolumeNode=audioContext.createGain();userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.connect(audioContext.destination);export function changeUserVolume(A){A>=0&&A<=1&&(userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.gain.linearRampToValueAtTime(A,audioContext.currentTime+.05),lastVolume=A)}export var audioNode=userVolumeNode;var workletBlob=new Blob([workletSource],{type:"application/javascript"}),workletURL=URL.createObjectURL(workletBlob),wasmBuffer=new Uint8Array(atob(wasmEncoded).split("").map((function(A){return A.charCodeAt(0)}))).buffer,nodePromise=audioContext.audioWorklet.addModule(workletURL).then((function(){var A=new AudioWorkletNode(audioContext,"gameboy-processor",{outputChannelCount:[2]});return A.connect(userVolumeNode),new Promise((function(g){A.port.onmessage=function(t){return"ready"===t.data&&g(A)},A.port.postMessage({type:"module",data:wasmBuffer})}))})),nextInstanceId=0,allowSFX=!0;function track(A,g,t){return void 0===t&&(t=null),{play:function(){if(t&&!allowSFX)return null;var e=++nextInstanceId;return nodePromise.then((function(Q){Q.port.postMessage({id:e,type:"play",data:A,loop:g,mask:t})})),{pause:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"pause"})}))},resume:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"resume"})}))}}}}}export function bgm(A,g){return void 0===g&&(g=0),track(A,g)}export function sfx(A,g){return void 0===g&&(g=[1,1,1,1]),track(A,-1,g)}export function fromFile(A){for(var g=new Uint8Array(A,0,4),t=0;t<4;++t)if(g[t]!=="Vgm ".charCodeAt(t))throw new Error("Invalid header");var e=52+new Uint32Array(A,52,1)[0],Q=28+new Uint32Array(A,28,1)[0]-e;return bgm(A.slice(e),Q)}export function fade(A){return void 0===A&&(A=2e3),nodePromise.then((function(g){if(sfx(new ArrayBuffer(0),[0,0,0,0]).play(),A>0){allowSFX=!1;for(var t=function(t){var e=6-t;setTimeout((function(){return g.port.postMessage({type:"write",layer:0,register:20,value:(e<<4)+e})}),A*t/7)},e=0;e<=5;++e)t(e);setTimeout((function(){g.port.postMessage({type:"write",layer:0,register:22,value:0}),bgm(new ArrayBuffer(0),-1).play()}),6*A/7)}return new Promise((function(g){return setTimeout(g,A)})).then((function(){allowSFX=!0}))}))}export function compile(A){}
!function(){function e(e,t){var r=document.createElement("iframe");r.style.cssText="position:absolute;left:0;top:-999px;width:1px;height:1px;",t.appendChild(r);var o=r.contentWindow,n=o.document,i="var window,$hook";for(var a in o)a in e||"eval"===a||(i+=",",i+=a);for(var s in e)i+=",",i+=s,i+="=self.",i+=s;var u=n.createElement("script");u.appendChild(n.createTextNode('function $hook(self,console) {"use strict";\n '+i+";return function() {return eval(arguments[0])}}")),n.body.appendChild(u),this.exec=o.$hook.call(e,e,console)}var t,r=[];function o(e){var t=this,o={},i=-1;this.parameters.forEach(function(e,n){var a=r[++i]||(r[i]=new Float32Array(t.bufferSize));a.fill(e.value),o[n]=a}),this.processor.realm.exec("self.sampleRate=sampleRate="+this.context.sampleRate+";self.currentTime=currentTime="+this.context.currentTime);var a=n(e.inputBuffer),s=n(e.outputBuffer);this.instance.process([a],[s],o)}function n(e){for(var t=[],r=0;r<e.numberOfChannels;r++)t[r]=e.getChannelData(r);return t}function i(e){return e.$$processors||(e.$$processors={})}"function"==typeof AudioWorkletNode&&"audioWorklet"in AudioContext.prototype||(self.AudioWorkletNode=function(e,r,n){var a=i(e)[r],s=e.createScriptProcessor(2048,2,n&&n.outputChannelCount?n.outputChannelCount[0]:2);if(s.parameters=new Map,a.properties)for(var u=0;u<a.properties.length;u++){var c=a.properties[u],l=e.createGain().gain;l.value=c.defaultValue,s.parameters.set(c.name,l)}var p=new MessageChannel;t=p.port2;var f=new a.Processor(n||{});return t=null,s.port=p.port1,s.processor=a,s.instance=f,s.onaudioprocess=o,s},Object.defineProperty((self.AudioContext||self.webkitAudioContext).prototype,"audioWorklet",{get:function(){return this.$$audioWorklet||(this.$$audioWorklet=new self.AudioWorklet(this))}}),self.AudioWorklet=function(){function r(e){this.$$context=e}return r.prototype.addModule=function(r,o){var n=this;return fetch(r).then(function(e){if(!e.ok)throw Error(e.status);return e.text()}).then(function(r){var a={sampleRate:n.$$context.sampleRate,currentTime:n.$$context.currentTime,AudioWorkletProcessor:function(){this.port=t},registerProcessor:function(e,t){i(n.$$context)[e]={realm:s,context:a,Processor:t,properties:t.parameterDescriptors||[]}}};a.self=a;var s=new e(a,document.documentElement);return s.exec((o&&o.transpile||String)(r)),null})},r}())}();
//# sourceMappingURL=audioworklet-polyfill.js.map
var workletSource = "\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _possibleConstructorReturn(t,e){return!e||\"object\"!=typeof e&&\"function\"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function _inherits(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _wrapNativeSuper(t){var e=\"function\"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if(\"function\"!=typeof t)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,t)})(t)}function isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _construct(t,e,r){return(_construct=isNativeReflectConstruct()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf(\"[native code]\")}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GameboyProcessor=function(t){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=_possibleConstructorReturn(this,(t=_getPrototypeOf(e)).call.apply(t,[this].concat(o)))).port.onmessage=function(t){var e=t.data;if(\"write\"===e.type)r.s.registerWrite(e.layer,e.register,e.value);else if(\"play\"===e.type){var n=new Uint8Array(e.data);r.ready.then((function(){e.mask?r.s.playSFX(n,e.mask):r.s.playSong(n,e.loop)}))}else if(\"module\"===e.type){var o=WebAssembly.instantiate(e.data).then((function(t){return t.instance.exports}));o.then((function(t){t.init(sampleRate),r.lchan=new Float32Array(t.memory.buffer,t.lchan,128),r.rchan=new Float32Array(t.memory.buffer,t.rchan,128),r.updateGB=t.update,r.s=songContext(t.gb_sound_w,t.enable_channel,t.disable_channel),r.port.postMessage(\"ready\")})),r.ready=o.then((function(){return!0}))}},r}return _inherits(e,_wrapNativeSuper(AudioWorkletProcessor)),_createClass(e,[{key:\"process\",value:function(t,e){if(this.updateGB)for(var r=e[0][0],n=e[0][1],o=0;o<r.length;o+=128){for(var i=0;i<128;++i)this.s.tick();this.updateGB(),r.set(this.lchan,o),n.set(this.rchan,o)}return!0}}]),e}();function songContext(t,e,r){var n=[0,1].map((function(r){return chip(t.bind(null,r),e.bind(null,r))}));return{playSong:function(e,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[0].track=e,n[0].idx=i,n[0].timer=0,n[0].loopPoint=o,n[0].mask=[1,1,1,1],n[0].doneCallback=null,n[1].track=null,n[1].idx=-1,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=[0,0,0,0],n[1].doneCallback=null;for(var a=0;a<4;++a)r(1,a);t(0,22,0)},playSFX:function(t,e){n[0].mask=e.map((function(t){return 1-t})),n[1].track=t,n[1].idx=0,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=e,n[1].doneCallback=function(){n[0].mask=[1,1,1,1],n[1].mask=[0,0,0,0]};for(var o=0;o<4;++o)e[o]&&r(0,o)},tick:function(){n.forEach((function(t){return t.tick()}))},registerWrite:t}}function chip(t,e){var r={track:null,idx:-1,timer:0,loopPoint:-1,mask:[0,0,0,0],doneCallback:null,tick:function(){for(;r.timer<=0&&r.idx>=0;){if(r.idx>=r.track.length&&(r.idx=r.loopPoint,-1===r.idx)){r.doneCallback&&r.doneCallback();break}var n=r.track[r.idx++];if(179===n){var o=r.track[r.idx++],i=r.track[r.idx++];t(o,i),128&i&&(4===o&&r.mask[0]?e(0):9===o&&r.mask[1]?e(1):14===o&&r.mask[2]?e(2):19===o&&r.mask[3]&&e(3))}else if(97===n){var a=r.track[r.idx++]+(r.track[r.idx++]<<8);r.timer+=a}else if(98===n){r.timer+=735}else if(112==(240&n)){var c=1+(15&n);r.timer+=c}else{if(102!==n)throw new Error(\"What is op \"+n.toString(16)+\" at \"+(r.idx-1));r.idx=r.track.length}}var u=44100/sampleRate;r.timer-=u}};return r}registerProcessor(\"gameboy-processor\",GameboyPro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G8kAJqQQA2AgALIABBAToAtJACIABBxJACakEANgIAIABBgJECakH//wE7AQAgAEHckAJqQT46AAAgAEHYkAJqQQA2AgAgAEHMkAJqIABBoJECai0AAEEEdjYCACAAQaWRAmoiACAALQAAQQhyOgAADwsgAEGFkQJqIAJBB3E6AAAgAEGGkQJqIAJBBHZBB3E6AAAPCyAAQYiRAmogAkEBcToAACAAQY2RAmogAkEHdjoAACAAQYqRAmogAkEBdkEBcToAACAAQYeRAmogAkEEdkEBcToAACAAQYyRAmogAkECdkEBcToAACAAQYmRAmogAkEFdkEBcToAACAAQY6RAmogAkEDdkEBcToAACAAQYuRAmogAkEGdkEBcToAAA8LIAAgAkEHdjoAhJECIAJBGHRBGHVBAEgNACAAQYD/ADsAj5ECIABB+I4CakF/NgIAIABB/I4CaiAAKAIkNgIAIABBkZECakEAOgAAIABB4I4CakH/AToAACAAQdyOAmpBADYCACAAQZKRAmpB/v8COwAAIABB5I4CaiAAKAIEIgE2AgAgAEHwjgJqQv4fNwIAIABB2I4CakEAOwEAIABByI4CaiAAQcCGAmooAgAiAjYCACAAQdCOAmogAEG8gAFqKAIANgIAIAAtAMSOAkUEQCAAQcyOAmpBADYCAAsgAEEANgLcjgIgAEEBOgDEjgIgAEGAjwJqQQA2AgAgAEHojgJqQQA2AgAgAEHUjgJqQQA2AgAgAEHsjgJqQQE6AAAgAEGYjwJqIAI2AgAgAEGVkQJqQb+A/P97NgAAIABBtI8CaiABNgIAIABBsI8CakH/AToAACAAQayPAmpBADYCACAAQaiPAmpBADsBACAAQaCPAmogAEHAgAFqKAIANgIAIABBpZECaiIEIAQtAAAiBEEBcjoAACAALQCUjwJFBEAgAEGcjwJqQQA2AgALIABBADYCrI8CIABBAToAlI8CIABBAToA5I8CIABBmZECakH//gM7AAAgAEG8jwJqQQE6AAAgAEG4jwJqQQA2AgAgAEGkjwJqQQA2AgAgAEGbkQJqQZ8BOgAAIABBnJECakH//wI7AAAgAEGkkAJqQQA7AQAgAEHsjwJqQQA2A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qIgUgBSoCACAAQZDzBGoqAgAgAEGQkwVqKgIAkkMAAAA+lJI4AgAgAiADaiICIAIqAgAgAEGQswVqKgIAIABBkNMFaioCAJJDAAAAPpSSOAIAIABBBGohACABQQFqIgFBgAhHDQALCwsuAwBBgwgLDUEAAIBAAAAAQI+qqj8AQZAICweQOQEAkFkBAEGQKAsHkEkBAJBpAQAvCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQVjbGFuZw8xMC4wLjAtNHVidW50dTE=';
export var C3 = 44, Cs3 = 156, D3 = 263, Ds3 = 363, E3 = 457, F3 = 547, Fs3 = 631, G3 = 710, Gs3 = 786, A3 = 856, As3 = 923, B3 = 986, C4 = 1046, Cs4 = 1102, D4 = 1155, Ds4 = 1205, E4 = 1253, F4 = 1297, Fs4 = 1339, G4 = 1379, Gs4 = 1417, A4 = 1452, As4 = 1486, B4 = 1517, C5 = 1547, Cs5 = 1575, D5 = 1602, Ds5 = 1627, E5 = 1650, F5 = 1673, Fs5 = 1694, G5 = 1714, Gs5 = 1732, A5 = 1750, As5 = 1767, B5 = 1783, C6 = 1798, Cs6 = 1812, D6 = 1825, Ds6 = 1837, E6 = 1849, F6 = 1860, Fs6 = 1871, G6 = 1881, Gs6 = 1890, A6 = 1899, As6 = 1907, B6 = 1915, C7 = 1923, Cs7 = 1930, D7 = 1936, Ds7 = 1943, E7 = 1949, F7 = 1954, Fs7 = 1959, G7 = 1964, Gs7 = 1969, A7 = 1974, As7 = 1978, B7 = 1982, C8 = 1985, Cs8 = 1989, D8 = 1992, Ds8 = 1995, E8 = 1998, F8 = 2001, Fs8 = 2004, G8 = 2006, Gs8 = 2009, A8 = 2011, As8 = 2013, B8 = 2015;

@@ -6,0 +6,0 @@ if ('webkitAudioContext' in window) {

!function(){function e(e,t){var r=document.createElement("iframe");r.style.cssText="position:absolute;left:0;top:-999px;width:1px;height:1px;",t.appendChild(r);var o=r.contentWindow,n=o.document,i="var window,$hook";for(var a in o)a in e||"eval"===a||(i+=",",i+=a);for(var s in e)i+=",",i+=s,i+="=self.",i+=s;var u=n.createElement("script");u.appendChild(n.createTextNode('function $hook(self,console) {"use strict";\n '+i+";return function() {return eval(arguments[0])}}")),n.body.appendChild(u),this.exec=o.$hook.call(e,e,console)}var t,r=[];function o(e){var t=this,o={},i=-1;this.parameters.forEach(function(e,n){var a=r[++i]||(r[i]=new Float32Array(t.bufferSize));a.fill(e.value),o[n]=a}),this.processor.realm.exec("self.sampleRate=sampleRate="+this.context.sampleRate+";self.currentTime=currentTime="+this.context.currentTime);var a=n(e.inputBuffer),s=n(e.outputBuffer);this.instance.process([a],[s],o)}function n(e){for(var t=[],r=0;r<e.numberOfChannels;r++)t[r]=e.getChannelData(r);return t}function i(e){return e.$$processors||(e.$$processors={})}"function"==typeof AudioWorkletNode&&"audioWorklet"in AudioContext.prototype||(self.AudioWorkletNode=function(e,r,n){var a=i(e)[r],s=e.createScriptProcessor(2048,2,n&&n.outputChannelCount?n.outputChannelCount[0]:2);if(s.parameters=new Map,a.properties)for(var u=0;u<a.properties.length;u++){var c=a.properties[u],l=e.createGain().gain;l.value=c.defaultValue,s.parameters.set(c.name,l)}var p=new MessageChannel;t=p.port2;var f=new a.Processor(n||{});return t=null,s.port=p.port1,s.processor=a,s.instance=f,s.onaudioprocess=o,s},Object.defineProperty((self.AudioContext||self.webkitAudioContext).prototype,"audioWorklet",{get:function(){return this.$$audioWorklet||(this.$$audioWorklet=new self.AudioWorklet(this))}}),self.AudioWorklet=function(){function r(e){this.$$context=e}return r.prototype.addModule=function(r,o){var n=this;return fetch(r).then(function(e){if(!e.ok)throw Error(e.status);return e.text()}).then(function(r){var a={sampleRate:n.$$context.sampleRate,currentTime:n.$$context.currentTime,AudioWorkletProcessor:function(){this.port=t},registerProcessor:function(e,t){i(n.$$context)[e]={realm:s,context:a,Processor:t,properties:t.parameterDescriptors||[]}}};a.self=a;var s=new e(a,document.documentElement);return s.exec((o&&o.transpile||String)(r)),null})},r}())}();
//# sourceMappingURL=audioworklet-polyfill.js.map
var workletSource='"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _wrapNativeSuper(t){var e="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,t)})(t)}function isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _construct(t,e,r){return(_construct=isNativeReflectConstruct()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GameboyProcessor=function(t){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=_possibleConstructorReturn(this,(t=_getPrototypeOf(e)).call.apply(t,[this].concat(o)))).port.onmessage=function(t){var e=t.data;if("write"===e.type)r.s.registerWrite(e.layer,e.register,e.value);else if("play"===e.type){var n=new Uint8Array(e.data);r.ready.then((function(){e.mask?r.s.playSFX(n,e.mask):r.s.playSong(n,e.loop)}))}else if("module"===e.type){var o=WebAssembly.instantiate(e.data).then((function(t){return t.instance.exports}));o.then((function(t){t.init(sampleRate),r.lchan=new Float32Array(t.memory.buffer,t.lchan,128),r.rchan=new Float32Array(t.memory.buffer,t.rchan,128),r.updateGB=t.update,r.s=songContext(t.gb_sound_w,t.enable_channel,t.disable_channel),r.port.postMessage("ready")})),r.ready=o.then((function(){return!0}))}},r}return _inherits(e,_wrapNativeSuper(AudioWorkletProcessor)),_createClass(e,[{key:"process",value:function(t,e){if(this.updateGB)for(var r=e[0][0],n=e[0][1],o=0;o<r.length;o+=128){for(var i=0;i<128;++i)this.s.tick();this.updateGB(),r.set(this.lchan,o),n.set(this.rchan,o)}return!0}}]),e}();function songContext(t,e,r){var n=[0,1].map((function(r){return chip(t.bind(null,r),e.bind(null,r))}));return{playSong:function(e,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[0].track=e,n[0].idx=i,n[0].timer=0,n[0].loopPoint=o,n[0].mask=[1,1,1,1],n[0].doneCallback=null,n[1].track=null,n[1].idx=-1,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=[0,0,0,0],n[1].doneCallback=null;for(var a=0;a<4;++a)r(1,a);t(0,22,0)},playSFX:function(t,e){n[0].mask=e.map((function(t){return 1-t})),n[1].track=t,n[1].idx=0,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=e,n[1].doneCallback=function(){n[0].mask=[1,1,1,1],n[1].mask=[0,0,0,0]};for(var o=0;o<4;++o)e[o]&&r(0,o)},tick:function(){n.forEach((function(t){return t.tick()}))},registerWrite:t}}function chip(t,e){var r={track:null,idx:-1,timer:0,loopPoint:-1,mask:[0,0,0,0],doneCallback:null,tick:function(){for(;r.timer<=0&&r.idx>=0;){if(r.idx>=r.track.length&&(r.idx=r.loopPoint,-1===r.idx)){r.doneCallback&&r.doneCallback();break}var n=r.track[r.idx++];if(179===n){var o=r.track[r.idx++],i=r.track[r.idx++];t(o,i),128&i&&(4===o&&r.mask[0]?e(0):9===o&&r.mask[1]?e(1):14===o&&r.mask[2]?e(2):19===o&&r.mask[3]&&e(3))}else if(97===n){var a=r.track[r.idx++]+(r.track[r.idx++]<<8);r.timer+=a}else if(98===n){r.timer+=735}else if(112==(240&n)){var c=1+(15&n);r.timer+=c}else{if(102!==n)throw new Error("What is op "+n.toString(16)+" at "+(r.idx-1));r.idx=r.track.length}}var u=44100/sampleRate;r.timer-=u}};return r}registerProcessor("gameboy-processor",GameboyProcessor);\n',wasmEncoded="AGFzbQEAAAABGQVgAn9/AGABfwBgA39/fwBgAn9/AX9gAAADCwoDAgIAAwEBAAAEBQMBAAMGDwJ/AEGQ6wQLfwBBkO8ECweUAQoGbWVtb3J5AgAKZ2Jfc291bmRfdwABGmRldmljZV9zdGFydF9nYW1lYm95X3NvdW5kAAQaZGV2aWNlX3Jlc2V0X2dhbWVib3lfc291bmQABQRpbml0AAYPZGlzYWJsZV9jaGFubmVsAAcOZW5hYmxlX2NoYW5uZWwACAZ1cGRhdGUACQVyY2hhbgMABWxjaGFuAwEKtDsKKQEBfyABBEAgACECA0AgAkEAOgAAIAJBAWohAiABQX9qIgENAAsLIAALVAACQCABQR9NBEAgAEHAkQJsIQAgAUEWRwRAIABBlNkCai0AAEUNAgsgAEGQyABqIAEgAhACDwsgAUEvSw0AIABBwJECbCABakGf2QJqIAI6AAALC4EWAQJ/IAAgAWpBj5ECai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AAAAPpSSOAIAIABBBGohACABQQFqIgFBgAhHDQALCwsuAwBBgwgLDUEAAIBAAAAAQI+qqj8AQZAICweQOQEAkFkBAEGQKAsHkEkBAJBpAQAvCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQVjbGFuZw8xMC4wLjAtNHVidW50dTE=";export var C3=44,Cs3=156,D3=263,Ds3=363,E3=457,F3=547,Fs3=631,G3=710,Gs3=786,A3=856,As3=923,B3=986,C4=1046,Cs4=1102,D4=1155,Ds4=1205,E4=1253,F4=1297,Fs4=1339,G4=1379,Gs4=1417,A4=1452,As4=1486,B4=1517,C5=1547,Cs5=1575,D5=1602,Ds5=1627,E5=1650,F5=1673,Fs5=1694,G5=1714,Gs5=1732,A5=1750,As5=1767,B5=1783,C6=1798,Cs6=1812,D6=1825,Ds6=1837,E6=1849,F6=1860,Fs6=1871,G6=1881,Gs6=1890,A6=1899,As6=1907,B6=1915,C7=1923,Cs7=1930,D7=1936,Ds7=1943,E7=1949,F7=1954,Fs7=1959,G7=1964,Gs7=1969,A7=1974,As7=1978,B7=1982,C8=1985,Cs8=1989,D8=1992,Ds8=1995,E8=1998,F8=2001,Fs8=2004,G8=2006,Gs8=2009,A8=2011,As8=2013,B8=2015;"webkitAudioContext"in window&&(window.AudioContext=webkitAudioContext);export var audioContext=new AudioContext({latencyHint:"interactive"});export function allow(){audioContext.resume()}var lastVolume=1,userVolumeNode=audioContext.createGain();userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.connect(audioContext.destination);export function changeUserVolume(A){A>=0&&A<=1&&(userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.gain.linearRampToValueAtTime(A,audioContext.currentTime+.05),lastVolume=A)}export var audioNode=userVolumeNode;var workletBlob=new Blob([workletSource],{type:"application/javascript"}),workletURL=URL.createObjectURL(workletBlob),wasmBuffer=new Uint8Array(atob(wasmEncoded).split("").map((function(A){return A.charCodeAt(0)}))).buffer,nodePromise=audioContext.audioWorklet.addModule(workletURL).then((function(){var A=new AudioWorkletNode(audioContext,"gameboy-processor",{outputChannelCount:[2]});return A.connect(userVolumeNode),new Promise((function(g){A.port.onmessage=function(t){return"ready"===t.data&&g(A)},A.port.postMessage({type:"module",data:wasmBuffer})}))})),nextInstanceId=0,allowSFX=!0;function track(A,g,t){return void 0===t&&(t=null),{play:function(){if(t&&!allowSFX)return null;var e=++nextInstanceId;return nodePromise.then((function(Q){Q.port.postMessage({id:e,type:"play",data:A,loop:g,mask:t})})),{pause:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"pause"})}))},resume:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"resume"})}))}}}}}export function bgm(A,g){return void 0===g&&(g=0),track(A,g)}export function sfx(A,g){return void 0===g&&(g=[1,1,1,1]),track(A,-1,g)}export function fromFile(A){for(var g=new Uint8Array(A,0,4),t=0;t<4;++t)if(g[t]!=="Vgm ".charCodeAt(t))throw new Error("Invalid header");var e=52+new Uint32Array(A,52,1)[0],Q=28+new Uint32Array(A,28,1)[0]-e;return bgm(A.slice(e),Q)}export function fade(A){return void 0===A&&(A=2e3),nodePromise.then((function(g){if(sfx(new ArrayBuffer(0),[0,0,0,0]).play(),A>0){allowSFX=!1;for(var t=function(t){var e=6-t;setTimeout((function(){return g.port.postMessage({type:"write",layer:0,register:20,value:(e<<4)+e})}),A*t/7)},e=0;e<=5;++e)t(e);setTimeout((function(){g.port.postMessage({type:"write",layer:0,register:22,value:0}),bgm(new ArrayBuffer(0),-1).play()}),6*A/7)}return new Promise((function(g){return setTimeout(g,A)})).then((function(){allowSFX=!0}))}))}export function compile(A){}
var workletSource='"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _wrapNativeSuper(t){var e="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,t)})(t)}function isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _construct(t,e,r){return(_construct=isNativeReflectConstruct()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GameboyProcessor=function(t){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=_possibleConstructorReturn(this,(t=_getPrototypeOf(e)).call.apply(t,[this].concat(o)))).port.onmessage=function(t){var e=t.data;if("write"===e.type)r.s.registerWrite(e.layer,e.register,e.value);else if("play"===e.type){var n=new Uint8Array(e.data);r.ready.then((function(){e.mask?r.s.playSFX(n,e.mask):r.s.playSong(n,e.loop)}))}else if("module"===e.type){var o=WebAssembly.instantiate(e.data).then((function(t){return t.instance.exports}));o.then((function(t){t.init(sampleRate),r.lchan=new Float32Array(t.memory.buffer,t.lchan,128),r.rchan=new Float32Array(t.memory.buffer,t.rchan,128),r.updateGB=t.update,r.s=songContext(t.gb_sound_w,t.enable_channel,t.disable_channel),r.port.postMessage("ready")})),r.ready=o.then((function(){return!0}))}},r}return _inherits(e,_wrapNativeSuper(AudioWorkletProcessor)),_createClass(e,[{key:"process",value:function(t,e){if(this.updateGB)for(var r=e[0][0],n=e[0][1],o=0;o<r.length;o+=128){for(var i=0;i<128;++i)this.s.tick();this.updateGB(),r.set(this.lchan,o),n.set(this.rchan,o)}return!0}}]),e}();function songContext(t,e,r){var n=[0,1].map((function(r){return chip(t.bind(null,r),e.bind(null,r))}));return{playSong:function(e,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[0].track=e,n[0].idx=i,n[0].timer=0,n[0].loopPoint=o,n[0].mask=[1,1,1,1],n[0].doneCallback=null,n[1].track=null,n[1].idx=-1,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=[0,0,0,0],n[1].doneCallback=null;for(var a=0;a<4;++a)r(1,a);t(0,22,0)},playSFX:function(t,e){n[0].mask=e.map((function(t){return 1-t})),n[1].track=t,n[1].idx=0,n[1].timer=0,n[1].loopPoint=-1,n[1].mask=e,n[1].doneCallback=function(){n[0].mask=[1,1,1,1],n[1].mask=[0,0,0,0]};for(var o=0;o<4;++o)e[o]&&r(0,o)},tick:function(){n.forEach((function(t){return t.tick()}))},registerWrite:t}}function chip(t,e){var r={track:null,idx:-1,timer:0,loopPoint:-1,mask:[0,0,0,0],doneCallback:null,tick:function(){for(;r.timer<=0&&r.idx>=0;){if(r.idx>=r.track.length&&(r.idx=r.loopPoint,-1===r.idx)){r.doneCallback&&r.doneCallback();break}var n=r.track[r.idx++];if(179===n){var o=r.track[r.idx++],i=r.track[r.idx++];t(o,i),128&i&&(4===o&&r.mask[0]?e(0):9===o&&r.mask[1]?e(1):14===o&&r.mask[2]?e(2):19===o&&r.mask[3]&&e(3))}else if(97===n){var a=r.track[r.idx++]+(r.track[r.idx++]<<8);r.timer+=a}else if(98===n){r.timer+=735}else if(112==(240&n)){var c=1+(15&n);r.timer+=c}else{if(102!==n)throw new Error("What is op "+n.toString(16)+" at "+(r.idx-1));r.idx=r.track.length}}var u=44100/sampleRate;r.timer-=u}};return r}registerProcessor("gameboy-processor",GameboyProcessor);\n',wasmEncoded="AGFzbQEAAAABGQVgAn9/AGABfwBgA39/fwBgAn9/AX9gAAADCwoDAgIAAwEBAAAEBQMBAAMGDwJ/AEGQ6wQLfwBBkO8ECweUAQoGbWVtb3J5AgAKZ2Jfc291bmRfdwABGmRldmljZV9zdGFydF9nYW1lYm95X3NvdW5kAAQaZGV2aWNlX3Jlc2V0X2dhbWVib3lfc291bmQABQRpbml0AAYPZGlzYWJsZV9jaGFubmVsAAcOZW5hYmxlX2NoYW5uZWwACAZ1cGRhdGUACQVyY2hhbgMABWxjaGFuAwEKtzsKKQEBfyABBEAgACECA0AgAkEAOgAAIAJBAWohAiABQX9qIgENAAsLIAALVAACQCABQR9NBEAgAEHAkQJsIQAgAUEWRwRAIABBlNkCai0AAEUNAgsgAEGQyABqIAEgAhACDwsgAUEvSw0AIABBwJECbCABakGf2QJqIAI6AAALC4EWAQJ/IAAgAWpBj5ECaiIDIAI6AAACQCABQRZLDQACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUEBaw4WAQIDBBUFBgcICQoLDA0VDg8QERITFAALIABB9I4CaiACQQdxNgIAIABB+I4CaiACQQN2QQFxIgFBf2ogAXI2AgAgAEH8jgJqIAAgAkECdkEccWpBJGooAgA2AgA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ds3=363,E3=457,F3=547,Fs3=631,G3=710,Gs3=786,A3=856,As3=923,B3=986,C4=1046,Cs4=1102,D4=1155,Ds4=1205,E4=1253,F4=1297,Fs4=1339,G4=1379,Gs4=1417,A4=1452,As4=1486,B4=1517,C5=1547,Cs5=1575,D5=1602,Ds5=1627,E5=1650,F5=1673,Fs5=1694,G5=1714,Gs5=1732,A5=1750,As5=1767,B5=1783,C6=1798,Cs6=1812,D6=1825,Ds6=1837,E6=1849,F6=1860,Fs6=1871,G6=1881,Gs6=1890,A6=1899,As6=1907,B6=1915,C7=1923,Cs7=1930,D7=1936,Ds7=1943,E7=1949,F7=1954,Fs7=1959,G7=1964,Gs7=1969,A7=1974,As7=1978,B7=1982,C8=1985,Cs8=1989,D8=1992,Ds8=1995,E8=1998,F8=2001,Fs8=2004,G8=2006,Gs8=2009,A8=2011,As8=2013,B8=2015;"webkitAudioContext"in window&&(window.AudioContext=webkitAudioContext);export var audioContext=new AudioContext({latencyHint:"interactive"});export function allow(){audioContext.resume()}var lastVolume=1,userVolumeNode=audioContext.createGain();userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.connect(audioContext.destination);export function changeUserVolume(A){A>=0&&A<=1&&(userVolumeNode.gain.setValueAtTime(lastVolume,audioContext.currentTime),userVolumeNode.gain.linearRampToValueAtTime(A,audioContext.currentTime+.05),lastVolume=A)}export var audioNode=userVolumeNode;var workletBlob=new Blob([workletSource],{type:"application/javascript"}),workletURL=URL.createObjectURL(workletBlob),wasmBuffer=new Uint8Array(atob(wasmEncoded).split("").map((function(A){return A.charCodeAt(0)}))).buffer,nodePromise=audioContext.audioWorklet.addModule(workletURL).then((function(){var A=new AudioWorkletNode(audioContext,"gameboy-processor",{outputChannelCount:[2]});return A.connect(userVolumeNode),new Promise((function(g){A.port.onmessage=function(t){return"ready"===t.data&&g(A)},A.port.postMessage({type:"module",data:wasmBuffer})}))})),nextInstanceId=0,allowSFX=!0;function track(A,g,t){return void 0===t&&(t=null),{play:function(){if(t&&!allowSFX)return null;var e=++nextInstanceId;return nodePromise.then((function(Q){Q.port.postMessage({id:e,type:"play",data:A,loop:g,mask:t})})),{pause:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"pause"})}))},resume:function(){nodePromise.then((function(A){return A.port.postMessage({id:e,type:"resume"})}))}}}}}export function bgm(A,g){return void 0===g&&(g=0),track(A,g)}export function sfx(A,g){return void 0===g&&(g=[1,1,1,1]),track(A,-1,g)}export function fromFile(A){for(var g=new Uint8Array(A,0,4),t=0;t<4;++t)if(g[t]!=="Vgm ".charCodeAt(t))throw new Error("Invalid header");var e=52+new Uint32Array(A,52,1)[0],Q=28+new Uint32Array(A,28,1)[0]-e;return bgm(A.slice(e),Q)}export function fade(A){return void 0===A&&(A=2e3),nodePromise.then((function(g){if(sfx(new ArrayBuffer(0),[0,0,0,0]).play(),A>0){allowSFX=!1;for(var t=function(t){var e=6-t;setTimeout((function(){return g.port.postMessage({type:"write",layer:0,register:20,value:(e<<4)+e})}),A*t/7)},e=0;e<=5;++e)t(e);setTimeout((function(){g.port.postMessage({type:"write",layer:0,register:22,value:0}),bgm(new ArrayBuffer(0),-1).play()}),6*A/7)}return new Promise((function(g){return setTimeout(g,A)})).then((function(){allowSFX=!0}))}))}export function compile(A){}
{
"name": "apu",
"version": "0.2.23",
"version": "0.2.24",
"description": "Easy 3 kB library for 98% accurate Gameboy audio",

@@ -5,0 +5,0 @@ "browser": "dist/apu.polyfilled.min.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc