• 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: Creating Components in PB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Creating Components in PB


  • Subject: RE: Creating Components in PB
  • From: Roger Butler <email@hidden>
  • Date: Tue, 25 Sep 2001 08:44:48 +1000

Bill, you mentioned your example audio unit may be available on the OS X
release soon. Is it ready for a preliminary release?

The AU is a Carbon Bundle. The trickiest part of making it a component is
getting the resources right. You need a file with a .r extension, containing
code like this:

#define Target_PlatformType 1000 // arbitrary
#define Target_CodeResType 'dlle'
#define TARGET_REZ_USE_DLLE 1

#define RES_ID 30000 // arbitrary

resource 'STR ' (RES_ID, purgeable) {"MyAudioUnit"};
resource 'STR ' (RES_ID + 1, purgeable) ("A sample"};

resource 'dlle' (RES_ID)
{
ENTRY_POINT
};

resource 'thng' (RES_ID, "MyAudioUnit")
{
'aunt',
'efct',
'MyAU',
0, 0
0, 0
'STR ', RES_ID
'STR ', RES_ID + 1,
0, 0,
0x00010000, // version
componentHasMultiplePlatforms | componentDoAutoVersion,
0,
{
0,
Target_CodeResType, RES_ID,
Target_PlatformType,
},
};

And I think you also need a .exp file with a single line:
_MyAudioUnitEntry

MyAudioUnitEntry() must be defined like this:

extern "C" // if using C++
{
pascal ComponentResult MyAudioUnitEntry(ComponentParameters*
pParams, AudioUnitBase* pThis) { }
}

and farm the requests out to other functions.

Then you build the AU, put it in the right folder, and restart the machine
(or even just log off and on again?). The Component Manager will find it and
register it. There's no need to register it internally, although you can if
it's a private AU.

Roger.

> -----Original Message-----
> From: andybull [mailto:email@hidden]
> Sent: Thursday, 20 September 2001 10:57 AM
> To: email@hidden
> Subject: Creating Components in PB
>
>
> Could anyone point me to any examples on how to create
> components using
> ProjectBuilder ?
>
> Actually all I need to know is how to set up the project
> build settings
> because there are no component project templates in PB.
> _______________________________________________
> coreaudio-api mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/coreaudio-api


  • Prev by Date: Re: Support of CoreAudio for Multi-Channel
  • Next by Date: Documentation on CoreAudio
  • Previous by thread: Creating Components in PB
  • Next by thread: Documentation on CoreAudio
  • Index(es):
    • Date
    • Thread