Skip to content
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

mac: Fix building on macOS 14. #296

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

Conversation

harukasan
Copy link

When I built on macOS 14, the following error occurred. This error is a recurrence of the issue fixed in #280.

/Users/harukasan/works/src/github.com/andrewrk/libsoundio/src/coreaudio.c:26:9: error: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Werror,-Wdeprecated-declarations]
        kAudioObjectPropertyElementMain
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        kAudioObjectPropertyElementMain
/Users/harukasan/works/src/github.com/andrewrk/libsoundio/src/coreaudio.c:16:41: note: expanded from macro 'kAudioObjectPropertyElementMain'
#define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster
                                        ^

MAC_OS_VERSION_12_0 is not defined in macOS 14. Therefore, I fixed the version check to use MAC_OS_X_VERSION_MIN_REQUIRED.

I only have a macOS 14 environment, so I cannot test on earlier versions.
Please verify that there are no issues in older environments before merging.

MAC_OS_VERSION_12_0 is not defined in macOS 14.
The fix uses MAC_OS_X_VERSION_MIN_REQUIRED for version checks.
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