Audio Unit Render Error


I’m trying to make a 64 bit build of my plugin in both VST and Audio Unit. I’m currently testing using the Reaper as a host. I finally got my plugin to compile fine, the VST loads and works fine except that there is still this bug present:
So the buttons in my plugin don’t work , just the sliders.

In fact the problem I am stuck in is when making the Audio Unit. It compiles ok and when I load it in the reaper, it loads, and I see my GUI except that all the sliders and parameters seem to be frozen and not movable, so I went into the console output to see what’s going on and I’m getting this error:

ca_require: IsInitialized() Uninitialized /Applications/
from AU (0x810000): ‘aufx’ ‘Rxtr’ ‘Adnx’, render err: -10867
ca_require: IsInitialized() Uninitialized /Applications/
from AU (0x810000): ‘aufx’ ‘Rxtr’ ‘Adnx’, render err: -10867

Since this is being printed over and over in the console until I unload and remove the plugin, I tried commenting all the code of the process block in case it was related but it doesn’t work. When I hit the play button in reaper the playhead moves but there is no audio output.
Does anyone know what this is or any clues how to fix it?

After commenting most of my plugin code to find where is the problem coming from I realized that by calling AudioProcessor::getSampleRate() I get the error “ca_require: IsInitialized() Uninitialized” which seems to be that I need to initialize something before? Because the plugin loads and the interface shows normally, but it’s just that there is no playback although the playhead of the host moves.
Is some kind of initialization needed fro AU?

Where are you calling it from?

I was calling that from the AudioProcessor’s constructor, but with or without that call the problem still remains…

Well you should only call getSampleRate() from within processBlock (see the documentation).

The only other place you can know the target sample rate within an AudioProcessor is within prepareToPlay (where it is an argument to the method call). This is where I do any preparatory routines that are dependent on samplerate (e.g. selecting amount of oversampling I want to use).

Is there anything else you’re doing in the constructor that might not be valid at that point?

Thanks for clearing that up! Actually was just calling getSampleRate as a test ,but no, besides that there is nothing else in the constructor. I was finally able to make things work, the problem was that my plugin was 2in 4out which doesn’t give me problems in VST but changing this to 2in 2out in AU made it work making the respective adjustments in my processing code.

My question now is, Is it because it’s not possible to have asymmetrical plugins in AU or I just need to find a fix to make it work?

I believe the AU spec does allow asymmetric numbers of in/out channels, but I haven’t actually tried it with Juce. Perhaps someone else can chime in here…