• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Destroying an Aggregate device (via code)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Destroying an Aggregate device (via code)


  • Subject: Re: Destroying an Aggregate device (via code)
  • From: Jeff Moore <email@hidden>
  • Date: Mon, 10 Jul 2006 18:01:08 -0700

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];
}
}


On Jul 10, 2006, at 5:46 PM, Neil Clayton wrote:

- (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?


--

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
  • Follow-Ups:
    • Re: Destroying an Aggregate device (via code)
      • From: Neil Clayton <email@hidden>
References: 
 >Destroying an Aggregate device (via code) (From: Neil Clayton <email@hidden>)

  • Prev by Date: Destroying an Aggregate device (via code)
  • Next by Date: Re: split multi-channel bus to multiple mono buses
  • Previous by thread: Destroying an Aggregate device (via code)
  • Next by thread: Re: Destroying an Aggregate device (via code)
  • Index(es):
    • Date
    • Thread