Skip to content

feat(audio): native Core Audio backend behind a config flag (#91) - #97

Merged
lippdev merged 1 commit into
mainfrom
feat/native-audio
Sep 28, 2026
Merged

lippdev merged 1 commit into
mainfrom
feat/native-audio

Conversation

@lippdev

@lippdev lippdev commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Summary

First step of #91: replaces SoundVolumeView with Windows Core Audio for everything audio does today.

Before (SoundVolumeView) Now (native)
/scomma CSV listing IMMDeviceEnumerator (active, disabled, unplugged outputs)
/SetDefault … all IPolicyConfig::SetDefaultEndpoint for console, multimedia and communications
/Enable IPolicyConfig::SetEndpointVisibility
/GetPercent, /SetVolume, /Mute, /Unmute IAudioEndpointVolume
  • Off by default. "NativeAudio": true in config.json turns it on; the log shows audio=native. Nothing changes for users until this is verified on hardware.
  • Same IDs. The native backend builds SoundVolumeView's friendly ID ({adapter}\Device\{endpoint}\Render), so the saved output and the restore backup work with either backend. The naming lives in AudioNaming (pure, tested).
  • The session menu volume now goes through AudioService instead of calling SoundVolumeView directly.
  • The settings screen rebuilds the config on save; it now keeps the new flag.

Not verified yet

Written on macOS. CI builds it on Windows, but none of it has run on a real PC. The manual checklist is in docs/TESTING.md ("Áudio nativo"). Kept as a draft until it passes.

Main risk: if the adapter/endpoint names Windows reports differ from what SoundVolumeView printed for some device, its saved ID won't match and that one output shows as not found. The checklist's second item covers it.

🤖 Generated with Claude Code

First step of replacing the bundled NirSoft tools: audio outputs are listed,
switched, enabled and their volume/mute set through Core Audio (MMDevice API,
IPolicyConfig, IAudioEndpointVolume) instead of SoundVolumeView.

- Off by default: "NativeAudio": true in config.json turns it on, so nothing
  changes for users until it is verified on real hardware.
- Both backends produce SoundVolumeView's friendly ID, so the saved output and
  the restore backup keep working when switching either way (AudioNaming, tested).
- Session menu volume goes through AudioService instead of calling SoundVolumeView.
- Settings rebuild keeps the flag; manual checklist in docs/TESTING.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@lippdev
lippdev marked this pull request as ready for review September 28, 2026 13:31
@lippdev
lippdev merged commit 956982e into main Sep 28, 2026
4 checks passed

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Native backend — Reviewed the Core Audio COM interop for endpoint enumeration, switching, visibility, volume, and mute.
  • Backend integration — Reviewed config flag loading and saving, device ID mapping, restore and auto-switch paths, and the session volume controls.
  • Verification — Reviewed the manual hardware checklist and pure naming tests.

Pullfrog  | View workflow run | Using GPT Luna | 𝕏

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.

1 participant