Skip to content

fix(macOS): enable microphone permission flow - #5621

Open
ReenigneArcher wants to merge 1 commit into
masterfrom
ra/fix/macos-audio-permission
Open

fix(macOS): enable microphone permission flow#5621
ReenigneArcher wants to merge 1 commit into
masterfrom
ra/fix/macos-audio-permission

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Adds macOS microphone authorization checks before opening the capture device, requests access when still undetermined, and logs clear permission errors. It also signs the app with the required audio-input entitlement and adds unit coverage for authorized, denied, restricted, and undetermined permission states.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Adds macOS microphone authorization checks before opening the capture device, requests access when still undetermined, and logs clear permission errors. It also signs the app with the required audio-input entitlement and adds unit coverage for authorized, denied, restricted, and undetermined permission states.
@sonarqubecloud

sonarqubecloud Bot commented Sep 5, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.58824% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.30%. Comparing base (53bc71b) to head (6e4c849).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/macos/av_audio.mm 74.19% 8 Missing ⚠️
src/platform/macos/microphone.mm 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5621      +/-   ##
==========================================
+ Coverage   37.26%   37.30%   +0.04%     
==========================================
  Files         104      104              
  Lines       25880    25914      +34     
  Branches    11423    11430       +7     
==========================================
+ Hits         9644     9668      +24     
- Misses      13397    14219     +822     
+ Partials     2839     2027     -812     
Flag Coverage Δ
Archlinux 20.90% <ø> (ø)
FreeBSD-amd64 23.24% <ø> (+0.01%) ⬆️
Homebrew-macos-14 36.34% <67.64%> (+0.09%) ⬆️
Homebrew-macos-15 36.90% <67.64%> (+0.08%) ⬆️
Homebrew-macos-26 37.21% <67.64%> (+0.08%) ⬆️
Homebrew-ubuntu-24.04 24.90% <ø> (ø)
Linux-AppImage 24.33% <ø> (ø)
Windows-AMD64 30.03% <ø> (ø)
Windows-ARM64 25.18% <ø> (ø)
macOS-arm64 30.67% <66.66%> (+0.07%) ⬆️
macOS-x86_64 31.29% <66.66%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/macos/microphone.mm 74.68% <33.33%> (-1.64%) ⬇️
src/platform/macos/av_audio.mm 79.27% <74.19%> (-0.29%) ⬇️

... and 25 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53bc71b...6e4c849. Read the comment docs.

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.

macOS: Sunshine.app does not request microphone permission when running as standalone app, causing no audio in Moonlight

1 participant