Skip to content

mac-capture: Fix incorrect enum comparison #12035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcm93
Copy link
Contributor

@jcm93 jcm93 commented Apr 7, 2025

Description

macOS Audio Capture was using the incorrect capture type enum member to check the capture method on initialization. Because the default was zero, and because the incorrect enum would typically be zero-initialized anyway, this went unnoticed. The correct member enum is being used everywhere else in macOS Audio Capture.

Motivation and Context

AppleClang in Xcode 16.3 flags this as a non-matching enum type in the comparison, breaking the build. For some reason earlier AppleClang in earlier SDKs did not flag this as a warning.

Fixes #12034.

How Has This Been Tested?

Verified the build now works locally with Xcode 16.3 and that macOS Audio Capture still works as intended.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added the Bug Fix Non-breaking change which fixes an issue label Apr 11, 2025
@tytan652 tytan652 mentioned this pull request Apr 18, 2025
6 tasks
@WizardCM WizardCM linked an issue Apr 18, 2025 that may be closed by this pull request
@RytoEX RytoEX requested a review from PatTheMav April 24, 2025 19:57
@RytoEX RytoEX self-assigned this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

latest OBS doesn't compile in MacOs
3 participants