ZoomIt: Fix silent recording audio on multichannel audio endpoints - #49400
Open
markrussinovich wants to merge 2 commits into
Open
ZoomIt: Fix silent recording audio on multichannel audio endpoints#49400markrussinovich wants to merge 2 commits into
markrussinovich wants to merge 2 commits into
Conversation
When the audio engine's processing format for the default render device is multichannel (e.g. 7.1 with spatial sound enabled), AudioGraph inherits that channel count and the recording's AAC track is encoded with 8 channels. The encoder produces a multichannel HE-AAC stream that most decoders (including the Media Foundation AAC decoder, which supports at most 5.1 AAC-LC) cannot play, so recordings play back silent for both microphone and system audio. Re-create the AudioGraph with an explicit stereo format at the device sample rate when the default format has more than two channels. Everything downstream (microphone input node, loopback channel mapping, AAC encoding profile, MediaStreamSource descriptor) inherits the stereo format, so no other changes are needed. Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
Left-align the Record Toggle label and the two audio capture checkbox labels at the dialog margin (they previously had ragged left edges from right-aligned text), keep the capture checkboxes in the same column as the noise cancellation checkbox, and put the whole control block on a uniform 16-DLU row pitch (rows were previously spaced 18/18/18/18/14/15). Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
MarioHewardt
approved these changes
Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Two ZoomIt recording fixes:
Fix silent recording audio on multichannel audio endpoints. On machines where the audio engine's processing format for the default render device is multichannel — most commonly when spatial sound (Windows Sonic / Dolby Atmos) is enabled —
AudioGraph.EncodingProperties()reports 8 channels even though the device's shared-mode mix format is stereo. ZoomIt passed that channel count straight intoAudioEncodingProperties::CreateAac()and theAudioStreamDescriptor, and the recording's audio track came out as 8-channel HE-AAC (AOT 5/SBR, 24 kHz core,channelConfiguration=7). The Media Foundation AAC decoder supports at most 5.1 AAC-LC, so players cannot decode the track and recordings play back silent for both microphone and system audio, with no error shown. The fix re-creates the AudioGraph with an explicit stereo format at the device sample rate whenever the default format has more than two channels (falling back to the default format if stereo creation fails). The microphone input node, loopback channel mapping, AAC encoding profile, and MediaStreamSource descriptor all inherit the graph format, so no other changes are needed.Record options tab layout cleanup. Left-align the "Record Toggle:" label and the two audio capture checkbox labels at the dialog margin (they previously had ragged left edges from right-aligned text), keep the capture checkboxes in the same column as the noise cancellation checkbox, and put the control block on a uniform 16-DLU row pitch (rows were previously spaced 18/18/18/18/14/15).
PR Checklist
Detailed Description of the Pull Request / Additional comments
Root-cause analysis of the silent audio: parsing a repro MP4 showed a
sountrack withstsd/mp4a channels=8and anesdsAudioSpecificConfig of2B 39 88 00— HE-AAC (audioObjectType 5), 24 kHz core with SBR extension to 48 kHz, channelConfiguration 7 (7.1).MediaTranscoder.PrepareFileTranscodeAsyncon that file fails to decode the audio, matching what every player does (video plays, audio silently missing). The channel count originated fromAudioGraph.EncodingProperties()returning 48 kHz/8ch float on the repro machine even thoughIAudioClient::GetMixFormatfor the same endpoint reports stereo.The fix is confined to
AudioSampleGenerator::InitializeAsync: if the freshly created graph reports more than 2 channels, close it and re-create it withAudioGraphSettings.EncodingPropertiesset to the same subtype/sample rate/bits butChannelCount = 2. On stereo-endpoint machines the new path never executes.Validation Steps Performed
esdsdecoder config11 90, 1024-sample frames); decoding the track viaMediaTranscoderto WAV succeeds; the PCM measures RMS −11.5 dBFS with a clean spectral peak at 440 Hz (Goertzel: magnitude 5999 at 440 Hz vs ≤17 at neighboring frequencies). Microphone audio is mixed into the same (now decodable) track.