0
Under review

AirPlay and OS X Yosemite

Anonymous 9 years ago updated by properVOLUME 9 years ago 3
Running Yosemite changing Output from Airplay to something else removes that AirPlay device from the list of available AirPlay devices. Restarting the Mac helps getting it back. But since I listen often on one of my three AirPlay devices, its really really annoying.
Also I'd like to promote http://propervolume.userecho.com/topic/156214-doesnt-show-airplay-devices/ since, as said, I have three devices connected over Airplay.
Maybe you'll find a hint digging thro this: https://github.com/nriley/SoundSource or this ./SoundSource-250.zip since they were able to show the individual devices since 10.5. Unfortunately it's broken since 10.9 :-/
+1
Under review
Thanks for the github link. I will definitely dig through that source and see if I can see how they are differentiating AirPlay devices.
Thank you!
Might be this function: (SoundSource / src / SSAudioDeviceCenter.m : 65)

- (NSString*)name
{
	OSStatus err;
	UInt32 size;
	NSString* deviceName = nil;
	NSString* sourceName = nil;
	{
		size = sizeof(deviceName);
		err = AudioDeviceGetProperty( [self coreAudioDeviceID], 0, [self coreAudioIsInput], kAudioDevicePropertyDeviceNameCFString, &size, &deviceName);
		if( err  )
			deviceName = nil;
	}
	if( _sourceType != 0 )
	{
		AudioValueTranslation trans;
		trans.mInputData		= &_sourceType;
		trans.mInputDataSize	= sizeof(_sourceType);
		trans.mOutputData		= &sourceName;
		trans.mOutputDataSize	= sizeof(sourceName);
		size = sizeof(AudioValueTranslation);
		err = AudioDeviceGetProperty( [self coreAudioDeviceID] , 0, [self coreAudioIsInput], kAudioDevicePropertyDataSourceNameForIDCFString, &size, &trans);
		if( err )
			sourceName = nil;
	}
    // If AirPlay or >1 source on device, use DeviceName: SourceName (doesn't match Sound prefpane, but is much easier to understand)
	if( ( sourceName && ![sourceName isEqual: deviceName] ) &&
        (
          ( !AudioDeviceGetPropertyInfo([self coreAudioDeviceID], 0, [self coreAudioIsInput], kAudioDevicePropertyDataSources, &size, NULL) && ( size > sizeof(UInt32) )
          ) || ( [self coreAudioTransportType] == kAudioDeviceTransportTypeAirPlay )
        )
      )
    {
        return [NSString stringWithFormat: @"%@: %@", deviceName, sourceName];
	}
	return sourceName ? sourceName : deviceName;
}
Wow, thanks for digging through that code! I agree, that looks like a useful snippet. I'll have to see whether the code we are using in properVOLUME is addressing the audio devices through the same API that they are using. Apple, in all it's darwin / carbon / cocoa wisdom, has many different API's and levels of abstraction for talking to audio and video devices.

I can't make any promises about when we'll be able to incorporate this, but it is definitely at the top of my to-do list for properVOLUME.