Destroying an Aggregate device (via code)
Destroying an Aggregate device (via code)
- Subject: Destroying an Aggregate device (via code)
- From: Neil Clayton <email@hidden>
- Date: Tue, 11 Jul 2006 12:46:56 +1200
Hi,
I've been looking at old posts from Jeff Moore and Christopher
Teschner in order to work out how to programmatically create and
destroy an aggregate device.
I've managed to get it working, but I am unable to remove the
aggregate after I've created it. This could be because I've never
used the API before, so I'm simply passing in the wrong parameters.
The docs (in the headers) say that I should pass in the AudioObjectID
of the created aggregate, which I'm doing as follows:
- (void) destroyAggregate:(AudioObjectID)aggregateID {
OSStatus err;
AudioObjectPropertyAddress theAddress;
theAddress.mSelector = kAudioPlugInDestroyAggregateDevice;
theAddress.mScope = kAudioObjectPropertyScopeGlobal;
theAddress.mElement = kAudioObjectPropertyElementMaster;
AudioDeviceID theID = [self basePlugin];
BAILSETERR( AudioObjectGetPropertyData(theID, &theAddress, sizeof
(AudioObjectID), &aggregateID, nil, nil) );
bail:
if(err) {
[NSException raise:@"DestroyAggregate" format:@"Unable to destroy
aggregate device %i, error %d", aggregateID, err];
}
}
I've verified that variable 'theID' points to the same thing when
creating and during this method. I figure I've just done something
stupid in the call to AudioObjectGetPropertyData. Can someone put
me right?
Neil
_______________________________________________
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