CoreAudio can no longer enumerate AirPlay devices

Originator:cmsj
Number:rdar://23049205 Date Originated:2015-10-09
Status:Duplicate of 23089643 Resolved:2015-10-16
Product:OS X SDK Product Version:10.11
Classification: Reproducible:Always
 
Summary:
In 10.10 and earlier, something like:
    AudioObjectPropertyAddress propertyAddress = {
        kAudioHardwarePropertyDevices,
        kAudioObjectPropertyScopeWildcard,
        kAudioObjectPropertyElementWildcard
    };
could be used with AudioObjectGetPropertyData to enumerate all of the connected audio devices, and it would include a device named "AirPlay" which had data sources corresponding to each AirPlay device present on the user's network.

In 10.11 this no longer seems to be possible - the AirPlay device does not show up in the list, and even if an AudioDeviceID reference to it is created using kAudioHardwarePropertyTranslateUIDToDevice with a UID of "AirPlay", no data sources exist, and the device does not seem to be capable of being used in any meaningful way.

From some light investigation of what the AppleVolumeExtra menu extra is doing to obtain a list of AirPlay endpoints for system audio, it seems as though it is using AVFoundation to obtain information about available output devices, but it doesn't seem to be public API.

Could we please return to having public API for this, it would be useful for apps that want to do fun audio things with AirPlay that fall outside AVPlayer. It would also be useful for utility apps that want to be able to let users configure audio devices (including, it should be noted, Apple's Audio MIDI Setup.app, which can no longer inspect/control AirPlay devices).

Steps to Reproduce:
N/A

Expected Results:
N/A

Actual Results:
N/A

Version:
OS X 10.11

Notes:


Configuration:


Attachments:

Comments

Not a solution, but...

Letting the System Preferences > Sound pane opened during your sample code execution correctly lists the airplay devices! So the old code still works, but only if users let their System Preferences > Sound pane opened in the background. It is the solution I give to my users when they contact me for support... Nice one Apple...

Unfortunately that "hack" does not work anymore with 10.12


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!