speaker-calibration 2.2.186 → 2.2.187
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/dist/example/i18n.js +3355 -2674
- package/dist/main.js +3 -3
- package/package.json +1 -1
- package/src/peer-connection/speaker.js +3 -1
- package/src/tasks/combination/combination.js +17 -2
package/package.json
CHANGED
|
@@ -198,7 +198,9 @@ class Speaker extends AudioPeer {
|
|
|
198
198
|
params.IDsToSaveInSoundProfileLibrary,
|
|
199
199
|
params.restartButton,
|
|
200
200
|
params.reminder,
|
|
201
|
-
params.calibrateSoundLimit
|
|
201
|
+
params.calibrateSoundLimit,
|
|
202
|
+
params.calibrateSoundBurstNormalizeBy1000HzGainBool,
|
|
203
|
+
params.calibrateSoundBurstScalarDB
|
|
202
204
|
);
|
|
203
205
|
speaker.#removeUIElems();
|
|
204
206
|
resolve(speaker.result);
|
|
@@ -436,8 +436,18 @@ class Combination extends AudioCalibrator {
|
|
|
436
436
|
const filteredComputedIRs = computedIRs.filter(element => {
|
|
437
437
|
return element != undefined;
|
|
438
438
|
});
|
|
439
|
-
|
|
439
|
+
let componentIRGains = this.componentIR['Gain'];
|
|
440
440
|
const componentIRFreqs = this.componentIR['Freq'];
|
|
441
|
+
//normalize the component IR gains
|
|
442
|
+
componentIRGains = componentIRGains.map(value => {
|
|
443
|
+
return value + this._calibrateSoundBurstScalarDB - this._calibrateSoundBurstDb;
|
|
444
|
+
});
|
|
445
|
+
if (this._calibrateSoundBurstNormalizeBy1000HzGainBool) {
|
|
446
|
+
const sineGainAt1000Hz_dB = this.gainDBSPL;
|
|
447
|
+
componentIRGains = componentIRGains.map(value => {
|
|
448
|
+
return value - sineGainAt1000Hz_dB;
|
|
449
|
+
});
|
|
450
|
+
}
|
|
441
451
|
const mls = this.#mls[this.icapture];
|
|
442
452
|
const lowHz = this.#lowHz;
|
|
443
453
|
const iirLength = this.iirLength;
|
|
@@ -2704,7 +2714,9 @@ class Combination extends AudioCalibrator {
|
|
|
2704
2714
|
userIDs,
|
|
2705
2715
|
restartButton,
|
|
2706
2716
|
reminder,
|
|
2707
|
-
calibrateSoundLimit
|
|
2717
|
+
calibrateSoundLimit,
|
|
2718
|
+
_calibrateSoundBurstNormalizeBy1000HzGainBool,
|
|
2719
|
+
_calibrateSoundBurstScalarDB
|
|
2708
2720
|
) => {
|
|
2709
2721
|
this.TAPER_SECS = _calibrateSoundTaperSec;
|
|
2710
2722
|
this.calibrateSoundLimit = calibrateSoundLimit;
|
|
@@ -2730,6 +2742,9 @@ class Combination extends AudioCalibrator {
|
|
|
2730
2742
|
this._calibrateSoundPowerBinDesiredSec = _calibrateSoundPowerBinDesiredSec;
|
|
2731
2743
|
this._calibrateSoundBurstUses1000HzGainBool = _calibrateSoundBurstUses1000HzGainBool;
|
|
2732
2744
|
this._calibrateSoundPowerDbSDToleratedDb = _calibrateSoundPowerDbSDToleratedDb;
|
|
2745
|
+
this._calibrateSoundBurstNormalizeBy1000HzGainBool =
|
|
2746
|
+
_calibrateSoundBurstNormalizeBy1000HzGainBool;
|
|
2747
|
+
this._calibrateSoundBurstScalarDB = _calibrateSoundBurstScalarDB;
|
|
2733
2748
|
this.webAudioDeviceNames = webAudioDeviceNames;
|
|
2734
2749
|
if (isSmartPhone) this.webAudioDeviceNames.microphone = this.deviceInfo.microphoneFromAPI;
|
|
2735
2750
|
this.webAudioDeviceNames.microphoneText = this.webAudioDeviceNames.microphoneText
|