limiter-audio-worklet 1.1.116 → 1.1.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- export declare const worklet = "(()=>{\"use strict\";class t{constructor(t){if(this._buffer=t,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error(\"The given buffer is too small.\")}get size(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}first(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}last(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}pop(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}shift(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}unshift(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{const e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error(\"Deque is full.\");this._buffer[e]=t,this._firstIndex=e}}_decrementIndex(t){return 0===t?this._buffer.length-1:t-1}_incrementIndex(t){return(t+1)%this._buffer.length}_throwIfEmpty(){if(this._isEmpty)throw new Error(\"Deque is empty.\")}}const e=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,e.length)),r===t.length?0:r;const n=r-t.length,i=t.length-s;return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,i)),e.set(new Float32Array(t.buffer,t.byteOffset,n),i),n},s=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return t.set(e,s),r===t.length?0:r;const n=r-t.length,i=t.length-s;return t.set(new Float32Array(e.buffer,e.byteOffset,i),s),t.set(new Float32Array(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,n)),n},r=Math.exp(-1/(.5*sampleRate)),n=10**-.1,i=(t,e,s,n)=>{let i=t[127];for(let h=0;h<128;h+=1){const f=(s+h)%e.length,o=Math.abs(e[f]);let l,u;if(null!==n){for(;n.size>0&&o>=Math.abs(e[n.first()]);)n.shift();(0===n.size||o<Math.abs(e[n.first()]))&&n.unshift(f);const t=(s+h+128)%e.length;n.last()===t&&n.pop();const r=n.last();l=Math.abs(e[r]),u=r<f?f-r+1:f+e.length-r+1}else l=o,u=1;const a=i-l;i<l?i-=a/u:i=l+r*a,t[h]=i}};class h extends AudioWorkletProcessor{constructor({channelCount:e,channelCountMode:s,numberOfInputs:r,numberOfOutputs:n,outputChannelCount:i,processorOptions:h}){const f=\"object\"==typeof h&&null!==h&&\"attack\"in h?h.attack:0;if(\"number\"!=typeof f)throw new Error('The attack needs to be of type \"number\".');if(f<0)throw new Error(\"The attack can't be negative.\");if(\"explicit\"!==s)throw new Error('The channelCountMode needs to be \"explicit\".');if(1!==r)throw new Error(\"The numberOfInputs must be 1.\");if(1!==n)throw new Error(\"The numberOfOutputs must be 1.\");if(void 0===i||e!==i[0])throw new Error(\"The channelCount must be the same as the outputChannelCount of the first output.\");super();const o=sampleRate*f,l=Math.round(o),u=l+128;this._constantMemoryDeques=0===l?null:Array.from({length:e},(()=>new t(new Uint16Array(l+1)))),this._delayBuffers=Array.from({length:e},(()=>new Float32Array(u))),this._envelopeBuffers=Array.from({length:e},(()=>new Float32Array(128))),this._writeOffset=0}process([t],[r]){const h=t.length,f=this._writeOffset;for(let o=0;o<h;o+=1){const h=null===this._constantMemoryDeques?null:this._constantMemoryDeques[o],l=this._delayBuffers[o],u=this._envelopeBuffers[o],a=t[o],_=r[o];this._writeOffset=s(l,a,f),i(u,l,f,h),e(l,_,this._writeOffset);for(let t=0;t<128;t+=1){const e=Math.min(1,n/u[t]);_[t]*=e}}return!0}}h.parameterDescriptors=[],registerProcessor(\"limiter-audio-worklet-processor\",h)})();";
1
+ export declare const worklet = "(()=>{\"use strict\";class t{constructor(t){if(this._buffer=t,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error(\"The given buffer is too small.\")}get size(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}first(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}last(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}pop(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}shift(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}unshift(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{const e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error(\"Deque is full.\");this._buffer[e]=t,this._firstIndex=e}}_decrementIndex(t){return 0===t?this._buffer.length-1:t-1}_incrementIndex(t){return(t+1)%this._buffer.length}_throwIfEmpty(){if(this._isEmpty)throw new Error(\"Deque is empty.\")}}const e=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,e.length)),r===t.length?0:r;const n=r-t.length,i=t.length-s;return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,i)),e.set(new Float32Array(t.buffer,t.byteOffset,n),i),n},s=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return t.set(e,s),r===t.length?0:r;const n=r-t.length,i=t.length-s;return t.set(new Float32Array(e.buffer,e.byteOffset,i),s),t.set(new Float32Array(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,n)),n},r=Math.exp(-1/(.5*sampleRate)),n=10**-.1,i=(t,e,s,n)=>{let i=t[127];for(let h=0;h<128;h+=1){const f=(s+h)%e.length,o=Math.abs(e[f]);let l,u;if(null!==n){for(;n.size>0&&o>=Math.abs(e[n.first()]);)n.shift();(0===n.size||o<Math.abs(e[n.first()]))&&n.unshift(f);const t=(s+h+128)%e.length;n.last()===t&&n.pop();const r=n.last();l=Math.abs(e[r]),u=r<f?f-r+1:f+e.length-r+1}else l=o,u=1;const a=i-l;i<l?i-=a/u:i=l+r*a,t[h]=i}};class h extends AudioWorkletProcessor{constructor({channelCount:e,channelCountMode:s,numberOfInputs:r,numberOfOutputs:n,outputChannelCount:i,processorOptions:h}){const f=\"object\"==typeof h&&null!==h&&\"attack\"in h?h.attack:0;if(\"number\"!=typeof f)throw new Error('The attack needs to be of type \"number\".');if(f<0)throw new Error(\"The attack can't be negative.\");if(\"explicit\"!==s)throw new Error('The channelCountMode needs to be \"explicit\".');if(1!==r)throw new Error(\"The numberOfInputs must be 1.\");if(1!==n)throw new Error(\"The numberOfOutputs must be 1.\");if(void 0===i||e!==i[0])throw new Error(\"The channelCount must be the same as the outputChannelCount of the first output.\");super();const o=sampleRate*f,l=Math.round(o),u=l+128;this._constantMemoryDeques=0===l?null:Array.from({length:e},()=>new t(new Uint16Array(l+1))),this._delayBuffers=Array.from({length:e},()=>new Float32Array(u)),this._envelopeBuffers=Array.from({length:e},()=>new Float32Array(128)),this._writeOffset=0}process([t],[r]){const h=t.length,f=this._writeOffset;for(let o=0;o<h;o+=1){const h=null===this._constantMemoryDeques?null:this._constantMemoryDeques[o],l=this._delayBuffers[o],u=this._envelopeBuffers[o],a=t[o],_=r[o];this._writeOffset=s(l,a,f),i(u,l,f,h),e(l,_,this._writeOffset);for(let t=0;t<128;t+=1){const e=Math.min(1,n/u[t]);_[t]*=e}}return!0}}h.parameterDescriptors=[],registerProcessor(\"limiter-audio-worklet-processor\",h)})();";
2
2
  //# sourceMappingURL=worklet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"worklet.d.ts","sourceRoot":"","sources":["../../../src/worklet/worklet.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,+gHAAi/G,CAAC"}
