Audio Unit Render Error

Discuss issues relating to audio plugins

Audio Unit Render Error

Postby xtraction » Tue Apr 17, 2012 10:26 am

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/view ... 205#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?
xtraction
JUCE Geek
 
Posts: 24
Joined: Wed May 04, 2011 5:27 pm

Re: Audio Unit Render Error

Postby xtraction » Tue Apr 17, 2012 3:51 pm

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?
xtraction
JUCE Geek
 
Posts: 24
Joined: Wed May 04, 2011 5:27 pm

Re: Audio Unit Render Error

Postby Andrew J » Tue Apr 17, 2012 11:23 pm

Where are you calling it from?
User avatar
Andrew J
JUCE UberWeenie
 
Posts: 211
Joined: Tue Feb 15, 2011 1:26 pm
Location: Hobart, Australia

Re: Audio Unit Render Error

Postby xtraction » Wed Apr 18, 2012 9:11 am

I was calling that from the AudioProcessor's constructor, but with or without that call the problem still remains..
xtraction
JUCE Geek
 
Posts: 24
Joined: Wed May 04, 2011 5:27 pm

Re: Audio Unit Render Error

Postby Andrew J » Wed Apr 18, 2012 12:16 pm

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?
User avatar
Andrew J
JUCE UberWeenie
 
Posts: 211
Joined: Tue Feb 15, 2011 1:26 pm
Location: Hobart, Australia

Re: Audio Unit Render Error

Postby xtraction » Wed Apr 18, 2012 2:59 pm

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?
xtraction
JUCE Geek
 
Posts: 24
Joined: Wed May 04, 2011 5:27 pm

Re: Audio Unit Render Error

Postby Andrew J » Wed Apr 18, 2012 11:34 pm

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...
User avatar
Andrew J
JUCE UberWeenie
 
Posts: 211
Joined: Tue Feb 15, 2011 1:26 pm
Location: Hobart, Australia


Return to Audio Plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron