Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/modules/ZoomIt/ZoomIt/AudioSampleGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,38 @@ winrt::IAsyncAction AudioSampleGenerator::InitializeAsync()
}
m_audioGraph = audioGraphResult.Graph();

// The default graph format follows the audio engine's processing format
// for the default render device, which can be multichannel (e.g. 7.1
// when spatial sound is enabled). Feeding more than two channels into
// the AAC encoding profile produces a multichannel HE-AAC track that
// most decoders, including the Media Foundation AAC decoder (max 5.1),
// cannot play, so recordings sound silent. Re-create the graph with an
// explicit stereo format at the device sample rate.
if (m_audioGraph.EncodingProperties().ChannelCount() > 2)
{
auto defaultProps = m_audioGraph.EncodingProperties();
auto stereoProps = winrt::AudioEncodingProperties();
stereoProps.Subtype(defaultProps.Subtype());
stereoProps.SampleRate(defaultProps.SampleRate());
stereoProps.BitsPerSample(defaultProps.BitsPerSample());
stereoProps.ChannelCount(2);
stereoProps.Bitrate(defaultProps.SampleRate() * 2 * defaultProps.BitsPerSample());

auto stereoSettings = winrt::AudioGraphSettings(winrt::AudioRenderCategory::Media);
stereoSettings.EncodingProperties(stereoProps);
auto stereoResult = co_await winrt::AudioGraph::CreateAsync(stereoSettings);
if (stereoResult.Status() == winrt::AudioGraphCreationStatus::Success)
{
m_audioGraph.Close();
m_audioGraph = stereoResult.Graph();
OutputDebugStringA("AudioGraph re-created with stereo format\n");
}
else
{
OutputDebugStringA("WARNING: Failed to re-create AudioGraph with stereo format, keeping default\n");
}
}

// Get AudioGraph encoding properties for resampling
auto graphProps = m_audioGraph.EncodingProperties();
m_graphSampleRate = graphProps.SampleRate();
Expand Down
34 changes: 17 additions & 17 deletions src/modules/ZoomIt/ZoomIt/ZoomIt.rc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,184,308,50,14
PUSHBUTTON "Cancel",IDCANCEL,241,308,50,14
LTEXT "ZoomIt v12.11",IDC_VERSION,42,7,73,10
LTEXT "Copyright � 2006-2026 Mark Russinovich",IDC_COPYRIGHT,42,17,251,8
LTEXT "Copyright � 2006-2026 Mark Russinovich",IDC_COPYRIGHT,42,17,251,8
CONTROL "<a HREF=""https://www.sysinternals.com"">Sysinternals - www.sysinternals.com</a>",IDC_LINK,
"SysLink",WS_TABSTOP,42,26,150,9
ICON "APPICON",IDC_STATIC,12,9,20,20
Expand Down Expand Up @@ -266,26 +266,26 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "",IDC_RECORD_HOTKEY,"msctls_hotkey32",WS_BORDER | WS_TABSTOP,65,72,80,12
RTEXT "Record Toggle:",IDC_STATIC,7,74,54,8
LTEXT "Record Toggle:",IDC_STATIC,7,74,54,8
LTEXT "Record video of the unzoomed live screen or a static zoomed session by entering the recording hot key and finish the recording by entering it again. ",IDC_STATIC,7,7,266,18
RTEXT "Scaling:",IDC_STATIC,36,92,26,8
COMBOBOX IDC_RECORD_SCALING,65,91,26,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OEMCONVERT | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "16:9:",IDC_RECORD_ASPECT_RATIO,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,94,92,30,10
RTEXT "Format:",IDC_STATIC,36,110,26,8
COMBOBOX IDC_RECORD_FORMAT,65,109,60,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OEMCONVERT | WS_VSCROLL | WS_TABSTOP
LTEXT "Frame Rate:",IDC_STATIC,134,92,44,8,NOT WS_VISIBLE
COMBOBOX IDC_RECORD_FRAME_RATE,177,91,42,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OEMCONVERT | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
RTEXT "Scaling:",IDC_STATIC,36,90,26,8
COMBOBOX IDC_RECORD_SCALING,65,89,26,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OEMCONVERT | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "16:9:",IDC_RECORD_ASPECT_RATIO,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,94,90,30,10
RTEXT "Format:",IDC_STATIC,36,106,26,8
COMBOBOX IDC_RECORD_FORMAT,65,105,60,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OEMCONVERT | WS_VSCROLL | WS_TABSTOP
LTEXT "Frame Rate:",IDC_STATIC,134,90,44,8,NOT WS_VISIBLE
COMBOBOX IDC_RECORD_FRAME_RATE,177,89,42,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OEMCONVERT | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
LTEXT "To crop the portion of the screen that will be recorded, enter the hotkey with the Shift key in the opposite mode. ",IDC_STATIC,7,29,258,18
LTEXT "To record a specific window, enter the hotkey with the Alt key in the opposite mode.",IDC_STATIC,7,51,266,19
CONTROL "Capture &system audio:",IDC_CAPTURE_SYSTEM_AUDIO,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,7,128,90,10
CONTROL "&Capture audio input:",IDC_CAPTURE_AUDIO,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,11,146,86,10
CONTROL "Mono:",IDC_MIC_MONO_MIX,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,108,160,48,10
COMBOBOX IDC_MICROPHONE,68,175,205,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Microphone:",IDC_MICROPHONE_LABEL,25,176,42,8
CONTROL "&Noise cancellation:",IDC_NOISE_CANCELLATION,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,25,160,72,10
CONTROL "Capture &system audio:",IDC_CAPTURE_SYSTEM_AUDIO,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_LEFT | WS_TABSTOP,7,122,90,10
CONTROL "&Capture audio input:",IDC_CAPTURE_AUDIO,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_LEFT | WS_TABSTOP,7,138,90,10
CONTROL "Mono:",IDC_MIC_MONO_MIX,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,108,154,48,10
COMBOBOX IDC_MICROPHONE,68,169,205,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Microphone:",IDC_MICROPHONE_LABEL,25,170,42,8
CONTROL "&Noise cancellation:",IDC_NOISE_CANCELLATION,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,25,154,72,10
CONTROL "Show &webcam overlay (Ctrl+C toggles)",IDC_WEBCAM_OVERLAY,
"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,7,194,148,10
PUSHBUTTON "Webcam S&ettings...",IDC_WEBCAM_SETTINGS,177,193,68,14
"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,7,186,148,10
PUSHBUTTON "Webcam S&ettings...",IDC_WEBCAM_SETTINGS,177,185,68,14
PUSHBUTTON "&Trim",IDC_TRIM_FILE,220,213,53,14
END

Expand Down