• 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: AU versions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU versions


  • Subject: Re: AU versions
  • From: Bill Stewart <email@hidden>
  • Date: Wed, 30 Jul 2003 15:17:45 -0700

Yes, you can read the version out of the resource, but I think there is a simpler and more elegant way to do this... (and I'll make sure this is in the SDK)...

This is the way QT had done this for years (they don't read the vers resource), and it also allows you to have a version at development time that is higher than any installed version, so the component manager will load your developing AU:

Define a version file:
#ifndef __ReverseOfflineUnitVersion_h__
#define __ReverseOfflineUnitVersion_h__


#ifdef DEBUG
#define kReverseOfflineUnitVersion 0xFFFFFFFF
#else
#define kReverseOfflineUnitVersion 0x0000900
#endif

#endif

In your defines for defining the component resource include this file and use the constant for the version define:
#include <AudioUnit/AudioUnit.r>

#include "ReverseOfflineUnitVersion.h"

#define RES_ID kAudioUnitResID_ReverseOfflineUnit
#define COMP_TYPE kAudioUnitType_OfflineEffect
#define COMP_SUBTYPE 'Rvrs'
#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 kReverseOfflineUnitVersion
#define NAME "Acme Inc: ReverseOfflineUnit"
#define DESCRIPTION "Acme Inc's favourite offline audio effect"
#define ENTRY_POINT "ReverseOfflineUnitEntry"

#include "AUResources.r"

In your class that defines the AU sub class define the component version virtual method:

virtual ComponentResult Version() { return kReverseOfflineUnitVersion; }

And you are done, and won't get out of sync, and don't need to read this from the resource...

Bill


BTW - this is taken from the offline AU that we've defined with the help of Waves, and this reverse unit will be in the SDK in Panther...

(Thanks Marc, for the prompt, meant to write this sooner)

On Wednesday, July 30, 2003, at 02:03 PM, Marc Poirier wrote:

.. sorry = too much text here they'll "wait to approve" so you'll have to read Marc's original email
-- mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: AU versions
      • From: Marc Poirier <email@hidden>
  • Prev by Date: Re: Parameter scope quandry
  • Next by Date: Re: Parameter scope quandry
  • Previous by thread: AU versions
  • Next by thread: Re: AU versions
  • Index(es):
    • Date
    • Thread