• 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
Re: Enumerating Airplay devices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enumerating Airplay devices


  • Subject: Re: Enumerating Airplay devices
  • From: Lorenzo Thurman <email@hidden>
  • Date: Wed, 09 Apr 2014 19:23:21 -0500

Outstanding! Thanks guys, I really appreciate this.


On Apr 9, 2014, at 2:00 PM, email@hidden wrote:
Perhaps this helps: http://joris.kluivers.nl/blog/2012/07/25/per-application-airplay-in-mountain-lion/
Demo app at: https://bitbucket.org/kluivers/airplaystreaming



I have this working in my app.

First get the available data sources for the audio device:

int getDataSourceIDs(bool input, Array <OSType>& dataSourceIDs)
{
if (deviceID != 0)
{
AudioObjectPropertyAddress pa;
pa.mSelector = kAudioDevicePropertyDataSources;
pa.mScope = ((input == true) ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput);
pa.mElement = kAudioObjectPropertyElementMaster;
UInt32 size = 0;

if ( OK(AudioObjectGetPropertyDataSize (deviceID, &pa, 0, 0, &size)))
{
HeapBlock<OSType> sources;
sources.calloc (size, 1);

if ( OK(AudioObjectGetPropertyData (deviceID, &pa, 0, 0, &size, sources)))
{
int num = size / (int) sizeof (OSType);

for(int i=0; i < num; i++)
dataSourceIDs.add(sources[i]);

return num;
}
}
}

return 0;
}

 _______________________________________________
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: Enumerating Airplay devices
  • Next by Date: OS X NSPasteBoard and Wave data
  • Previous by thread: Re: Enumerating Airplay devices
  • Next by thread: DJStudio Build
  • Index(es):
    • Date
    • Thread