Re: Adjust the volume of individual airplay devices
Re: Adjust the volume of individual airplay devices
- Subject: Re: Adjust the volume of individual airplay devices
- From: Jeff Moore <email@hidden>
- Date: Thu, 30 May 2013 11:48:34 -0700
The currently selected item of a data source selector control is the value returned by the property, kAudioDevicePropertyDataSource. In the AirPlay device's case, this data source control only supports selecting one device at a time. So there is no way to address multiple AirPlay endpoints simultaneously.
The obvious work around is to iterate through the selector control's items, setting each as the current value in turn, and then setting the volume.
--
Jeff Moore
Core Audio
Apple
On May 30, 2013, at 11:39 AM, Patrick Dehne <email@hidden> wrote:
> Sorry for not describing exactly what I am trying to achieve but english is not my native language. I hope some source code will make it clearer:
>
> void selectDataSourcesForOutput(const Array<OSType>& dataSourcesToSelect)
> {
> if (deviceID != 0)
> {
> if(dataSourcesToSelect.size() > 0)
> {
> HeapBlock <OSType> dataSourcesToSelectMemory;
> dataSourcesToSelectMemory.calloc(dataSourcesToSelect.size());
>
> for(int i=0; i<dataSourcesToSelect.size(); i++)
> dataSourcesToSelectMemory[i] = dataSourcesToSelect[i];
>
> AudioObjectPropertyAddress pa;
> pa.mSelector = kAudioDevicePropertyDataSource;
> pa.mScope = kAudioDevicePropertyScopeOutput;
> pa.mElement = kAudioObjectPropertyElementMaster;
>
> AudioObjectSetPropertyData (deviceID, &pa, 0, 0, sizeof(OSType) * dataSourcesToSelect.size(), dataSourcesToSelectMemory);
> }
> }
> }
>
> If dataSourcesToSelect has more than one entry multiple data sources are selected and are playing audio. But which one is the currently selected item? Probably both.
_______________________________________________
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