Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: registering memory based AU's



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:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden

References: 
 >registering memory based AU's (From: Ron Moreland <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.