AUv2 Wrapper auval errors

I have this strange issue with the AUv2 wrapper that results in a lot of FAILs in auval. I did a lot of debugging to find out what the issue is, and it seems to be related to this code in auwrapper.mm:

.....
static OSStatus AUWrapperMethodSetProperty (void* self, AudioUnitPropertyID inID,
                                            AudioUnitScope inScope, AudioUnitElement inElement,
                                            const void* inData, UInt32 inDataSize)
{
	auto plugInstance = reinterpret_cast<AudioComponentPlugInInstance*> (self);
	auto auwrapper = reinterpret_cast<AUWrapper*> (&plugInstance->mInstanceStorage);
	try
	{
		if (inDataSize != sizeof (CFPropertyListRef*))
			return kAudioUnitErr_InvalidPropertyValue;
		if (inScope != kAudioUnitScope_Global)
			return kAudioUnitErr_InvalidScope;

		if (inData && inDataSize && inID == kAudioUnitProperty_ClassInfoFromDocument)
		{
.....

It is regarding the two if-statements. Both are giving two different FAILs in my auval run.

Let’s first assess the sizeof one, the most important one. It seems we always expect a pointer and check the size, but auval sends an integer value (size 4) for kAudioUnitProperty_MaximumFramesPerSlice. Is there a reason we only expect a pointer here?

Then for the second one, we seem to only allow global scoped properties, but this fails the audio format tests, because they send kAudioUnitProperty_StreamFormat with the scopes kAudioUnitScope_Output and kAudioUnitScope_Input.

Unfortunately I can’t check this behavior in again, because in my version of the VST3 SDK (3.7.7, the latest as of this post), there are no AUv2 example projects shipped anymore.

Fortunately, the issue is easily fixed by just removing those 4 lines. This also fixes the plugin to not load in Ableton Live as Audio Unit, and in Logic.

Bump. Nobody recognizes this issue?

Hi, this will be fixed in the next SDK update.

1 Like

Hi basdp,

It had been discussed here after the v3.7.7 SDK release:

The temporary workaround is to comment out the 4 mentioned lines.

Best,
Ray