Browse Source

Fix a typo.

master
Boris Grozev 10 years ago
parent
commit
35e46a2cfa
1 changed files with 8 additions and 10 deletions
  1. 8
    10
      modules/statistics/LocalStatsCollector.js

+ 8
- 10
modules/statistics/LocalStatsCollector.js View File

@@ -6,20 +6,20 @@
6 6
 var RTCBrowserType = require('../RTC/RTCBrowserType');
7 7
 
8 8
 /**
9
- * Size of the webaudio analizer buffer.
9
+ * Size of the webaudio analyzer buffer.
10 10
  * @type {number}
11 11
  */
12
-var WEBAUDIO_ANALIZER_FFT_SIZE = 2048;
12
+var WEBAUDIO_ANALYZER_FFT_SIZE = 2048;
13 13
 
14 14
 /**
15
- * Value of the webaudio analizer smoothing time parameter.
15
+ * Value of the webaudio analyzer smoothing time parameter.
16 16
  * @type {number}
17 17
  */
18
-var WEBAUDIO_ANALIZER_SMOOTING_TIME = 0.8;
18
+var WEBAUDIO_ANALYZER_SMOOTING_TIME = 0.8;
19 19
 
20 20
 /**
21 21
  * Converts time domain data array to audio level.
22
- * @param array the time domain data array.
22
+ * @param samples the time domain data array.
23 23
  * @returns {number} the audio level
24 24
  */
25 25
 function timeDomainDataToAudioLevel(samples) {
@@ -64,8 +64,6 @@ function animateLevel(newLevel, lastLevel) {
64 64
  *
65 65
  * @param stream the local stream
66 66
  * @param interval stats refresh interval given in ms.
67
- * @param {function(LocalStatsCollector)} updateCallback the callback called on stats
68
- *                                   update.
69 67
  * @constructor
70 68
  */
71 69
 function LocalStatsCollector(stream, interval, statisticsService, eventEmitter) {
@@ -88,8 +86,8 @@ LocalStatsCollector.prototype.start = function () {
88 86
 
89 87
     var context = new AudioContext();
90 88
     var analyser = context.createAnalyser();
91
-    analyser.smoothingTimeConstant = WEBAUDIO_ANALIZER_SMOOTING_TIME;
92
-    analyser.fftSize = WEBAUDIO_ANALIZER_FFT_SIZE;
89
+    analyser.smoothingTimeConstant = WEBAUDIO_ANALYZER_SMOOTING_TIME;
90
+    analyser.fftSize = WEBAUDIO_ANALYZER_FFT_SIZE;
93 91
 
94 92
 
95 93
     var source = context.createMediaStreamSource(this.stream);
@@ -103,7 +101,7 @@ LocalStatsCollector.prototype.start = function () {
103 101
             var array = new Uint8Array(analyser.frequencyBinCount);
104 102
             analyser.getByteTimeDomainData(array);
105 103
             var audioLevel = timeDomainDataToAudioLevel(array);
106
-            if(audioLevel != self.audioLevel) {
104
+            if (audioLevel != self.audioLevel) {
107 105
                 self.audioLevel = animateLevel(audioLevel, self.audioLevel);
108 106
                 self.eventEmitter.emit(
109 107
                     "statistics.audioLevel",

Loading…
Cancel
Save