AU instrument/synth compiling error


#1

I didn't have problems with my tests compiling AU effects but today I wanted to try building an instrument/synth.

I made a new project with introjucer and checked Is a Synth and Plugin wants midi input. I compiled it with XCode 5.0.1 (and latest Juce) and got this error:

/JuceLibraryCode/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm:758:53: Only virtual member functions can be marked 'override'

I read the sticky but I can't "patch" anything as I don't have in AUBase.h line 698:
anything like that:

virtual OSStatus MIDIEvent( UInt32 inStatus,
UInt32 inData1,
UInt32 inData2,
UInt32 inOffsetSampleFrame) { return kAudio_UnimplementedError; }

Instead I have this:

virtual UInt32                GetAudioChannelLayout(    AudioUnitScope                scope,

                                                        AudioUnitElement             element,

                                                        AudioChannelLayout *        outLayoutPtr,

                                                        Boolean &                    outWritable);

and in AUCarbonViewBase.cpp line 257 I have:

//HISize windowSize = {    float(windowBounds.right - windowBounds.left),

//                        float(windowBounds.bottom - windowBounds.top) };

What should I do? 

 


#2

http://www.juce.com/forum/topic/how-fix-apples-broken-coreaudio-code-when-building-audiounits


#3

Thanks for the reply Jules but as I said I read the sticky but I don't understand how to patch the files. In AUBase.h I don't have those lines and in  AUCarbonViewBase.cpp I have something already commented.

I managed to find where to put this: result = This->AUMIDIBase::MIDIEvent(inStatus, inData1, inData2, inOffsetSampleFrame);

but I got the same error.

juce_AU_Wrapper.mm line 758:
UInt32 numSamples) override

Only virtual member functions can be marked 'override'.,

I'll try to reinstall the AU sdk but I can't understand why it worked fine for effects and now not.


#4

Ok I redownloaded CoreAudio and followed the sticky instructions:

patching AUBase.h and AUCarbonViewBase.cpp (lines where a few lines below)

Now if I compile I get the No member named ‘MIDIEvent’ in ‘AUBase’ error as in the sticky thread.
I changed the line in AUPluginDispatch.cpp to

result = This->AUMIDIBase::MIDIEvent(inStatus, inData1, inData2, inOffsetSampleFrame);

as explained in the sticky but now I got a new error:

/AUPlugInDispatch.cpp:446:12: Use of undeclared identifier 'This'

I'm lost...I can't belive is that hard making something "official" working.


#5

I tried everything but I couldn't make it work.

I followed an old thread from the sticky and tried to patch the last version from here https://github.com/adfernandes/core-audio-utility-classes

It worked, both AU effects and instruments. Still is really strange that I couldn't make the "official" release working. 


#6

My apologies on behalf of Apple's piss-poor support for their own plugin format!

If I could, I'd include fixed versions of these files in the juce codebase to avoid all this nonsense, but that'd be breaking their copyright terms.


#7

Sorry to bother again but it actually didn't work. I can compile without errors and Effects work great but when I tried the Juce Plugin Demo it didn't play any note (while Keyboard is working and the transport status as well). The VST version is working fine so I guess is still something related to Core Audio.

Please, can someone write a step by step guide for noobs like me? 


#8

Apple changes their development tools in a pretty rapid cycle. I usually have to change something in my codebase each time a new version of Xcode comes out. I'm sorry i can't really help you, but if i were you i would simply try it with an older version of Xcode and the SDK.


#9

Thanks for the reply. I'll try to play with older versions and see if I can find one working. It's really frustrating.

We should have a sticky with more detailed informations about this issue. Even something with "use this version of Xcode and this version of the SDK, apply these fixes, done".