Re: Filing of User Presets
Re: Filing of User Presets
- Subject: Re: Filing of User Presets
- From: Alberto Ricci <email@hidden>
- Date: Wed, 23 Oct 2002 20:02:14 +0200
What about having the AU handle this?
I mean, if you simply place XML files representing presets in
~/Library/Audio, your application won't know which AU they belong to,
unless additional tags are saved along with the file.
And I don't think it's a good idea to add this metadata to the
filename, such as in "Alberto's AudioUnits-Reverb-MyPreset.xml".
I am thinking about the pros and cons to this as I type, but an
alternative might be having the AU save its own presets in any way it
wants.
Of course, there would be a recommended place to save the presets -
for instance, inside an XML preferences file in
~/Library/Preferences/. After all, presets are comparable to
preferences, right?
There could be an AU property used to set and get stored presets.
The base classes could provide default behavior and AU developers
would rarely need to override this behavior unless they wish to store
additional data along with the presets.
What if you want to email a preset to a friend? AU hosts or other
utilities could "extract" the relevant dictionary from an AudioUnit's
preferences file and save it as a separate XML file where the user
wants it.
This export/import process can be done through the same AU properties
discussed above, once the host or utility has opened the AU component.
Actually, AUs could override the default behavior for the
kAudioUnitProperty_FactoryPresets property so that it reads stored
presets from a preferences file. If a preferences file does not exist
yet, then the factory presets (actual factory presets) are written to
such a file and then passed to the host application.
When setting the property, the AU would update its preferences file.
What do you think about this? Does it make sense?
Alberto.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.