Skip to content

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

@nico-franco-gomez
Copy link
Contributor

I tested this and seems to be right. Maybe it could get merged? It's a minor thing, but it would be nice!

@wgibbs-rs
Copy link
Member

No part of this code (that I could find) is still present in /macos/mod.rs, and does not merge without conflicts. I strongly recommend closing this PR without merging.

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.

3 participants