From 6f87e947ff4cd6e84d8d9004d46a6c36c632c3bf Mon Sep 17 00:00:00 2001 From: Alex Mihaiuc <69110671+foxmsft@users.noreply.github.com> Date: Thu, 5 Feb 2026 02:01:10 +0100 Subject: [PATCH] ZoomIt: close the virtual microphone on stop (#45386) This is not a leak per se, but closing the virtual microphone when recording stops is a good thing to do. Also bump ZoomIt's version to 10.1. ## Summary of the Pull Request This is a code quality addition, not a real bug per se - ZoomIt holds one reference to a virtual microphone stream, thus causing the notification area (system tray) microphone symbol always show ZoomIt as "recording" even after stopping a screen recording in ZoomIt. ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments It's sufficient to just notice that: - Audio recording still works. - The notification area / system tray microphone notification is active while screen recording. - That notification disappears after stopping the ZoomIt screen capture session. - ## Validation Steps Performed --- src/modules/ZoomIt/ZoomIt/AudioSampleGenerator.cpp | 8 ++++++++ src/modules/ZoomIt/ZoomIt/ZoomIt.rc | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/modules/ZoomIt/ZoomIt/AudioSampleGenerator.cpp b/src/modules/ZoomIt/ZoomIt/AudioSampleGenerator.cpp index fecdca4356..b3b0ed373f 100644 --- a/src/modules/ZoomIt/ZoomIt/AudioSampleGenerator.cpp +++ b/src/modules/ZoomIt/ZoomIt/AudioSampleGenerator.cpp @@ -311,6 +311,14 @@ void AudioSampleGenerator::Stop() // Stop the audio graph - no more quantum callbacks will run m_audioGraph.Stop(); + // Close the microphone input node to release the device so Windows no longer + // reports the microphone as in use by ZoomIt. + if (m_audioInputNode) + { + m_audioInputNode.Close(); + m_audioInputNode = nullptr; + } + // Mark as stopped m_started.store(false); diff --git a/src/modules/ZoomIt/ZoomIt/ZoomIt.rc b/src/modules/ZoomIt/ZoomIt/ZoomIt.rc index 6fe01af2bb..d3c5210744 100644 --- a/src/modules/ZoomIt/ZoomIt/ZoomIt.rc +++ b/src/modules/ZoomIt/ZoomIt/ZoomIt.rc @@ -121,7 +121,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,186,306,50,14 PUSHBUTTON "Cancel",IDCANCEL,243,306,50,14 - LTEXT "ZoomIt v10.0",IDC_VERSION,42,7,73,10 + LTEXT "ZoomIt v10.1",IDC_VERSION,42,7,73,10 LTEXT "Copyright \251 2006-2026 Mark Russinovich",IDC_COPYRIGHT,42,17,251,8 CONTROL "Sysinternals - www.sysinternals.com",IDC_LINK, "SysLink",WS_TABSTOP,42,26,150,9