CoreAudio -- so much is deprecated

I currently have a snippet of C code that queries CoreAudio on macOS for all of its outputs. Essentially, it makes a one call to each of AudioHardwareGetPropertyInfo() and AudioHardwareGetProperty() and then a set of iterative calls to AudioDeviceGetProperty(), AudioDeviceGetPropertyInfo().


My result is a set of appropriate AudioDevicePropertyDeviceUID values, provided by CoreAudio, that I can attach to a given AVPlayer:

https://developer.apple.com/documentation/avfoundation/avplayer/1390717-audiooutputdeviceuniqueid


My issue is this: I'm getting a whole slew of "deprecated in 10.6" warnings with those functions, and I don't see any replacements. Are these forthcoming?


Looking at the docs, all I see is a whole host of "No overview available" notations on anything that could prove potentially useful. In the words of one, the move from AudioDeviceGetProperty() --> AudioObjectGetPropertyData() "seems a little underspecified".

Post not yet marked as solved Up vote post of B_Payan Down vote post of B_Payan
1.9k views

Replies

Do you sleep ???


If any function or property are deprecated - apple announce it in the reference file, too...


If you do not knowing if any procedure are depricated, read the .h files comments...

I think the documentation you are looking for is this:
https://developer.apple.com/library/content/technotes/tn2223/_index.html


In either case, I think for the functions you mention, you are supposed to use the AudioObjectGetXxxx() functions instead of the AudioHardware/Device versions.


HTH

/Jesper