• 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: Custom AU Data (unseen by user, stored by host)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom AU Data (unseen by user, stored by host)


  • Subject: Re: Custom AU Data (unseen by user, stored by host)
  • From: William Stewart <email@hidden>
  • Date: Tue, 7 Nov 2006 11:51:53 -0800


On 07/11/2006, at 8:50 AM, Izhaki wrote:

Hi all,

I might be overlooking something, but even after going through the SDK and various internet resources I couldn't quite understand what is the right way to go about the following issue:

There are more than a few instances where the host application should store and restore a plug-in data (ie, parameters/properties) which is not visible for the user. Sometimes this data cannot be expressed using a determined amount of Float32. A few examples would be a sample name on a sampler, a control that only defines the behavior of other controls in the UI (say button latch), or some linked list which hasn't got a determined size (say, a dynamic version of a multitap delay implementation).

So what is the right way to implement such a behavior in an AU plug- in? My current guess would be kAudioUnitMigrateProperty_FromPlugin, but there is very little documentation on it, which leaves me unsure.

No - you define SaveState and RestoreState methods in your AU's class. They then call AUBase's implementation of these. After these methods have succeeded AUBase has either created a dictionary (SaveState), or has read the standard contents out of the dictionary it was given (RestoreState).


Then, your AU can add some additional key-value pairs to store custom state. Keys must be strings and should contain at least one non-lower case character (to avoid conflicts with any keys we might define in the future). Values must be some kind of CFPropertyListRef - so these can be strings, numbers, a raw data block, a dictionary, an array, etc...

You can use AUBase's save/restore methods to provide a template for how to add or read your custom key-values

MyAU::SaveState (...)
{
	AUBase::SaveState (...)
//then do more stuff
}

Bill


Thanks for your help, Izhaki _______________________________________________ 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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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


References: 
 >Custom AU Data (unseen by user, stored by host) (From: Izhaki <email@hidden>)

  • Prev by Date: Re: AUGraphGetNodeInfo returning nil AudioUnit, but no error?
  • Next by Date: Re: subGraphs
  • Previous by thread: Custom AU Data (unseen by user, stored by host)
  • Next by thread: subGraphs
  • Index(es):
    • Date
    • Thread