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

Don't call AudioObjectGetPropertyData again if CFStringGetCStringPtr fails #558

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

Conversation

micolous
Copy link

@micolous micolous commented Mar 18, 2021

There's no indication that CFStringGetCStringPtr failing is destructive for the CFString:

https://developer.apple.com/documentation/corefoundation/1542133-cfstringgetcstringptr

So calling AudioObjectGetPropertyData a second time to get the device name isn't necessary.

It looks like this was an unintentional error in #399, but I don't have a wide-character install of macOS to try this against (to check that it doesn't regress #398).

cc @thavlik

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