RE: AU with Multiple Carbon Views
RE: AU with Multiple Carbon Views
- Subject: RE: AU with Multiple Carbon Views
- From: Darrell Gibson <email@hidden>
- Date: Mon, 30 Nov 2009 21:22:16 +0000
- Acceptlanguage: en-US, en-GB
- Thread-topic: AU with Multiple Carbon Views
Bill,
Thanks for the reply. I think this clarifies how I could implement multiple carbon view using this mechanism.
Incidentally I follow your original advice of implementing a sub-view which is opened from my main view. I did this using the XFramework in the end, which seems to work.
Darrell.
________________________________________
From: William Stewart [email@hidden]
Sent: 30 November 2009 20:52
To: Darrell Gibson
Cc: email@hidden
Subject: Re: AU with Multiple Carbon Views
On Nov 26, 2009, at 1:14 PM, Darrell Gibson wrote:
> Bill,
>
> Thanks for the reply. (Sorry for the delay in getting back you.)
>
> I understand all of that. It's the next bit I'm unsure about. In
> your AUTimePitch you have a single entry point, right?
yes
> It can then be entered for an offline or format converter version,
> right?
yes
> Having then been entered, how do you then determine which version
> has been set before entry?
when the AU is opened, an instance of an AUBase subclass is created.
The componentInstance is passed in to the constructor. You use that to
get the component description, and from there you can tell which
"flavour" of your code was opened.
In the SnowLeopard code, there are two methods to take note of in
ComponentBase (the base class of AUBase)
/*! @method GetComponentInstance */
AudioComponentInstance GetComponentInstance() const { return
mComponentInstance; }
/*! @method GetComponentDescription */
AudioComponentDescription GetComponentDescription() const;
In Leopard, I think the GetComponentDescription might be a part of
AUBaseHelper (which we removed in SL)
> This is the bit I can't see at the moment (sorry if it is obvious).
>
> Thanks for your help,
>
> Darrell.
>
> ________________________________________
> From: William Stewart [email@hidden]
> Sent: 26 November 2009 00:01
> To: Darrell Gibson
> Cc: email@hidden
> Subject: Re: AU with Multiple Carbon Views
>
> the .r file - that has the following definitions (this is taken from
> the sample effect)
>
> ~
> ~
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> // SampleEffectUnit
> #define RES_ID kAudioUnitResID_SampleEffectUnit
> #define COMP_TYPE kAudioUnitType_Effect
> #define COMP_SUBTYPE 'Pass' // this effect just passes audio
> through
> #define COMP_MANUF 'Acme' // note that Apple has
> reserved all all-
> lower-case 4-char codes for its own use.
> // Be sure to include at least one
> upper-case character in each of your codes.
> #define VERSION kSampleEffectUnitVersion
> #define NAME "Acme Inc: SampleEffectUnit"
> #define DESCRIPTION "Acme Inc's favorite audio effect"
> #define ENTRY_POINT "SampleEffectUnitEntry"
>
>
> The ENTRY_POINT here is the name of the C function that is generated
> from COMPONENT_ENTRY
>
> The version we usually include in a header file (as its used in two
> places, here and in the GetVersion() method call from ComponentBase)
>
> This builds a resource file that is then part of your bundle. This is
> then used by the coreservicesd to register your audio unit as the
> type, sub, manu, with the entry point from that bundle that it will
> dispatch calls through.
>
> Bill
>
BU - the UK's Number One New University
The Guardian University Guide 2009 & 2010
This email is intended only for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email, which must not be copied, distributed or disclosed to any other person.
Any views or opinions presented are solely those of the author and do not necessarily represent those of Bournemouth University or its subsidiary companies. Nor can any contract be formed on behalf of the University or its subsidiary companies via email.
_______________________________________________
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