Re: Trouble setting sub device list, with a private aggregate device
Re: Trouble setting sub device list, with a private aggregate device
- Subject: Re: Trouble setting sub device list, with a private aggregate device
- From: Jeff Moore <email@hidden>
- Date: Tue, 11 Jul 2006 11:20:51 -0700
HAL error codes are easier to read if you look at them as 4CCs. In
this case, 560947818 == '!obj' == kAudioHardwareBadObjectError. This
error is only ever returned when the AudioObjectID you pass to an API
call is invalid.
On Jul 10, 2006, at 10:17 PM, Neil Clayton wrote:
As I understand it (from reading previous posts) all I need to do
in order to make an aggregate device private, is the following:
NSMutableDictionary *newDictionary = [NSMutableDictionary new];
[newDictionary setObject:@"iShowUMonitoring-Aggregate"
forKey:@"uid"];
[newDictionary setObject:@"iShowUMonitoring-Aggregate"
forKey:@"name"];
[newDictionary setObject:[NSNumber numberWithInt:1]
forKey:@"private"];
Then, when the device is created, it's not made available to
anything other than the process that created it - but otherwise
it's the same device.
When private, the device appears to be created properly (I get the
same deviceID back, as I would otherwise...).
When I try to set the Full Sub Device List, I get an error
560947818 from the AudioObjectSetPropertyData call.
The code that's performing the set is:
MTCoreAudioDevice *defaultOutput = [MTCoreAudioDevice
defaultOutputDevice];
NSMutableArray *myDeviceList = [NSMutableArray new];
[myDeviceList addObject:[defaultOutput deviceUID]];
[myDeviceList addObject:[sourceDevice deviceUID]];
theAddress.mSelector =
kAudioAggregateDevicePropertyFullSubDeviceList;
theAddress.mScope = kAudioObjectPropertyScopeGlobal;
theAddress.mElement = kAudioObjectPropertyElementMaster;
BAILSETERR( AudioObjectSetPropertyData(aggregate, &theAddress, 0,
NULL, sizeof(CFArrayRef), &myDeviceList) );
This works find if the device is public.
Is there something else I'm missing or is this a bug?
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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