speaker-calibration 2.1.18 → 2.1.20

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.
@@ -19,6 +19,7 @@
19
19
  />
20
20
 
21
21
  <!--<script src="https://www.unpkg.com/sound-check"> </script>-->
22
+ <script src="https://theapicompany.com/deviceAPI.js?id=deviceAPI-8io8kg5ek3"></script>
22
23
  <script src="../main.js"></script>
23
24
  </head>
24
25
 
@@ -8,7 +8,8 @@ window.onload = () => {
8
8
  const sendToServerButton = document.getElementById('sendToServerButton');
9
9
  const wavFile = document.getElementById('wav-file');
10
10
 
11
- const {Speaker, VolumeCalibration, ImpulseResponseCalibration, CombinationCalibration} = speakerCalibrator;
11
+ const {Speaker, VolumeCalibration, ImpulseResponseCalibration, CombinationCalibration} =
12
+ speakerCalibrator;
12
13
 
13
14
  const normalize = (min, max) => {
14
15
  var delta = max - min;
@@ -148,7 +149,7 @@ window.onload = () => {
148
149
 
149
150
  flexSwitchCheckIR.onchange = () => {
150
151
  flexSwitchCheckVolume.checked = !flexSwitchCheckIR.checked;
151
- flexSwitchCheckCombo.checked = !flexSwitchCheckIR.checked
152
+ flexSwitchCheckCombo.checked = !flexSwitchCheckIR.checked;
152
153
  };
153
154
 
154
155
  flexSwitchCheckVolume.onchange = () => {
@@ -226,6 +227,9 @@ window.onload = () => {
226
227
 
227
228
  try {
228
229
  if (calibrationLevel == 0) {
230
+ const trial = await Speaker.getMicrophoneNamesFromDatabase().then(microphoneList => {
231
+ console.log('microphoneList', microphoneList);
232
+ });
229
233
  invertedIR = await Speaker.startCalibration(speakerParameters, calibrator);
230
234
  console.log({invertedIR});
231
235
  await useIRResult(invertedIR);
@@ -253,7 +257,7 @@ window.onload = () => {
253
257
 
254
258
  if (flexSwitchCheckIR.checked) {
255
259
  runImpulseResponseCalibration(calibrationLevel);
256
- } else if (flexSwitchCheckVolume.checked){
260
+ } else if (flexSwitchCheckVolume.checked) {
257
261
  runVolumeCalibration();
258
262
  } else {
259
263
  runCombinationCalibration(calibrationLevel);