diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index 138e3fd..6c68743 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -270,6 +270,8 @@ export class AudioEngine extends ((EngineEmitter as unknown) as { if (this.micSource !== null && this.micMedia !== null) { this.micMedia.getAudioTracks()[0].stop(); this.micSource.disconnect(); + this.micSource = null; + this.micMedia = null; } console.log("opening mic", deviceId); this.micMedia = await navigator.mediaDevices.getUserMedia({