Writing AU hosts
Writing AU hosts
- Subject: Writing AU hosts
- From: Nik Reiman <email@hidden>
- Date: Sun, 6 Aug 2006 01:09:18 +0200
Hello all,
I am in the process of writing an AU host and am having some problems
getting effect plugins to work. My code presently works for AU
instruments, but I have discovered that I cannot get AU effects to
work, as I must manually set a render function to tell the AU where
to pull the input data from by setting the
kAudioUnitProperty_SetRenderCallback property. During my debugging,
I found that calls to AudioUnitSetProperty() were behaving
mysteriously.. they do not seem to be executed at all. I have the
following code in my method to initialize the plugin once the
component is loaded:
bool auLoader::initialize() {
OSStatus err = AudioUnitInitialize(m_plugin);
if(err != noErr) {
_LOG(LOG_ERROR, "Could not initialize plugin");
return false;
}
// Connect input properties
AURenderCallbackStruct callback;
callback.inputProc = this->inputCallback;
callback.inputProcRefCon = this;
err = AudioUnitSetProperty(m_plugin,
kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0,
&callback, sizeof(callback));
if(err != noErr) {
_LOG(LOG_WARN, "Could not configure inputs");
}
_LOG(LOG_INFO, "AU initialized");
return true;
}
What is strange is that the call to AudioUnitSetProperty() returns
noErr. However, in my actual test AU plugin, I have put a rather
loud printf() message at the beginning of the SetProperty() method
which should be visible on the console (and in fact is, when I debug
the same plugin through other AU hosts such as ableton live).
However, the call never seems to reach the actual plugin, and as a
result, the callback method is never set, which causes the plugin to
render only silence. Since I can't seem to debug inside of
AudioUnitSetProperty(), I'm really stuck as to what I'm doing wrong.
Can anyone offer me a few pointers in the right direction?
Thanks!
-Nik
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden