Audio Unit support for Mac 10.4 OS Tiger


#1

I am using the GIT tip from last May or so. I would like to know how I can build an Audio Unit using this tip that will utilize the older 10.4 Audio Unit code-base instead of the more recent 10.5 AU code provided in Leopard? I want my AU plug-ins to work on 10.4 Tiger as well as the 10.5 and 10.6 Mac Operating Systems. I have an older PPC Mac running 10.4 and a newer Intel based Mac running 10.6 for building/testing. Any ideas or suggestions on this one folks?

Thanks,
vk


#2

I don’t think you need to worry about the version of the AU code, you should be able to build a 10.4-compatible plugin using the latest SDK.


#3

A lot of people reported to me that binaries built with SDK for 10.5 do not work under 10.4, i had to change the SDK in XCode to 10.4 SDK and re-build then it worked. However i had problems with the AU code when failing back to 10.4 SDK, standalone version worked fine, AU had some errors i never fixed. I don’t know how 10.6 fits into that.


#4

Well I get several compile errors with the AU code when compiling for 10.4 SDK:

in AUBase.cpp

/Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicAdd32Barrier(SInt32, volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:79: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:79: error: initializing argument 2 of 'int32_t OSAtomicAdd32Barrier(int32_t, int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicOr32Barrier(UInt32, volatile UInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:93: error: invalid conversion from 'volatile uint32_t*' to 'uint32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:93: error: initializing argument 2 of 'int32_t OSAtomicOr32Barrier(uint32_t, uint32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicAnd32Barrier(UInt32, volatile UInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:107: error: invalid conversion from 'volatile uint32_t*' to 'uint32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:107: error: initializing argument 2 of 'int32_t OSAtomicAnd32Barrier(uint32_t, uint32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicCompareAndSwap32Barrier(SInt32, SInt32, volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:120: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:120: error: initializing argument 3 of 'bool OSAtomicCompareAndSwap32Barrier(int32_t, int32_t, int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicIncrement32(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:130: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:130: error: initializing argument 1 of 'int32_t OSAtomicIncrement32(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicDecrement32(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:139: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:139: error: initializing argument 1 of 'int32_t OSAtomicDecrement32(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicIncrement32Barrier(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:148: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:148: error: initializing argument 1 of 'int32_t OSAtomicIncrement32Barrier(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicDecrement32Barrier(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:157: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:157: error: initializing argument 1 of 'int32_t OSAtomicDecrement32Barrier(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicTestAndClearBarrier(int, void*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:167: error: invalid conversion from 'volatile void*' to 'void*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:167: error: initializing argument 2 of 'bool OSAtomicTestAndClearBarrier(uint32_t, void*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicTestAndClear(int, void*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:177: error: invalid conversion from 'volatile void*' to 'void*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:177: error: initializing argument 2 of 'bool OSAtomicTestAndClear(uint32_t, void*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicTestAndSetBarrier(int, void*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:187: error: invalid conversion from 'volatile void*' to 'void*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:187: error: initializing argument 2 of 'bool OSAtomicTestAndSetBarrier(uint32_t, void*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'void CASpinLockLock(volatile CASpinLock*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:262: error: invalid conversion from 'volatile CASpinLock*' to 'OSSpinLock*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:262: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'void CASpinLockUnlock(volatile CASpinLock*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:272: error: invalid conversion from 'volatile CASpinLock*' to 'OSSpinLock*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:272: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CASpinLockTry(volatile CASpinLock*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:281: error: invalid conversion from 'volatile CASpinLock*' to 'OSSpinLock*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:281: error: initializing argument 1 of 'bool OSSpinLockTry(OSSpinLock*)' /Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp: In member function 'OSStatus AUBase::DoRender(AudioUnitRenderActionFlags&, const AudioTimeStamp&, UInt32, UInt32, AudioBufferList&)': /Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp:1428: error: 'kAudioUnitRenderAction_PostRenderError' was not declared in this scope

in AUDispatch.cpp

/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp: In static member function 'static OSStatus AUBase::ComponentEntryDispatch(ComponentParameters*, AUBase*)': /Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp:103: error: 'kAudioUnitRemovePropertyListenerWithUserDataSelect' was not declared in this scope /Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp:304: error: 'kAudioUnitRemovePropertyListenerWithUserDataSelect' was not declared in this scope

In CAAudioChannelLayout.cpp

/Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicAdd32Barrier(SInt32, volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:79: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:79: error: initializing argument 2 of 'int32_t OSAtomicAdd32Barrier(int32_t, int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicOr32Barrier(UInt32, volatile UInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:93: error: invalid conversion from 'volatile uint32_t*' to 'uint32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:93: error: initializing argument 2 of 'int32_t OSAtomicOr32Barrier(uint32_t, uint32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicAnd32Barrier(UInt32, volatile UInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:107: error: invalid conversion from 'volatile uint32_t*' to 'uint32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:107: error: initializing argument 2 of 'int32_t OSAtomicAnd32Barrier(uint32_t, uint32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicCompareAndSwap32Barrier(SInt32, SInt32, volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:120: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:120: error: initializing argument 3 of 'bool OSAtomicCompareAndSwap32Barrier(int32_t, int32_t, int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicIncrement32(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:130: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:130: error: initializing argument 1 of 'int32_t OSAtomicIncrement32(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicDecrement32(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:139: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:139: error: initializing argument 1 of 'int32_t OSAtomicDecrement32(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicIncrement32Barrier(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:148: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:148: error: initializing argument 1 of 'int32_t OSAtomicIncrement32Barrier(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'SInt32 CAAtomicDecrement32Barrier(volatile SInt32*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:157: error: invalid conversion from 'volatile int32_t*' to 'int32_t*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:157: error: initializing argument 1 of 'int32_t OSAtomicDecrement32Barrier(int32_t*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicTestAndClearBarrier(int, void*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:167: error: invalid conversion from 'volatile void*' to 'void*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:167: error: initializing argument 2 of 'bool OSAtomicTestAndClearBarrier(uint32_t, void*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicTestAndClear(int, void*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:177: error: invalid conversion from 'volatile void*' to 'void*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:177: error: initializing argument 2 of 'bool OSAtomicTestAndClear(uint32_t, void*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CAAtomicTestAndSetBarrier(int, void*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:187: error: invalid conversion from 'volatile void*' to 'void*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:187: error: initializing argument 2 of 'bool OSAtomicTestAndSetBarrier(uint32_t, void*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'void CASpinLockLock(volatile CASpinLock*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:262: error: invalid conversion from 'volatile CASpinLock*' to 'OSSpinLock*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:262: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'void CASpinLockUnlock(volatile CASpinLock*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:272: error: invalid conversion from 'volatile CASpinLock*' to 'OSSpinLock*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:272: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h: In function 'bool CASpinLockTry(volatile CASpinLock*)': /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:281: error: invalid conversion from 'volatile CASpinLock*' to 'OSSpinLock*' /Developer/Extras/CoreAudio/PublicUtility/CAAtomic.h:281: error: initializing argument 1 of 'bool OSSpinLockTry(OSSpinLock*)'

So, I am curious to know what I might need to do to resolve these issues to get a successful build for 10.4? I built the project on my mac-intel running OS 10.6 which does have the latest XCode and the latest Audio Unit code base. Do I need to somehow have the older 10.4 Audio Unit code base? If so, how do you install both the older AU code and the newest AU code without conflicts?

Any info or pointers of how other may have achieved this would be much appreciated.

Thanks,
vk


#5

Yes, me too.
Since I upgraded leopard to snow leopard I always need to compille my stuff as 10.5 mode.


#6

Well… you can’t. So, what do we have to do to build AU’s that support Mac OS 10.4 using the modern Juce library? It’s apparent I’m not the only one having this issue. Surely there has to be a way to do it. Jules, have you tried to build an AU that supports 10.4 OS yet?

Thanks,
vk


#7

Well, to be fair, it’s easy to build a 10.4 compatible binary, and they run on a 10.6 machine… whether it works properly on a 10.4 machine is a different question! It’s actually been a long time since I’ve had a 10.4 machine to test on, so I’m relying on feedback like atom’s to know whether there are problems…


#8

Jules, I am talking about Audio units, not standalone. The error messages I posted are what is happening when trying to build an Audio Unit for 10.4 when building from a 10.6 machine. Can’t you see the same errors when trying to build a 10.4 AU from your system? I have a separate 10.4 machine as well if you need help with testing for it.


#9

Yes, I’m also talking about an AU. If you use the 10.6 SDK and set the deployment target to 10.4, it does build, and should in theory run on 10.4.