# Audio Unit Render Error

**URL:** https://forum.juce.com/t/audio-unit-render-error/8502
**Category:** Audio Plugins
**Created:** [April 17, 2012, 9:26am UTC](https://forum.juce.com/t/audio-unit-render-error/8502 "2012-04-17T09:26:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![xtraction](https://avatars.discourse-cdn.com/v4/letter/x/3ec8ea/32.png) [@xtraction](https://forum.juce.com/u/xtraction)
#### Post date: [April 17, 2012, 9:26am UTC](https://forum.juce.com/t/audio-unit-render-error/8502/1 "2012-04-17T09:26:43Z")

</div>

Hello,

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:  
[http://www.rawmaterialsoftware.com/viewtopic.php?t=8506&p=48205#p48205](http://www.rawmaterialsoftware.com/viewtopic.php?t=8506&p=48205#p48205)  
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/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp:1352  
from AU (0x810000): ‘aufx’ ‘Rxtr’ ‘Adnx’, render err: -10867  
ca\_require: IsInitialized() Uninitialized /Applications/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp:1352  
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?

---

<div class="post-metadata">

### Author: ![xtraction](https://avatars.discourse-cdn.com/v4/letter/x/3ec8ea/32.png) [@xtraction](https://forum.juce.com/u/xtraction)
#### Post date: [April 17, 2012, 2:51pm UTC](https://forum.juce.com/t/audio-unit-render-error/8502/2 "2012-04-17T14:51:15Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![andrewj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/andrewj/32/13428_2.png) [@andrewj](https://forum.juce.com/u/andrewj)
#### Post date: [April 17, 2012, 10:23pm UTC](https://forum.juce.com/t/audio-unit-render-error/8502/3 "2012-04-17T22:23:47Z")

</div>

Where are you calling it from?

---

<div class="post-metadata">

### Author: ![xtraction](https://avatars.discourse-cdn.com/v4/letter/x/3ec8ea/32.png) [@xtraction](https://forum.juce.com/u/xtraction)
#### Post date: [April 18, 2012, 8:11am UTC](https://forum.juce.com/t/audio-unit-render-error/8502/4 "2012-04-18T08:11:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![andrewj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/andrewj/32/13428_2.png) [@andrewj](https://forum.juce.com/u/andrewj)
#### Post date: [April 18, 2012, 11:16am UTC](https://forum.juce.com/t/audio-unit-render-error/8502/5 "2012-04-18T11:16:18Z")

</div>

Well you should only call getSampleRate() from within processBlock (see [the documentation](http://www.rawmaterialsoftware.com/juce/api/classAudioProcessor.html#a99b216c491ed4896424a9a075858ca03)).

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?

---

<div class="post-metadata">

### Author: ![xtraction](https://avatars.discourse-cdn.com/v4/letter/x/3ec8ea/32.png) [@xtraction](https://forum.juce.com/u/xtraction)
#### Post date: [April 18, 2012, 1:59pm UTC](https://forum.juce.com/t/audio-unit-render-error/8502/6 "2012-04-18T13:59:12Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![andrewj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/andrewj/32/13428_2.png) [@andrewj](https://forum.juce.com/u/andrewj)
#### Post date: [April 18, 2012, 10:34pm UTC](https://forum.juce.com/t/audio-unit-render-error/8502/7 "2012-04-18T22:34:13Z")

</div>

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…
