limiter-audio-worklet-processor 1.1.45 → 1.1.47
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.
- package/LICENSE +1 -1
- package/build/es5/bundle.js +10 -21
- package/package.json +21 -21
package/LICENSE
CHANGED
package/build/es5/bundle.js
CHANGED
|
@@ -4,20 +4,9 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global._slicedToArray, global._typeof, global._classCallCheck, global._createClass, global._inherits, global._possibleConstructorReturn, global._getPrototypeOf, global._wrapNativeSuper));
|
|
5
5
|
})(this, (function (_slicedToArray, _typeof, _classCallCheck, _createClass, _inherits, _possibleConstructorReturn, _getPrototypeOf, _wrapNativeSuper) { 'use strict';
|
|
6
6
|
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
10
|
-
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
11
|
-
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
12
|
-
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
13
|
-
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
14
|
-
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
15
|
-
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
16
|
-
var _wrapNativeSuper__default = /*#__PURE__*/_interopDefaultLegacy(_wrapNativeSuper);
|
|
17
|
-
|
|
18
7
|
var ConstantMemoryDeque = /*#__PURE__*/function () {
|
|
19
8
|
function ConstantMemoryDeque(_buffer) {
|
|
20
|
-
|
|
9
|
+
_classCallCheck(this, ConstantMemoryDeque);
|
|
21
10
|
this._buffer = _buffer;
|
|
22
11
|
this._firstIndex = 0;
|
|
23
12
|
this._isEmpty = true;
|
|
@@ -26,7 +15,7 @@
|
|
|
26
15
|
throw new Error('The given buffer is too small.');
|
|
27
16
|
}
|
|
28
17
|
}
|
|
29
|
-
|
|
18
|
+
_createClass(ConstantMemoryDeque, [{
|
|
30
19
|
key: "size",
|
|
31
20
|
get: function get() {
|
|
32
21
|
return this._isEmpty ? 0 : this._lastIndex < this._firstIndex ? this._buffer.length - this._firstIndex + this._lastIndex + 1 : this._lastIndex - this._firstIndex + 1;
|
|
@@ -125,7 +114,7 @@
|
|
|
125
114
|
return nextOffset;
|
|
126
115
|
};
|
|
127
116
|
|
|
128
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super =
|
|
117
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
129
118
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
130
119
|
var RELEASE_TIME_SECONDS = 0.5;
|
|
131
120
|
var RELEASE_GAIN = Math.exp(-1 / (sampleRate * RELEASE_TIME_SECONDS));
|
|
@@ -165,7 +154,7 @@
|
|
|
165
154
|
}
|
|
166
155
|
};
|
|
167
156
|
var LimiterAudioWorkletProcessor = /*#__PURE__*/function (_AudioWorkletProcesso) {
|
|
168
|
-
|
|
157
|
+
_inherits(LimiterAudioWorkletProcessor, _AudioWorkletProcesso);
|
|
169
158
|
var _super = _createSuper(LimiterAudioWorkletProcessor);
|
|
170
159
|
function LimiterAudioWorkletProcessor(_ref) {
|
|
171
160
|
var _this;
|
|
@@ -175,8 +164,8 @@
|
|
|
175
164
|
numberOfOutputs = _ref.numberOfOutputs,
|
|
176
165
|
outputChannelCount = _ref.outputChannelCount,
|
|
177
166
|
processorOptions = _ref.processorOptions;
|
|
178
|
-
|
|
179
|
-
var attack =
|
|
167
|
+
_classCallCheck(this, LimiterAudioWorkletProcessor);
|
|
168
|
+
var attack = _typeof(processorOptions) === 'object' && processorOptions !== null && 'attack' in processorOptions ? processorOptions.attack : 0;
|
|
180
169
|
if (typeof attack !== 'number') {
|
|
181
170
|
throw new Error('The attack needs to be of type "number".');
|
|
182
171
|
}
|
|
@@ -217,12 +206,12 @@
|
|
|
217
206
|
_this._writeOffset = 0;
|
|
218
207
|
return _this;
|
|
219
208
|
}
|
|
220
|
-
|
|
209
|
+
_createClass(LimiterAudioWorkletProcessor, [{
|
|
221
210
|
key: "process",
|
|
222
211
|
value: function process(_ref2, _ref3) {
|
|
223
|
-
var _ref4 =
|
|
212
|
+
var _ref4 = _slicedToArray(_ref2, 1),
|
|
224
213
|
input = _ref4[0];
|
|
225
|
-
var _ref5 =
|
|
214
|
+
var _ref5 = _slicedToArray(_ref3, 1),
|
|
226
215
|
output = _ref5[0];
|
|
227
216
|
var numberOfChannels = input.length;
|
|
228
217
|
var writeOffset = this._writeOffset;
|
|
@@ -244,7 +233,7 @@
|
|
|
244
233
|
}
|
|
245
234
|
}]);
|
|
246
235
|
return LimiterAudioWorkletProcessor;
|
|
247
|
-
}( /*#__PURE__*/
|
|
236
|
+
}( /*#__PURE__*/_wrapNativeSuper(AudioWorkletProcessor));
|
|
248
237
|
LimiterAudioWorkletProcessor.parameterDescriptors = [];
|
|
249
238
|
|
|
250
239
|
registerProcessor('limiter-audio-worklet-processor', LimiterAudioWorkletProcessor);
|
package/package.json
CHANGED
|
@@ -9,27 +9,27 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@babel/runtime": "^7.20.
|
|
13
|
-
"tslib": "^2.
|
|
12
|
+
"@babel/runtime": "^7.20.13",
|
|
13
|
+
"tslib": "^2.5.0"
|
|
14
14
|
},
|
|
15
15
|
"description": "The AudioWorkletProcessor which is used by the limiter-audio-worklet package.",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@babel/core": "^7.20.
|
|
17
|
+
"@babel/core": "^7.20.12",
|
|
18
18
|
"@babel/plugin-external-helpers": "^7.18.6",
|
|
19
19
|
"@babel/plugin-transform-runtime": "^7.19.6",
|
|
20
20
|
"@babel/preset-env": "^7.20.2",
|
|
21
|
-
"@commitlint/cli": "^17.
|
|
22
|
-
"@commitlint/config-angular": "^17.
|
|
23
|
-
"@rollup/plugin-babel": "^
|
|
21
|
+
"@commitlint/cli": "^17.4.2",
|
|
22
|
+
"@commitlint/config-angular": "^17.4.2",
|
|
23
|
+
"@rollup/plugin-babel": "^6.0.3",
|
|
24
24
|
"chai": "^4.3.7",
|
|
25
|
-
"commitizen": "^4.
|
|
25
|
+
"commitizen": "^4.3.0",
|
|
26
26
|
"cz-conventional-changelog": "^3.3.0",
|
|
27
|
-
"eslint": "^8.
|
|
28
|
-
"eslint-config-holy-grail": "^
|
|
29
|
-
"grunt": "^1.
|
|
27
|
+
"eslint": "^8.33.0",
|
|
28
|
+
"eslint-config-holy-grail": "^55.0.6",
|
|
29
|
+
"grunt": "^1.6.1",
|
|
30
30
|
"grunt-cli": "^1.4.3",
|
|
31
31
|
"grunt-sh": "^0.2.0",
|
|
32
|
-
"husky": "^8.0.
|
|
32
|
+
"husky": "^8.0.3",
|
|
33
33
|
"karma": "^6.4.1",
|
|
34
34
|
"karma-chrome-launcher": "^3.1.1",
|
|
35
35
|
"karma-cli": "^2.0.0",
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
"karma-webpack": "^5.0.0",
|
|
43
43
|
"load-grunt-config": "^4.0.1",
|
|
44
44
|
"memory-fs": "^0.5.0",
|
|
45
|
-
"mocha": "^10.
|
|
46
|
-
"prettier": "^2.8.
|
|
45
|
+
"mocha": "^10.2.0",
|
|
46
|
+
"prettier": "^2.8.3",
|
|
47
47
|
"pretty-quick": "^3.1.3",
|
|
48
|
-
"rimraf": "^
|
|
49
|
-
"rollup": "^
|
|
50
|
-
"sinon": "^
|
|
48
|
+
"rimraf": "^4.1.2",
|
|
49
|
+
"rollup": "^3.12.1",
|
|
50
|
+
"sinon": "^15.0.1",
|
|
51
51
|
"sinon-chai": "^3.7.0",
|
|
52
|
-
"standardized-audio-context": "^25.3.
|
|
52
|
+
"standardized-audio-context": "^25.3.38",
|
|
53
53
|
"ts-loader": "^9.4.2",
|
|
54
|
-
"tsconfig-holy-grail": "^
|
|
54
|
+
"tsconfig-holy-grail": "^12.0.0",
|
|
55
55
|
"tslint": "^6.1.3",
|
|
56
|
-
"tslint-config-holy-grail": "^
|
|
57
|
-
"typescript": "^4.9.
|
|
56
|
+
"tslint-config-holy-grail": "^54.0.1",
|
|
57
|
+
"typescript": "^4.9.5",
|
|
58
58
|
"webpack": "^5.75.0"
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"test": "grunt lint && grunt test"
|
|
78
78
|
},
|
|
79
79
|
"types": "build/es2019/module.d.ts",
|
|
80
|
-
"version": "1.1.
|
|
80
|
+
"version": "1.1.47"
|
|
81
81
|
}
|