mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-22 14:02:29 -05:00
Fix comments
This commit is contained in:
parent
dba8c6f91d
commit
5add85bd60
1 changed files with 2 additions and 2 deletions
|
@ -292,7 +292,7 @@ class AudioEngine {
|
|||
* @return {number} loudness scaled 0 to 100
|
||||
*/
|
||||
getLoudness () {
|
||||
// the microphone has not been set up, try to connect to it
|
||||
// The microphone has not been set up, so try to connect to it
|
||||
if (!this.mic && !this.connectingToMic) {
|
||||
this.connectingToMic = true; // prevent multiple connection attempts
|
||||
navigator.mediaDevices.getUserMedia({audio: true}).then(stream => {
|
||||
|
@ -306,7 +306,7 @@ class AudioEngine {
|
|||
});
|
||||
}
|
||||
|
||||
// if the microphone is set up and active, measure the loudness
|
||||
// If the microphone is set up and active, measure the loudness
|
||||
if (this.mic && this.mic.mediaStream.active) {
|
||||
this.analyser.getFloatTimeDomainData(this.micDataArray);
|
||||
let sum = 0;
|
||||
|
|
Loading…
Reference in a new issue