How to fix Apple's broken CoreAudio code when building AudioUnits

Hi everyone,

I have been trying to compil JuceDemoPlugin 3 days but without any sucess...

I followed a lot of posts but each time I got some different errrors on xcode.

What I did exactly:

I'm running on Mac OSX 10.9 ; I installed XCode 5.0.1, go to /Applications/Xcode.app/Contents/Developper, I created a new folder Extras and I put inside vstsdk2.4 from Steinberg and CoreAudio from AudioTools February 2012. I get two errors when I compil the JuceDemoPlugin:
- Member 'MIDIEvent' found in multiple base classes of different types

- ‘public.sdk/source/vst2x/audioeffectx.h’ file not found

 

I really would like to have a juce template project working for builing audio plugins but I can't make anything work :'(

Thanks for any help !

Victor

 

The missing VST header is from the VST SDK, which you'll obviously need to install if you're building a VST. If you'd looked at the actual include statement, you'd probably have seen my comment above it, explaining this.

The other problem's a bug in Apple's own code that you need to patch to make it work - see one of the many threads about it, e.g. the top sticky thread on the audio plugins forum: http://www.juce.com/forum/topic/aus-xcode

First one appears sometimes I don't know why because the VST SDK is installed, I just have to relocate the folder in the search path and the error disappear....

About the second error, I already followed these two instructions :

AUBase.h line 698:
comment out these lines to get rid of multiple base class error
// virtual OSStatus MIDIEvent( UInt32 inStatus,
// UInt32 inData1,
// UInt32 inData2,
// UInt32 inOffsetSampleFrame) { return kAudio_UnimplementedError; }

AUCarbonViewBase.cpp line 257:
add static cast
HISize originalSize = { static_cast(mBottomRight.h), static_cast(mBottomRight.v) };

The problem is that an other error follow afterward in AUPlugInDispatch.cpp :

No member named ‘MIDIEvent’ in ‘AUBase’

I read a lot of threads about it but I can't find the good one apparently

To resume:

if I comment I have this error AUMIDIEffectBase.cpp:: Member ‘MIDIEvent’ found in multiple base classes of different types

if I don't I have this one /AUPluginDispatch::No member named 'MIDIEvent' in 'AUBase' /

Victor

I found... I had to make a change here
result = This->AUMIDIBase::MIDIEvent(inStatus, inData1, inData2, inOffsetSampleFrame);
 

It compil now, I didn't manage to open the .component yet but it compil at least ...

 

Finally a post that solves this problem in a consise and to the point way. I too have been on this problem for days. Surely this could be mentioned on the JUCE website as EVERYONE who uses JUCE on OSX has this problem. 

There's a sticky thread that already addresses this issue, but this one does a better job of it - I'll make this one sticky instead..

has anyone updated to xcode6? Any problems doing it?

I have to do this every time XCode updates, and people ask me when downloading my plug-ins, so I wrote it up the solution in neat:

 

https://github.com/adamstark/Sound-Analyser/wiki/Common-Issues-When-Building-Sound-Analyser

 

P.S. - I have referenced two posts on the JUCE forum as my source

P.P.S. - I have just done this on XCode 6 and it worked.

 

Hope this is helpful!

 

Adam

:-)

Hi all,

I have just updated my Macbook to Yosemite and Xcode 6.4. As per usual I had to copy the CoreAudio SDK into the XCode app bundle and tweak the CoreAudio code as above. 

Is there a way to link to the CoreAudio SDK outside of the Xcode bundle?

Cheers,

Mark

deleted.

 

Yes, you can define it in the Introjucer now! Config-> AU SDK Path 

I think the latest download of the Core Audio SDK

https://developer.apple.com/library/mac/samplecode/CoreAudioUtilityClass...

then --> Download Sample Code, and you get the current headers.....

The one in the "additional downloads section" seems to be old!

PS: There is a lot old and deprecated info in this forum

Thanks chkn!


This is great news - I did not realize that the Introjucer has this now. That is great as it is annoying to keep needing to add the extras folder each time Xcode is updated.


That link did not work for me, so I went to https://developer.apple.com/downloads/ and downloaded "Audio Tools for Xcode - Lat July 2012" as it is the most recent which has a descriptions claiming to include the CoreAudio headers.  But it does not include the headers, only broken dreams.


Kind of cruel, if you ask me, but then that happens.


So, next I went to https://developer.apple.com/library/mac/navigation/, looked at the menu on the left and clicked on CoreAudio.


Next I clicked on "Core Audio Utility Classes" - right now, it says it was last updated on 2014-07-08.


The download link is on the top left.
 

The patched CoreAudio files are now included in the JUCE repository.

No patching nor inclusion needed anymore.

Yep, and therefore the "sticky" mode for this forum post should probably be removed..