AUMatrixReverb and AUVectorPanner 1184 vs 1152 Buffer Size


#1

I have found that the AUMatrixReverb and AUVectorPanner both work if the buffer size is 1184 or greater. If it’s 1152 or less then they both report EXC_BAD_ACCESS from within processBlock (AUMultibandCompressorEntry)

These tests were run with v1.53.40 in the Plugin Host Example. The Mac “AU Lab” app is able to load both AU’s at low buffer sizes on my system.

13" Macbook Pro w/2.4ghz Core 2 duo 4gb ram.
Osx 10.6.6


#2

Sorry, that was incorrect. They don’t actually work, they just don’t crash. In fact it appears that none of the built in AU’s (I don’t have any 3rd party to check against) actually process the audio when the buffer size is 1184 or greater.


#3

I’m facing the same problem. Want to use AUMatrixReverb from within my plugin, but I’d like to know what makes it crash in the Plugin Host, so I can save me some additional debugging :smiley:


#4

That’s pretty strange… I’m really not sure what to suggest. It certainly sounds like a bug in Apple’s code, but I can’t think what AU Lab could be doing that avoids it.


#5

I was able to use the AUMatrixReverb in the previous Core Audio version of my program. I wasn’t doing anything special other than hooking it up through an AUGraph. The reality for me is that if this plugin can be loaded by other programs on the mac then my program should be able to as well! I’ll poke through the code and see if I can’t make it work.

But I’m also concerned with this idea that buffer sizes of 1184 or greater are causing the Audio Units to stop processing the sound. I’ve tried it with a 3rd party plugin and the result is the same. If this isn’t fixable then do I limit buffer sizes to 1152? I don’t have a ton of experience with all of this but I can try to hunt this one down as well.

Graeme


#6

Regarding AUMatrixReverb crashing, I found this thread in the core audio mailing list.

http://lists.apple.com/archives/coreaudio-api/2009/Dec/msg00016.html

[quote]Sorry that we’ve neglected to document this (or enforce it with auval), but AU’s should be able to assume vector-aligned input buffers, and emit vector-aligned output buffers.

Doug[/quote]


#7

Hmm… Nasty. Does it help if we change the AudioSampleBuffer to allocate on 16-byte boundaries like this:

[code]void AudioSampleBuffer::allocateData()
{
const size_t channelListSize = (numChannels + 1) * sizeof (float*);
const size_t stride = ((size + 3) & ~3);
allocatedBytes = (int) (numChannels * stride * sizeof (float) + channelListSize + 32);
allocatedData.malloc (allocatedBytes);
channels = reinterpret_cast <float**> (allocatedData.getData());

float* chan = (float*) (((pointer_sized_int) (allocatedData + channelListSize) + 15) & ~15);
for (int i = 0; i < numChannels; ++i)
{
    channels[i] = chan;
    chan += stride;
}

channels [numChannels] = 0;

}
[/code]

?


#8

Nope, that doesn’t seem to do it.


#9

I’d just like to report that AUMatrixReverb now works for me. Not sure why or which version of Juce first made it work but I’m using 1.53.107

I guess the wiki page for supported plugins should be updated? :slight_smile:

EDIT: So it does work for me but it’s not solid. If I add it to a second track (so 2 separate instances loaded) then it stops working. Also can’t seem to get it to work (it does load, but no effect) in the Juce Plugin Host.