Re: registering memory based AU's
Re: registering memory based AU's
- Subject: Re: registering memory based AU's
- From: Chandrasekhar Ramakrishnan <email@hidden>
- Date: Tue, 22 Feb 2005 12:21:47 -0800
Ron Moreland schrieb:
>
I'm trying to create an Application specific AU that I would like to
>
simply instance and register with the component manager on the fly.
>
Does anyone have an example of instancing an AU in memory and
>
registering it?
In my .h file I have:
#define RES_ID 10000
#define COMP_TYPE kAudioUnitType_FormatConverter
#define COMP_SUBTYPE 'BSpl' // this AU splits an N-channel stream over 1 bus into 1-channel streams over N buses
#define COMP_MANUF 'ZKMk' // we are the ZKM in Karlsruhe
#define VERSION kZKMORFormatUtilitiesVersion
#define NAME "ZKM: Audio Bus Splitter"
#define DESCRIPTION "Splits an N-channel stream over 1 bus into 1-channel streams over N buses"
class ZKMORStreamSplitterAU : public AUBase {
[...]
};
In my .cpp file I have this:
COMPONENT_REGISTER(ZKMORStreamSplitterAU, COMP_TYPE, COMP_SUBTYPE, COMP_MANUF);
Then, in my code where I want to reference the AU, I access it just
like any other AU:
Component comp;
ComponentDescription desc;
AudioUnit streamSplitter;
desc.componentType = kAudioUnitType_FormatConverter;
desc.componentSubType = 'BSpl';
desc.componentManufacturer = 'ZKMk';
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
comp = FindNextComponent(NULL, &desc);
if (comp == NULL) return nil;
if (OpenAComponent(comp, &streamSplitter)) return nil;
- sekhar
--
C. Ramakrishnan email@hidden
_______________________________________________
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