• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Simultaneous streaming to multiple AirPlay endpoints
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simultaneous streaming to multiple AirPlay endpoints


  • Subject: Simultaneous streaming to multiple AirPlay endpoints
  • From: Lorenzo Thurman <email@hidden>
  • Date: Fri, 24 Oct 2014 10:59:11 -0500

Although I never needed to try it, at some point in the past, I believe this was possible (at least I’ve read posts about it. For example, http://bit.ly/1xhJ2vF). Somewhere in the last couple of revs of MacOS, this stopped working, it seems. So, is it possible to stream to multiple sources simultaneously, in a supported fashion? Here is some code I’ve tried. Sound only comes from the device  listed first in the array:

OSStatus err = 0;
UInt32 size = sizeof(UInt32);

SSAudioSource * targetSource =  airplayDevice.airplaySources;
AudioDeviceID airPlayDeviceID = targetSource.deviceID;
    SSAudioSource * source1 = airplayDevice.airplaySources[0];
    SSAudioSource * source2 = airplayDevice.airplaySources[1];
    SSAudioSource * source3 = airplayDevice.airplaySources[2];

    AudioDeviceID alldevices[] = {source3.sourceID, source2.sourceID, source1.sourceID}; // only source3 will play
AudioObjectPropertyAddress addr;
addr.mSelector = kAudioDevicePropertyDataSource;
addr.mScope = kAudioDevicePropertyScopeOutput;
addr.mElement = kAudioObjectPropertyElementMaster;

// Set the 'AirPlay' device to point to all of its sources...
err = AudioObjectSetPropertyData(airPlayDeviceID, &addr, 0, nil, size, alldevices);

AudioObjectPropertyAddress audioDevicesAddress = {
    kAudioHardwarePropertyDefaultOutputDevice,
    kAudioObjectPropertyScopeGlobal,
    kAudioObjectPropertyElementMaster
};

// ...now set the system output to point at the 'AirPlay' device
err = AudioObjectSetPropertyData(kAudioObjectSystemObject, &audioDevicesAddress, 0, nil, size, &airPlayDeviceID);


Any info greatly appreciated.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: Fade In/Out AUFilePlayer?
  • Next by Date: Unable to load Audio Unit in Garage Band
  • Previous by thread: Transfer sound from build-in MIC to a USB external accessory device
  • Next by thread: Unable to load Audio Unit in Garage Band
  • Index(es):
    • Date
    • Thread