Skip to content

Add explicit Windows WASAPI input AEC support#2

Merged
louis030195 merged 1 commit into
screenpipe:mainfrom
divanshu-go:windows-aec
May 15, 2026
Merged

Add explicit Windows WASAPI input AEC support#2
louis030195 merged 1 commit into
screenpipe:mainfrom
divanshu-go:windows-aec

Conversation

@divanshu-go
Copy link
Copy Markdown
Contributor

Summary

Adds an explicit Windows-only StreamConfig::windows_input_aec flag that lets callers request endpoint Acoustic Echo Cancellation for WASAPI input streams.

When enabled for a capture endpoint, the WASAPI backend:

  • sets the stream category to AudioCategory_Communications before IAudioClient::Initialize
  • initializes the input stream normally
  • requests IAcousticEchoCancellationControl
  • passes the default communications render endpoint ID as the AEC reference, falling back to the console render endpoint

Unsupported devices continue recording normally; AEC setup is fail-open.

Details

  • Defaults the flag to false from SupportedStreamConfig::config().

  • Applies AEC only when the stream is a WASAPI capture/input endpoint.

  • Keeps output/loopback/system-audio capture behavior unchanged.

Testing

cargo run  --example record_wav_aec -- --duration-secs 10 --output aec-recorded.wav

@louis030195 louis030195 merged commit 01b68e6 into screenpipe:main May 15, 2026
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants