Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
kAudioUnitErr_InvalidElement on component open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kAudioUnitErr_InvalidElement on component open

Hi. I'm having major problems with the Audio Unit that I'm currently working on and I'm having trouble narrowing down exactly where the problems occur. When I run FindUnits (which I modified to just look for this AU), the following (shortened) code:

AUComponent comp = AUComponent.findAU (auDesc);
AudioUnit theUnit = null;
try {
theUnit =;
System.out.println (theUnit + "\n");
ParameterValidation.validate (theUnit);
} catch (CAException e) {
System.out.println (kErrorTagStr + e + "\n");

catches an exception and outputs:

# #[JCoreAudio:1.2.111],-10877=kAudioUnitErr_InvalidElement

So somewhere the open process is returning an InvalidElement error.

I filled my AU's entry point with printfs and see that the entry point gets called twice: once with the kComponentOpenSelect selector and then with a kComponentCloseSelect selector. The unusual thing is that, in both cases, the address that is passed in by the obj pointer (the Class* argument in the entry point) is 0. This makes sense for opening, but not for closing (and my functioning Audio Units get non-zero addresses for obj passed to them during close), so I'm guessing that the problem is occuring during ComponentOpen and a valid instance can't even be created, hence the null pointer on close. Please correct me if I'm off-base here, though.

So my question is: what happens when my entry point dispatches the open selector? Where do I look for the problematic code? From what I can tell, it looks like the Audio Unit constructor and PostConstructor (which I didn't write, so it will be AUBase's default CreateElements(); I think?) are called, but I don't see where an error gets returned. Anyway, I hope this isn't a dumb question, I have spent hours now looking through docs and headers trying to trace what occurs during the open selector dispatch, but I am not able to figure this out, so any help or pointers would be greatly appreciated.

coreaudio-api mailing list | email@hidden
Do not post admin requests to the list. They will be ignored.

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.