Host Audio Units

Is it possible to host Audio Units in Juce.
We have an application that loads VST plugins succesfully but it doesn’t seem to load Audio Units, i thought the format was supported.
Your pluginHost doesn’t load them either.
I thought i had it working a while ago so i can’t figure out whether that was just a dream or it never actually worked.

Cheers
Edwin

Yes, the code’s there - juce_AudioUnitPluginFormat.cpp. There might be a few incompatibilities, but it’s definitely working. Did you set the JUCE_PLUGINHOST_AU flag before building?

HI Jules,
yes the flag is set.
Juce tries to load the file but it fails when it tries to find the compoent.

ComponentRecord* const comp = FindNextComponent (0, &componentDesc);
in

[code]AudioUnitPluginInstance::AudioUnitPluginInstance (const File& file_)
: file (file_),
initialised (false),
wantsMidiMessages (false),
audioUnit (0),
outputBufferList (0),
currentBuffer (0)
{
try
{
++insideCallback;

    log (T("Opening AU: ") + file.getFullPathName());

    if (getComponentDescFromFile (file))
    {
        ComponentRecord* const comp = FindNextComponent (0, &componentDesc);

        if (comp != 0)
        {
            audioUnit = (AudioUnit) OpenComponent (comp);

            wantsMidiMessages = componentDesc.componentType == kAudioUnitType_MusicDevice
                || componentDesc.componentType == kAudioUnitType_MusicEffect;
        }
    }

    --insideCallback;
}
catch (...)
{
    --insideCallback;
}

}[/code]
Comp is allways null
I tried a couple different Audio Units, but none has been loaded so far.

hmm… My mac build is all broken at the moment due to me doing the Cocoa rewrite, but I’ll take a look at this soon (there’s some Carbon code in that class that I’ll need to sort out anyway)

Hi,
If you if have time to have a look that would be nice.
thx
Edwin