1
+ {"version":3,"file":"worklet.d.ts","sourceRoot":"","sources":["../../../src/worklet/worklet.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,ygHAA2+G,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // This is the minified and stringified code of the limiter-audio-worklet-processor package.
2
- export const worklet = `(()=>{"use strict";class t{constructor(t){if(this._buffer=t,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error("The given buffer is too small.")}get size(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}first(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}last(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}pop(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}shift(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}unshift(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{const e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error("Deque is full.");this._buffer[e]=t,this._firstIndex=e}}_decrementIndex(t){return 0===t?this._buffer.length-1:t-1}_incrementIndex(t){return(t+1)%this._buffer.length}_throwIfEmpty(){if(this._isEmpty)throw new Error("Deque is empty.")}}const e=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,e.length)),r===t.length?0:r;const n=r-t.length,i=t.length-s;return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,i)),e.set(new Float32Array(t.buffer,t.byteOffset,n),i),n},s=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return t.set(e,s),r===t.length?0:r;const n=r-t.length,i=t.length-s;return t.set(new Float32Array(e.buffer,e.byteOffset,i),s),t.set(new Float32Array(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,n)),n},r=Math.exp(-1/(.5*sampleRate)),n=10**-.1,i=(t,e,s,n)=>{let i=t[127];for(let h=0;h<128;h+=1){const f=(s+h)%e.length,o=Math.abs(e[f]);let l,u;if(null!==n){for(;n.size>0&&o>=Math.abs(e[n.first()]);)n.shift();(0===n.size||o<Math.abs(e[n.first()]))&&n.unshift(f);const t=(s+h+128)%e.length;n.last()===t&&n.pop();const r=n.last();l=Math.abs(e[r]),u=r<f?f-r+1:f+e.length-r+1}else l=o,u=1;const a=i-l;i<l?i-=a/u:i=l+r*a,t[h]=i}};class h extends AudioWorkletProcessor{constructor({channelCount:e,channelCountMode:s,numberOfInputs:r,numberOfOutputs:n,outputChannelCount:i,processorOptions:h}){const f="object"==typeof h&&null!==h&&"attack"in h?h.attack:0;if("number"!=typeof f)throw new Error('The attack needs to be of type "number".');if(f<0)throw new Error("The attack can't be negative.");if("explicit"!==s)throw new Error('The channelCountMode needs to be "explicit".');if(1!==r)throw new Error("The numberOfInputs must be 1.");if(1!==n)throw new Error("The numberOfOutputs must be 1.");if(void 0===i||e!==i[0])throw new Error("The channelCount must be the same as the outputChannelCount of the first output.");super();const o=sampleRate*f,l=Math.round(o),u=l+128;this._constantMemoryDeques=0===l?null:Array.from({length:e},(()=>new t(new Uint16Array(l+1)))),this._delayBuffers=Array.from({length:e},(()=>new Float32Array(u))),this._envelopeBuffers=Array.from({length:e},(()=>new Float32Array(128))),this._writeOffset=0}process([t],[r]){const h=t.length,f=this._writeOffset;for(let o=0;o<h;o+=1){const h=null===this._constantMemoryDeques?null:this._constantMemoryDeques[o],l=this._delayBuffers[o],u=this._envelopeBuffers[o],a=t[o],_=r[o];this._writeOffset=s(l,a,f),i(u,l,f,h),e(l,_,this._writeOffset);for(let t=0;t<128;t+=1){const e=Math.min(1,n/u[t]);_[t]*=e}}return!0}}h.parameterDescriptors=[],registerProcessor("limiter-audio-worklet-processor",h)})();`; // tslint:disable-line:max-line-length
2
+ export const worklet = `(()=>{"use strict";class t{constructor(t){if(this._buffer=t,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error("The given buffer is too small.")}get size(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}first(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}last(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}pop(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}shift(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}unshift(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{const e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error("Deque is full.");this._buffer[e]=t,this._firstIndex=e}}_decrementIndex(t){return 0===t?this._buffer.length-1:t-1}_incrementIndex(t){return(t+1)%this._buffer.length}_throwIfEmpty(){if(this._isEmpty)throw new Error("Deque is empty.")}}const e=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,e.length)),r===t.length?0:r;const n=r-t.length,i=t.length-s;return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,i)),e.set(new Float32Array(t.buffer,t.byteOffset,n),i),n},s=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return t.set(e,s),r===t.length?0:r;const n=r-t.length,i=t.length-s;return t.set(new Float32Array(e.buffer,e.byteOffset,i),s),t.set(new Float32Array(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,n)),n},r=Math.exp(-1/(.5*sampleRate)),n=10**-.1,i=(t,e,s,n)=>{let i=t[127];for(let h=0;h<128;h+=1){const f=(s+h)%e.length,o=Math.abs(e[f]);let l,u;if(null!==n){for(;n.size>0&&o>=Math.abs(e[n.first()]);)n.shift();(0===n.size||o<Math.abs(e[n.first()]))&&n.unshift(f);const t=(s+h+128)%e.length;n.last()===t&&n.pop();const r=n.last();l=Math.abs(e[r]),u=r<f?f-r+1:f+e.length-r+1}else l=o,u=1;const a=i-l;i<l?i-=a/u:i=l+r*a,t[h]=i}};class h extends AudioWorkletProcessor{constructor({channelCount:e,channelCountMode:s,numberOfInputs:r,numberOfOutputs:n,outputChannelCount:i,processorOptions:h}){const f="object"==typeof h&&null!==h&&"attack"in h?h.attack:0;if("number"!=typeof f)throw new Error('The attack needs to be of type "number".');if(f<0)throw new Error("The attack can't be negative.");if("explicit"!==s)throw new Error('The channelCountMode needs to be "explicit".');if(1!==r)throw new Error("The numberOfInputs must be 1.");if(1!==n)throw new Error("The numberOfOutputs must be 1.");if(void 0===i||e!==i[0])throw new Error("The channelCount must be the same as the outputChannelCount of the first output.");super();const o=sampleRate*f,l=Math.round(o),u=l+128;this._constantMemoryDeques=0===l?null:Array.from({length:e},()=>new t(new Uint16Array(l+1))),this._delayBuffers=Array.from({length:e},()=>new Float32Array(u)),this._envelopeBuffers=Array.from({length:e},()=>new Float32Array(128)),this._writeOffset=0}process([t],[r]){const h=t.length,f=this._writeOffset;for(let o=0;o<h;o+=1){const h=null===this._constantMemoryDeques?null:this._constantMemoryDeques[o],l=this._delayBuffers[o],u=this._envelopeBuffers[o],a=t[o],_=r[o];this._writeOffset=s(l,a,f),i(u,l,f,h),e(l,_,this._writeOffset);for(let t=0;t<128;t+=1){const e=Math.min(1,n/u[t]);_[t]*=e}}return!0}}h.parameterDescriptors=[],registerProcessor("limiter-audio-worklet-processor",h)})();`; // tslint:disable-line:max-line-length
3
3
  //# sourceMappingURL=worklet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worklet.js","sourceRoot":"","sources":["../../../src/worklet/worklet.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,MAAM,CAAC,MAAM,OAAO,GAAG,8+GAA8+G,CAAC,CAAC,sCAAsC"}
1
+ {"version":3,"file":"worklet.js","sourceRoot":"","sources":["../../../src/worklet/worklet.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,MAAM,CAAC,MAAM,OAAO,GAAG,w+GAAw+G,CAAC,CAAC,sCAAsC"}
@@ -5,7 +5,7 @@
5
5
  })(this, (function (exports, _defineProperty, _asyncToGenerator, _regeneratorRuntime) { 'use strict';
6
6
 
7
7
  // This is the minified and stringified code of the limiter-audio-worklet-processor package.
8
- var worklet = "(()=>{var t={45:(t,e,r)=>{var o=r(738).default;t.exports=function(t,e){if(\"object\"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||\"default\");if(\"object\"!=o(n))return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},72:t=>{function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},79:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=Array(e);r<e;r++)o[r]=t[r];return o},t.exports.__esModule=!0,t.exports.default=t.exports},122:(t,e,r)=>{var o=r(79);t.exports=function(t,e){if(t){if(\"string\"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},156:t=>{t.exports=function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var o,n,s,u,i=[],f=!0,a=!1;try{if(s=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;f=!1}else for(;!(f=(o=s.call(r)).done)&&(i.push(o.value),i.length!==e);f=!0);}catch(t){a=!0,n=t}finally{try{if(!f&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(a)throw n}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports},383:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")},t.exports.__esModule=!0,t.exports.default=t.exports},452:(t,e,r)=>{var o=r(738).default,n=r(475);t.exports=function(t,e){if(e&&(\"object\"==o(e)||\"function\"==typeof e))return e;if(void 0!==e)throw new TypeError(\"Derived constructors may only return object or undefined\");return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},475:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t},t.exports.__esModule=!0,t.exports.default=t.exports},511:(t,e,r)=>{var o=r(636);t.exports=function(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}}),Object.defineProperty(t,\"prototype\",{writable:!1}),e&&o(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},550:t=>{function e(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(r){}return(t.exports=e=function(){return!!r},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},579:(t,e,r)=>{var o=r(736);function n(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,o(n.key),n)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,\"prototype\",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},605:function(t,e,r){!function(t,e,r,o,n,s,u,i){\"use strict\";var f=function(){function t(e){if(r(this,t),this._buffer=e,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error(\"The given buffer is too small.\")}return o(t,[{key:\"size\",get:function(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}},{key:\"first\",value:function(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}},{key:\"last\",value:function(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}},{key:\"pop\",value:function(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}},{key:\"shift\",value:function(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}},{key:\"unshift\",value:function(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{var e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error(\"Deque is full.\");this._buffer[e]=t,this._firstIndex=e}}},{key:\"_decrementIndex\",value:function(t){return 0===t?this._buffer.length-1:t-1}},{key:\"_incrementIndex\",value:function(t){return(t+1)%this._buffer.length}},{key:\"_throwIfEmpty\",value:function(){if(this._isEmpty)throw new Error(\"Deque is empty.\")}}])}(),a=function(t,e,r){var o=r+e.length;if(o<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+r*e.BYTES_PER_ELEMENT,e.length)),o===t.length?0:o;var n=o-t.length,s=t.length-r;return e.set(new Float32Array(t.buffer,t.byteOffset+r*e.BYTES_PER_ELEMENT,s)),e.set(new Float32Array(t.buffer,t.byteOffset,n),s),n},l=function(t,e,r){var o=r+e.length;if(o<=t.length)return t.set(e,r),o===t.length?0:o;var n=o-t.length,s=t.length-r;return t.set(new Float32Array(e.buffer,e.byteOffset,s),r),t.set(new Float32Array(e.buffer,e.byteOffset+s*e.BYTES_PER_ELEMENT,n)),n};function p(t,e,r){return e=s(e),n(t,c()?Reflect.construct(e,[],s(t).constructor):e.apply(t,r))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}var h=.5,x=Math.exp(-1/(sampleRate*h)),d=Math.pow(10,-.1),_=function(t,e,r,o){for(var n=t[127],s=0;s<128;s+=1){var u=(r+s)%e.length,i=Math.abs(e[u]),f=void 0,a=void 0;if(null!==o){for(;o.size>0&&i>=Math.abs(e[o.first()]);)o.shift();(0===o.size||i<Math.abs(e[o.first()]))&&o.unshift(u);var l=(r+s+128)%e.length;o.last()===l&&o.pop();var p=o.last();f=Math.abs(e[p]),a=p<u?u-p+1:u+e.length-p+1}else f=i,a=1;var c=n-f;n<f?n-=c/a:n=f+x*c,t[s]=n}},y=function(n){function s(t){var o,n=t.channelCount,u=t.channelCountMode,i=t.numberOfInputs,a=t.numberOfOutputs,l=t.outputChannelCount,c=t.processorOptions;r(this,s);var h=\"object\"===e(c)&&null!==c&&\"attack\"in c?c.attack:0;if(\"number\"!=typeof h)throw new Error('The attack needs to be of type \"number\".');if(h<0)throw new Error(\"The attack can't be negative.\");if(\"explicit\"!==u)throw new Error('The channelCountMode needs to be \"explicit\".');if(1!==i)throw new Error(\"The numberOfInputs must be 1.\");if(1!==a)throw new Error(\"The numberOfOutputs must be 1.\");if(void 0===l||n!==l[0])throw new Error(\"The channelCount must be the same as the outputChannelCount of the first output.\");o=p(this,s);var x=sampleRate*h,d=Math.round(x),_=d+128;return o._constantMemoryDeques=0===d?null:Array.from({length:n},(function(){return new f(new Uint16Array(d+1))})),o._delayBuffers=Array.from({length:n},(function(){return new Float32Array(_)})),o._envelopeBuffers=Array.from({length:n},(function(){return new Float32Array(128)})),o._writeOffset=0,o}return u(s,n),o(s,[{key:\"process\",value:function(e,r){for(var o=t(e,1)[0],n=t(r,1)[0],s=o.length,u=this._writeOffset,i=0;i<s;i+=1){var f=null===this._constantMemoryDeques?null:this._constantMemoryDeques[i],p=this._delayBuffers[i],c=this._envelopeBuffers[i],h=o[i],x=n[i];this._writeOffset=l(p,h,u),_(c,p,u,f),a(p,x,this._writeOffset);for(var y=0;y<128;y+=1){var b=Math.min(1,d/c[y]);x[y]*=b}}return!0}}])}(i(AudioWorkletProcessor));y.parameterDescriptors=[],registerProcessor(\"limiter-audio-worklet-processor\",y)}(r(715),r(738),r(383),r(579),r(452),r(72),r(511),r(837))},636:t=>{function e(r,o){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},646:(t,e,r)=>{var o=r(550),n=r(636);t.exports=function(t,e,r){if(o())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,e);var u=new(t.bind.apply(t,s));return r&&n(u,r.prototype),u},t.exports.__esModule=!0,t.exports.default=t.exports},691:t=>{t.exports=function(t){try{return-1!==Function.toString.call(t).indexOf(\"[native code]\")}catch(e){return\"function\"==typeof t}},t.exports.__esModule=!0,t.exports.default=t.exports},715:(t,e,r)=>{var o=r(987),n=r(156),s=r(122),u=r(752);t.exports=function(t,e){return o(t)||n(t,e)||s(t,e)||u()},t.exports.__esModule=!0,t.exports.default=t.exports},736:(t,e,r)=>{var o=r(738).default,n=r(45);t.exports=function(t){var e=n(t,\"string\");return\"symbol\"==o(e)?e:e+\"\"},t.exports.__esModule=!0,t.exports.default=t.exports},738:t=>{function e(r){return t.exports=e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},752:t=>{t.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},t.exports.__esModule=!0,t.exports.default=t.exports},837:(t,e,r)=>{var o=r(72),n=r(636),s=r(691),u=r(646);function i(e){var r=\"function\"==typeof Map?new Map:void 0;return t.exports=i=function(t){if(null===t||!s(t))return t;if(\"function\"!=typeof t)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return u(t,arguments,o(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n(e,t)},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},987:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o].call(s.exports,s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\"use strict\";r(605)})()})();"; // tslint:disable-line:max-line-length
8
+ var worklet = "(()=>{var t={45:(t,e,r)=>{var o=r(738).default;t.exports=function(t,e){if(\"object\"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||\"default\");if(\"object\"!=o(n))return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},72:t=>{function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},79:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=Array(e);r<e;r++)o[r]=t[r];return o},t.exports.__esModule=!0,t.exports.default=t.exports},122:(t,e,r)=>{var o=r(79);t.exports=function(t,e){if(t){if(\"string\"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},156:t=>{t.exports=function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var o,n,s,u,i=[],f=!0,a=!1;try{if(s=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;f=!1}else for(;!(f=(o=s.call(r)).done)&&(i.push(o.value),i.length!==e);f=!0);}catch(t){a=!0,n=t}finally{try{if(!f&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(a)throw n}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports},383:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")},t.exports.__esModule=!0,t.exports.default=t.exports},452:(t,e,r)=>{var o=r(738).default,n=r(475);t.exports=function(t,e){if(e&&(\"object\"==o(e)||\"function\"==typeof e))return e;if(void 0!==e)throw new TypeError(\"Derived constructors may only return object or undefined\");return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},475:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t},t.exports.__esModule=!0,t.exports.default=t.exports},511:(t,e,r)=>{var o=r(636);t.exports=function(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}}),Object.defineProperty(t,\"prototype\",{writable:!1}),e&&o(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},550:t=>{function e(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(t.exports=e=function(){return!!r},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},579:(t,e,r)=>{var o=r(736);function n(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,o(n.key),n)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,\"prototype\",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},605:function(t,e,r){!function(t,e,r,o,n,s,u,i){\"use strict\";var f=function(){function t(e){if(r(this,t),this._buffer=e,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error(\"The given buffer is too small.\")}return o(t,[{key:\"size\",get:function(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}},{key:\"first\",value:function(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}},{key:\"last\",value:function(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}},{key:\"pop\",value:function(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}},{key:\"shift\",value:function(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}},{key:\"unshift\",value:function(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{var e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error(\"Deque is full.\");this._buffer[e]=t,this._firstIndex=e}}},{key:\"_decrementIndex\",value:function(t){return 0===t?this._buffer.length-1:t-1}},{key:\"_incrementIndex\",value:function(t){return(t+1)%this._buffer.length}},{key:\"_throwIfEmpty\",value:function(){if(this._isEmpty)throw new Error(\"Deque is empty.\")}}])}(),a=function(t,e,r){var o=r+e.length;if(o<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+r*e.BYTES_PER_ELEMENT,e.length)),o===t.length?0:o;var n=o-t.length,s=t.length-r;return e.set(new Float32Array(t.buffer,t.byteOffset+r*e.BYTES_PER_ELEMENT,s)),e.set(new Float32Array(t.buffer,t.byteOffset,n),s),n},l=function(t,e,r){var o=r+e.length;if(o<=t.length)return t.set(e,r),o===t.length?0:o;var n=o-t.length,s=t.length-r;return t.set(new Float32Array(e.buffer,e.byteOffset,s),r),t.set(new Float32Array(e.buffer,e.byteOffset+s*e.BYTES_PER_ELEMENT,n)),n};function p(t,e,r){return e=s(e),n(t,c()?Reflect.construct(e,[],s(t).constructor):e.apply(t,r))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}var h=.5,x=Math.exp(-1/(sampleRate*h)),d=Math.pow(10,-.1),_=function(t,e,r,o){for(var n=t[127],s=0;s<128;s+=1){var u=(r+s)%e.length,i=Math.abs(e[u]),f=void 0,a=void 0;if(null!==o){for(;o.size>0&&i>=Math.abs(e[o.first()]);)o.shift();(0===o.size||i<Math.abs(e[o.first()]))&&o.unshift(u);var l=(r+s+128)%e.length;o.last()===l&&o.pop();var p=o.last();f=Math.abs(e[p]),a=p<u?u-p+1:u+e.length-p+1}else f=i,a=1;var c=n-f;n<f?n-=c/a:n=f+x*c,t[s]=n}},y=function(n){function s(t){var o,n=t.channelCount,u=t.channelCountMode,i=t.numberOfInputs,a=t.numberOfOutputs,l=t.outputChannelCount,c=t.processorOptions;r(this,s);var h=\"object\"===e(c)&&null!==c&&\"attack\"in c?c.attack:0;if(\"number\"!=typeof h)throw new Error('The attack needs to be of type \"number\".');if(h<0)throw new Error(\"The attack can't be negative.\");if(\"explicit\"!==u)throw new Error('The channelCountMode needs to be \"explicit\".');if(1!==i)throw new Error(\"The numberOfInputs must be 1.\");if(1!==a)throw new Error(\"The numberOfOutputs must be 1.\");if(void 0===l||n!==l[0])throw new Error(\"The channelCount must be the same as the outputChannelCount of the first output.\");o=p(this,s);var x=sampleRate*h,d=Math.round(x),_=d+128;return o._constantMemoryDeques=0===d?null:Array.from({length:n},function(){return new f(new Uint16Array(d+1))}),o._delayBuffers=Array.from({length:n},function(){return new Float32Array(_)}),o._envelopeBuffers=Array.from({length:n},function(){return new Float32Array(128)}),o._writeOffset=0,o}return u(s,n),o(s,[{key:\"process\",value:function(e,r){for(var o=t(e,1)[0],n=t(r,1)[0],s=o.length,u=this._writeOffset,i=0;i<s;i+=1){var f=null===this._constantMemoryDeques?null:this._constantMemoryDeques[i],p=this._delayBuffers[i],c=this._envelopeBuffers[i],h=o[i],x=n[i];this._writeOffset=l(p,h,u),_(c,p,u,f),a(p,x,this._writeOffset);for(var y=0;y<128;y+=1){var b=Math.min(1,d/c[y]);x[y]*=b}}return!0}}])}(i(AudioWorkletProcessor));y.parameterDescriptors=[],registerProcessor(\"limiter-audio-worklet-processor\",y)}(r(715),r(738),r(383),r(579),r(452),r(72),r(511),r(837))},636:t=>{function e(r,o){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},646:(t,e,r)=>{var o=r(550),n=r(636);t.exports=function(t,e,r){if(o())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,e);var u=new(t.bind.apply(t,s));return r&&n(u,r.prototype),u},t.exports.__esModule=!0,t.exports.default=t.exports},691:t=>{t.exports=function(t){try{return-1!==Function.toString.call(t).indexOf(\"[native code]\")}catch(e){return\"function\"==typeof t}},t.exports.__esModule=!0,t.exports.default=t.exports},715:(t,e,r)=>{var o=r(987),n=r(156),s=r(122),u=r(752);t.exports=function(t,e){return o(t)||n(t,e)||s(t,e)||u()},t.exports.__esModule=!0,t.exports.default=t.exports},736:(t,e,r)=>{var o=r(738).default,n=r(45);t.exports=function(t){var e=n(t,\"string\");return\"symbol\"==o(e)?e:e+\"\"},t.exports.__esModule=!0,t.exports.default=t.exports},738:t=>{function e(r){return t.exports=e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},752:t=>{t.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},t.exports.__esModule=!0,t.exports.default=t.exports},837:(t,e,r)=>{var o=r(72),n=r(636),s=r(691),u=r(646);function i(e){var r=\"function\"==typeof Map?new Map:void 0;return t.exports=i=function(t){if(null===t||!s(t))return t;if(\"function\"!=typeof t)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return u(t,arguments,o(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n(e,t)},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},987:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o].call(s.exports,s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\"use strict\";r(605)})()})();"; // tslint:disable-line:max-line-length
9
9
 
10
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
package/package.json CHANGED
@@ -9,17 +9,17 @@
9
9
  }
10
10
  },
11
11
  "dependencies": {
12
- "@babel/runtime": "^7.27.6",
13
- "limiter-audio-worklet-processor": "^1.1.83",
12
+ "@babel/runtime": "^7.28.3",
13
+ "limiter-audio-worklet-processor": "^1.1.84",
14
14
  "standardized-audio-context": "^25.3.77",
15
15
  "tslib": "^2.8.1"
16
16
  },
17
17
  "description": "This module provides a loader for the LimiterAudioWorkletProcessor and the corresponding LimiterAudioWorkletNode.",
18
18
  "devDependencies": {
19
- "@babel/core": "^7.28.0",
19
+ "@babel/core": "^7.28.3",
20
20
  "@babel/plugin-external-helpers": "^7.27.1",
21
- "@babel/plugin-transform-runtime": "^7.28.0",
22
- "@babel/preset-env": "^7.28.0",
21
+ "@babel/plugin-transform-runtime": "^7.28.3",
22
+ "@babel/preset-env": "^7.28.3",
23
23
  "@commitlint/cli": "^19.8.1",
24
24
  "@commitlint/config-angular": "^19.8.1",
25
25
  "@rollup/plugin-babel": "^6.0.4",
@@ -29,7 +29,7 @@
29
29
  "commitizen": "^4.3.1",
30
30
  "cz-conventional-changelog": "^3.3.0",
31
31
  "eslint": "^8.57.0",
32
- "eslint-config-holy-grail": "^60.0.36",
32
+ "eslint-config-holy-grail": "^61.0.0",
33
33
  "husky": "^9.1.7",
34
34
  "karma": "^6.4.4",
35
35
  "karma-chrome-launcher": "^3.2.0",
@@ -39,21 +39,21 @@
39
39
  "karma-sinon-chai": "^2.0.2",
40
40
  "karma-webkit-launcher": "^2.6.0",
41
41
  "karma-webpack": "^5.0.1",
42
- "lint-staged": "^16.1.2",
43
- "memfs": "^4.17.2",
42
+ "lint-staged": "^16.1.5",
43
+ "memfs": "^4.38.1",
44
44
  "mocha": "^11.7.1",
45
45
  "prettier": "^3.6.2",
46
46
  "rimraf": "^6.0.1",
47
- "rollup": "^4.45.1",
47
+ "rollup": "^4.48.1",
48
48
  "sinon": "^17.0.2",
49
49
  "sinon-chai": "^3.7.0",
50
50
  "terser-webpack-plugin": "^5.3.14",
51
- "ts-loader": "^9.5.2",
51
+ "ts-loader": "^9.5.4",
52
52
  "tsconfig-holy-grail": "^15.0.2",
53
53
  "tslint": "^6.1.3",
54
54
  "tslint-config-holy-grail": "^56.0.6",
55
- "typescript": "^5.8.3",
56
- "webpack": "^5.100.2",
55
+ "typescript": "^5.9.2",
56
+ "webpack": "^5.101.3",
57
57
  "webpack-cli": "^6.0.1"
58
58
  },
59
59
  "files": [
@@ -82,5 +82,5 @@
82
82
  "test:unit": "if [ \"$TYPE\" = \"\" -o \"$TYPE\" = \"unit\" ]; then karma start config/karma/config-unit.js --single-run; fi"
83
83
  },
84
84
  "types": "build/es2019/module.d.ts",
85
- "version": "1.1.116"
85
+ "version": "1.1.117"
86
86
  }
@@ -1,2 +1,2 @@
1
1
  // This is the minified and stringified code of the limiter-audio-worklet-processor package.
2
- export const worklet = `(()=>{"use strict";class t{constructor(t){if(this._buffer=t,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error("The given buffer is too small.")}get size(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}first(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}last(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}pop(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}shift(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}unshift(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{const e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error("Deque is full.");this._buffer[e]=t,this._firstIndex=e}}_decrementIndex(t){return 0===t?this._buffer.length-1:t-1}_incrementIndex(t){return(t+1)%this._buffer.length}_throwIfEmpty(){if(this._isEmpty)throw new Error("Deque is empty.")}}const e=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,e.length)),r===t.length?0:r;const n=r-t.length,i=t.length-s;return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,i)),e.set(new Float32Array(t.buffer,t.byteOffset,n),i),n},s=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return t.set(e,s),r===t.length?0:r;const n=r-t.length,i=t.length-s;return t.set(new Float32Array(e.buffer,e.byteOffset,i),s),t.set(new Float32Array(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,n)),n},r=Math.exp(-1/(.5*sampleRate)),n=10**-.1,i=(t,e,s,n)=>{let i=t[127];for(let h=0;h<128;h+=1){const f=(s+h)%e.length,o=Math.abs(e[f]);let l,u;if(null!==n){for(;n.size>0&&o>=Math.abs(e[n.first()]);)n.shift();(0===n.size||o<Math.abs(e[n.first()]))&&n.unshift(f);const t=(s+h+128)%e.length;n.last()===t&&n.pop();const r=n.last();l=Math.abs(e[r]),u=r<f?f-r+1:f+e.length-r+1}else l=o,u=1;const a=i-l;i<l?i-=a/u:i=l+r*a,t[h]=i}};class h extends AudioWorkletProcessor{constructor({channelCount:e,channelCountMode:s,numberOfInputs:r,numberOfOutputs:n,outputChannelCount:i,processorOptions:h}){const f="object"==typeof h&&null!==h&&"attack"in h?h.attack:0;if("number"!=typeof f)throw new Error('The attack needs to be of type "number".');if(f<0)throw new Error("The attack can't be negative.");if("explicit"!==s)throw new Error('The channelCountMode needs to be "explicit".');if(1!==r)throw new Error("The numberOfInputs must be 1.");if(1!==n)throw new Error("The numberOfOutputs must be 1.");if(void 0===i||e!==i[0])throw new Error("The channelCount must be the same as the outputChannelCount of the first output.");super();const o=sampleRate*f,l=Math.round(o),u=l+128;this._constantMemoryDeques=0===l?null:Array.from({length:e},(()=>new t(new Uint16Array(l+1)))),this._delayBuffers=Array.from({length:e},(()=>new Float32Array(u))),this._envelopeBuffers=Array.from({length:e},(()=>new Float32Array(128))),this._writeOffset=0}process([t],[r]){const h=t.length,f=this._writeOffset;for(let o=0;o<h;o+=1){const h=null===this._constantMemoryDeques?null:this._constantMemoryDeques[o],l=this._delayBuffers[o],u=this._envelopeBuffers[o],a=t[o],_=r[o];this._writeOffset=s(l,a,f),i(u,l,f,h),e(l,_,this._writeOffset);for(let t=0;t<128;t+=1){const e=Math.min(1,n/u[t]);_[t]*=e}}return!0}}h.parameterDescriptors=[],registerProcessor("limiter-audio-worklet-processor",h)})();`; // tslint:disable-line:max-line-length
2
+ export const worklet = `(()=>{"use strict";class t{constructor(t){if(this._buffer=t,this._firstIndex=0,this._isEmpty=!0,this._lastIndex=0,0===this._buffer.length)throw new Error("The given buffer is too small.")}get size(){return this._isEmpty?0:this._lastIndex<this._firstIndex?this._buffer.length-this._firstIndex+this._lastIndex+1:this._lastIndex-this._firstIndex+1}first(){return this._throwIfEmpty(),this._buffer[this._firstIndex]}last(){return this._throwIfEmpty(),this._buffer[this._lastIndex]}pop(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._lastIndex=this._decrementIndex(this._lastIndex)}shift(){this._throwIfEmpty(),this._firstIndex===this._lastIndex?this._isEmpty=!0:this._firstIndex=this._incrementIndex(this._firstIndex)}unshift(t){if(this._isEmpty)this._buffer[this._firstIndex]=t,this._isEmpty=!1;else{const e=this._decrementIndex(this._firstIndex);if(e===this._lastIndex)throw new Error("Deque is full.");this._buffer[e]=t,this._firstIndex=e}}_decrementIndex(t){return 0===t?this._buffer.length-1:t-1}_incrementIndex(t){return(t+1)%this._buffer.length}_throwIfEmpty(){if(this._isEmpty)throw new Error("Deque is empty.")}}const e=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,e.length)),r===t.length?0:r;const n=r-t.length,i=t.length-s;return e.set(new Float32Array(t.buffer,t.byteOffset+s*e.BYTES_PER_ELEMENT,i)),e.set(new Float32Array(t.buffer,t.byteOffset,n),i),n},s=(t,e,s)=>{const r=s+e.length;if(r<=t.length)return t.set(e,s),r===t.length?0:r;const n=r-t.length,i=t.length-s;return t.set(new Float32Array(e.buffer,e.byteOffset,i),s),t.set(new Float32Array(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,n)),n},r=Math.exp(-1/(.5*sampleRate)),n=10**-.1,i=(t,e,s,n)=>{let i=t[127];for(let h=0;h<128;h+=1){const f=(s+h)%e.length,o=Math.abs(e[f]);let l,u;if(null!==n){for(;n.size>0&&o>=Math.abs(e[n.first()]);)n.shift();(0===n.size||o<Math.abs(e[n.first()]))&&n.unshift(f);const t=(s+h+128)%e.length;n.last()===t&&n.pop();const r=n.last();l=Math.abs(e[r]),u=r<f?f-r+1:f+e.length-r+1}else l=o,u=1;const a=i-l;i<l?i-=a/u:i=l+r*a,t[h]=i}};class h extends AudioWorkletProcessor{constructor({channelCount:e,channelCountMode:s,numberOfInputs:r,numberOfOutputs:n,outputChannelCount:i,processorOptions:h}){const f="object"==typeof h&&null!==h&&"attack"in h?h.attack:0;if("number"!=typeof f)throw new Error('The attack needs to be of type "number".');if(f<0)throw new Error("The attack can't be negative.");if("explicit"!==s)throw new Error('The channelCountMode needs to be "explicit".');if(1!==r)throw new Error("The numberOfInputs must be 1.");if(1!==n)throw new Error("The numberOfOutputs must be 1.");if(void 0===i||e!==i[0])throw new Error("The channelCount must be the same as the outputChannelCount of the first output.");super();const o=sampleRate*f,l=Math.round(o),u=l+128;this._constantMemoryDeques=0===l?null:Array.from({length:e},()=>new t(new Uint16Array(l+1))),this._delayBuffers=Array.from({length:e},()=>new Float32Array(u)),this._envelopeBuffers=Array.from({length:e},()=>new Float32Array(128)),this._writeOffset=0}process([t],[r]){const h=t.length,f=this._writeOffset;for(let o=0;o<h;o+=1){const h=null===this._constantMemoryDeques?null:this._constantMemoryDeques[o],l=this._delayBuffers[o],u=this._envelopeBuffers[o],a=t[o],_=r[o];this._writeOffset=s(l,a,f),i(u,l,f,h),e(l,_,this._writeOffset);for(let t=0;t<128;t+=1){const e=Math.min(1,n/u[t]);_[t]*=e}}return!0}}h.parameterDescriptors=[],registerProcessor("limiter-audio-worklet-processor",h)})();`; // tslint:disable-line:max-line-length