speaker-calibration 2.2.193 → 2.2.195
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 +1573 -1574
- package/dist/main.js +3 -3
- package/package.json +1 -1
- package/src/tasks/audioCalibrator.js +1 -0
- package/src/tasks/combination/combination.js +17 -1
package/package.json
CHANGED
|
@@ -240,6 +240,7 @@ class Combination extends AudioCalibrator {
|
|
|
240
240
|
unfiltered: [],
|
|
241
241
|
system: [],
|
|
242
242
|
component: [],
|
|
243
|
+
warnings:[]
|
|
243
244
|
};
|
|
244
245
|
|
|
245
246
|
inDB;
|
|
@@ -604,6 +605,10 @@ class Combination extends AudioCalibrator {
|
|
|
604
605
|
console.log('SD: ' + result['sd'] + ', less than _calibrateSoundBurstMaxSD_dB: ' + this._calibrateSoundBurstMaxSD_dB);
|
|
605
606
|
} else {
|
|
606
607
|
console.log('SD: ' + result['sd'] + ', greater than _calibrateSoundBurstMaxSD_dB: ' + this._calibrateSoundBurstMaxSD_dB);
|
|
608
|
+
this.recordingChecks['warnings'].push(`Redo all Hz recording because SD ${result['sd']} dB> ${this._calibrateSoundBurstMaxSD_dB} dB`);
|
|
609
|
+
this.status =
|
|
610
|
+
`Redoing all Hz recording because SD ${result['sd']} dB> ${this._calibrateSoundBurstMaxSD_dB} dB`.toString() +
|
|
611
|
+
this.generateTemplate().toString();
|
|
607
612
|
}
|
|
608
613
|
if (this.numSuccessfulCaptured == 1) {
|
|
609
614
|
console.log('pop last unfiltered mls volume check');
|
|
@@ -2246,6 +2251,12 @@ class Combination extends AudioCalibrator {
|
|
|
2246
2251
|
};
|
|
2247
2252
|
|
|
2248
2253
|
#playCalibrationAudioVolume = async () => {
|
|
2254
|
+
if (this.numCalibratingRoundsCompleted==1) {
|
|
2255
|
+
this.recordingChecks['warnings'].push(`Redo 1000 Hz, ${this.inDB} dB, recording because SD ${this.recordingChecks['volume'][this.inDB]['sd']} dB> ${this.calibrateSound1000HzMaxSD_dB} dB`);
|
|
2256
|
+
this.status =
|
|
2257
|
+
`Redoing 1000 Hz recording because SD ${this.recordingChecks['volume'][this.inDB]} dB> ${this.calibrateSound1000HzMaxSD_dB} dB`.toString() +
|
|
2258
|
+
this.generateTemplate().toString();
|
|
2259
|
+
}
|
|
2249
2260
|
const totalDuration = this.CALIBRATION_TONE_DURATION * 1.2;
|
|
2250
2261
|
|
|
2251
2262
|
this.calibrationNodes[0].start(0);
|
|
@@ -2341,6 +2352,7 @@ class Combination extends AudioCalibrator {
|
|
|
2341
2352
|
//reset the values
|
|
2342
2353
|
//this.incrementStatusBar();
|
|
2343
2354
|
|
|
2355
|
+
console.log(this.recordingChecks['warnings']);
|
|
2344
2356
|
this.outDBSPL = null;
|
|
2345
2357
|
this.outDBSPL = null;
|
|
2346
2358
|
this.outDBSPL1000 = null;
|
|
@@ -2645,8 +2657,12 @@ class Combination extends AudioCalibrator {
|
|
|
2645
2657
|
})
|
|
2646
2658
|
.then(result => {
|
|
2647
2659
|
if (result) {
|
|
2648
|
-
if (result['sd'] > this._calibrateSoundBurstMaxSD_dB & this.numSuccessfulCaptured) {
|
|
2660
|
+
if (result['sd'] > this._calibrateSoundBurstMaxSD_dB & this.numSuccessfulCaptured == 0) {
|
|
2649
2661
|
console.log('filtered recording sd too high');
|
|
2662
|
+
this.recordingChecks['warnings'].push(`Redo all Hz recording because SD ${result['sd']} dB> ${this._calibrateSoundBurstMaxSD_dB} dB`);
|
|
2663
|
+
this.status =
|
|
2664
|
+
`Redoing all Hz recording because SD ${result['sd']} dB> ${this._calibrateSoundBurstMaxSD_dB} dB`.toString() +
|
|
2665
|
+
this.generateTemplate().toString();
|
|
2650
2666
|
// numSuccessfulCaptured no longer to count number of successful capture but count attemps
|
|
2651
2667
|
// is sd below _calibrateSoundBurstMaxSD_dB then count two attemps
|
|
2652
2668
|
// else count one attemp
|