speaker-calibration 2.1.1 → 2.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speaker-calibration",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Speaker calibration library for auditory testing",
5
5
  "main": "dist/main.js",
6
6
  "directories": {
@@ -123,7 +123,8 @@ class Volume extends AudioCalibrator {
123
123
  })
124
124
  .then(res => {
125
125
  if (this.outDBSPL === null) {
126
- this.outDBSPL = res;
126
+ this.outDBSPL = res['outDbSPL'];
127
+ this.soundGainDBSPL = res['soundGainDbSPL'];
127
128
  }
128
129
  })
129
130
  .catch(err => {
@@ -155,7 +156,9 @@ class Volume extends AudioCalibrator {
155
156
  );
156
157
  } while (this.outDBSPL === null);
157
158
  outDBSPLValues.push(this.outDBSPL);
159
+ soundGainDBSPLValues.push(this.soundGainDBSPL);
158
160
  this.outDBSPL = null;
161
+ this.soundGainDBSPL = null;
159
162
  }
160
163
 
161
164
  // get the volume calibration parameters from the server
@@ -167,7 +170,14 @@ class Volume extends AudioCalibrator {
167
170
  });
168
171
  // console.log('Parameters: ', parameters);
169
172
  // return soundGainDBSPLValues;
170
- return parameters;
173
+ const result = {
174
+ parameters: parameters,
175
+ inDBValues: inDBValues,
176
+ outDBSPLValues: outDBSPLValues,
177
+ soundGainDBSPLValues: soundGainDBSPLValues,
178
+ };
179
+ // console.log('Result: ', result);
180
+ return result;
171
181
  };
172
182
  }
173
183