Re: Destroying an Aggregate device (via code)
Re: Destroying an Aggregate device (via code)
- Subject: Re: Destroying an Aggregate device (via code)
- From: Neil Clayton <email@hidden>
- Date: Tue, 11 Jul 2006 14:24:03 +1200
Thanks Jeff,
That worked perfectly.
On 11/07/2006, at 1:01 PM, Jeff Moore wrote:
Basically, you aren't passing the arguments to
AudioObjectGetPropertyData() correctly. As you have found,
kAudioPlugInDestroyAggregateDevice takes the AudioObjectID of the
aggregate to be destroyed. You are correctly trying to pass that
info to AudioObjectGetPropertyData(). Unfortunately, your mistake
is that you are passing it in the qualifier arguments rather than
the data arguments. Here's the change you need to make:
- (void) destroyAggregate:(AudioObjectID)aggregateID {
OSStatus err
AudioObjectPropertyAddress theAddress;
theAddress.mSelector = kAudioPlugInDestroyAggregateDevice;
theAddress.mScope = kAudioObjectPropertyScopeGlobal;
theAddress.mElement = kAudioObjectPropertyElementMaster;
AudioDeviceID theID = [self basePlugin];
UInt32 theSize = sizeof(AudioObjectID);
BAILSETERR( AudioObjectGetPropertyData(theID, &theAddress, 0,
NULL, &theSize, &aggregateID) );
bail:
if(err) {
[NSException raise:@"DestroyAggregate" format:@"Unable to destroy
aggregate device %i, error %d", aggregateID, err];
}
}
_______________________________________________
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