From b14852ab3c147ed4569a5037e338d78ff771ce35 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Mon, 27 Mar 2017 13:23:01 -0400 Subject: [PATCH] If mic is not enabled, return -1 To match Scratch 2.0 behavior --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 94049ae..e38d7a2 100644 --- a/src/index.js +++ b/src/index.js @@ -162,7 +162,7 @@ AudioEngine.prototype.getLoudness = function () { if (this.mic && this.mic.state == 'started') { return this.micMeter.value * 100; } else { - return 0; + return -1; } };