From 4e0a407ecbf484aeceeaf81d87cd44d13e9c9d5c Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 5 Apr 2019 12:12:40 +0200 Subject: [PATCH] stop microphone output when the user presses the stop button --- HISTORY.md | 1 + src/objects.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index bdf938ea..ec372875 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -64,6 +64,7 @@ * Objects: tweaked oscillator fade-out * Blocks, Threads: added "sample rate" selector to microphone drow-down * updated German translation for "sample rate" +* Objects: stop microphone output when the user presses the stop button ### 2019-04-04 * Objects, Threads: new "play frequency" commands in the Sounds category diff --git a/src/objects.js b/src/objects.js index 4e9e2f0f..dfaa67ff 100644 --- a/src/objects.js +++ b/src/objects.js @@ -8120,6 +8120,9 @@ StageMorph.prototype.stopAllActiveSounds = function () { audio.pause(); }); this.activeSounds = []; + if (this.microphone.modifier && this.microphone.isReady) { + this.microphone.stop(); + } }; StageMorph.prototype.pauseAllActiveSounds = function () {