• 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: ignore plugin ID of preset file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ignore plugin ID of preset file?


  • Subject: Re: ignore plugin ID of preset file?
  • From: Paul Davis <email@hidden>
  • Date: Sun, 03 Apr 2011 19:08:35 -0400

On Sun, Apr 3, 2011 at 2:55 PM, Artemiy Pavlov
<email@hidden> wrote:
> Thanks for the reply, Tahome!
>
> But what about the .preset files saved by all AU hosts? How can I read them? The data there seems to be encoded somehow. Haven't found any documentation on this.

i had to figure this all out for ardour. i'm reluctant to point people
at the source code because i understand that most of you are not
working on GPL'ed source, but you can always find it if you want to
honor the license. however, the basic concepts are pretty easy (and i
got them from the source code in Apple's own utility libs (which now
appear to be deprecated in newer versions of OS X) and the
DFX/Smartelectronix AU utility libs

1) getting/setting presets

OSStatus	CAAudioUnit::GetAUPreset (CFPropertyListRef &outData) const
{
	UInt32 dataSize = sizeof(outData);
	return AudioUnitGetProperty (AU(), kAudioUnitProperty_ClassInfo,
								kAudioUnitScope_Global, 0,
								&outData, &dataSize);
}

OSStatus	CAAudioUnit::SetAUPreset (CFPropertyListRef &inData)
{
	return AudioUnitSetProperty (AU(), kAudioUnitProperty_ClassInfo,
								kAudioUnitScope_Global, 0,
								&inData, sizeof (CFPropertyListRef));
}


2) read/write to/from disk

to disk: convert to XML with  CFPropertyListCreateXMLData, write xml
data to disk
from disk: read data, call  CFDataCreateWithBytesNoCopy, convert to
property list with CFPropertyListCreateFromXMLData

files end in ".aupreset" and are stored in a heirarchy of
"manufacturer/plugin_name" under a few standard locations.

the DFX/Smartelectronix libs have some very useful code to extract and
set preset names and lots more besides.

and yes, this is all very poorly documented, almost as if Apple could
not care less if there were any non-apple AU hosts :)

--p
 _______________________________________________
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: 
 >ignore plugin ID of preset file? (From: Artemiy Pavlov <email@hidden>)
 >Re: ignore plugin ID of preset file? (From: Stephen Blinkhorn <email@hidden>)
 >Re: ignore plugin ID of preset file? (From: Artemiy Pavlov <email@hidden>)
 >Re: ignore plugin ID of preset file? (From: tahome izwah <email@hidden>)
 >Re: ignore plugin ID of preset file? (From: Artemiy Pavlov <email@hidden>)

  • Prev by Date: Re: Help: XCode 3.2 breaks XCode 3.1 projects
  • Next by Date: Re: Stereo > Mono Downmixing on iOS
  • Previous by thread: Re: ignore plugin ID of preset file?
  • Next by thread: Re: shoutcast stream encoding debug
  • Index(es):
    • Date
    • Thread