Re: loading AU from app's bundle?
Re: loading AU from app's bundle?
- Subject: Re: loading AU from app's bundle?
- From: "Sophia Poirier [dfx]" <email@hidden>
- Date: Sat, 29 Mar 2008 15:28:01 -0400
On Mar 28, 2008, at 4:13 PM, Kevin Dixon wrote:
I am writing an application that employs an AU I've written to
analyze a
given file. I'm thinking for distribution purposes it would be
easiest if
the user can do the regular drag-n-drop installation of the app.
This poses the question, if I include the AU in the Application's
bundle,
is it possible to instantiate the AU from the applications own bundle?
Yes you can. Something like this will do it:
CFURLRef auUrl = CFBundleCopyResourceURL(CFBundleGetMainBundle(),
CFSTR("Your AU.component"), NULL, NULL);
if (auUrl != NULL)
{
FSRef auFileRef;
Boolean success = CFURLGetFSRef(auUrl, &auFileRef);
if (success)
{
OSErr error = RegisterComponentFileRef(&auFileRef, 0);
}
CFRelease(auUrl);
}
_______________________________________________
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