feat: Windows support — WASAPI system audio loopback capture#1
Open
stjiao14 wants to merge 6 commits into
Open
feat: Windows support — WASAPI system audio loopback capture#1stjiao14 wants to merge 6 commits into
stjiao14 wants to merge 6 commits into
Conversation
Updated microphone capture documentation and added platform-specific permission handling for macOS. Enhanced the mic stream setup process to ensure permissions are granted before opening the stream.
… loopback module to WASAPI backend on Windows
Implement system audio loopback capture on Windows using WASAPI. Provides public API methods to start, drain, and stop audio capture.
Implement macOS calendar event fetching using EventKit and add tests for CalendarEvent serialization.
…is bundle target and Windows bundle config
Author
|
@sufforest PTAL |
sufforest
reviewed
Mar 16, 2026
| "nsis": {} | ||
| } | ||
| } | ||
| }{ |
sufforest
reviewed
Mar 16, 2026
| out[i] += s * 0.6; | ||
| } | ||
| out | ||
| }//! Audio capture pipeline — mic (cpal) + system loopback (ScreenCaptureKit). |
Owner
There was a problem hiding this comment.
This diff prepended new code to the old file
sufforest
reviewed
Mar 16, 2026
|
|
||
| # Windows: WASAPI for system audio loopback | ||
| [target.'cfg(target_os = "windows")'.dependencies] | ||
| windows = { version = "0.58", features = [ |
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.
What
This PR adds Windows support to Aura by implementing system audio loopback capture via WASAPI, mirroring the existing macOS ScreenCaptureKit backend.
Changes
src-tauri/Cargo.tomlwindowscrate (WASAPI Win32 APIs) undercfg(windows)src-tauri/src/audio/loopback_windows.rsAUDCLNT_STREAMFLAGS_LOOPBACK, pollsGetBufferin a background thread, converts PCM→f32src-tauri/src/audio/mod.rsloopbackmodule via#[path]:loopback.rson macOS,loopback_windows.rson Windowssrc-tauri/src/audio/mic.rsensure_mic_permission()for non-macOS — WASAPI prompts automaticallysrc-tauri/src/calendar/mod.rslist_upcoming_events()for non-macOSsrc-tauri/tauri.conf.jsonnsisbundle target for Windows installerHow it works
WASAPI loopback taps the default render device — no special permission needed. A background thread calls
GetBufferevery 10 ms, converts the device’s native PCM (f32 or i16) tof32, and stores it in aMutex<Vec<f32>>consumed bydrain()/stop().Testing
Live: start any meeting (Zoom, Teams, Meet), click Record, verify transcript.