Simply passing through the parameters is almost surely the wrong thing to do. 
When the system calls you, it's as part of a render callback, I assume, for 
some audio unit other than the one you're calling. While it's correct to pass 
through the time stamp and certain other parameters, the element is specific to 
each audio unit. Most audio units have only a single element, in which case 
passing through the element parameter will work because there is no other 
choice.

In your case, "invalid element" means that the AU you're calling does not have 
an element with that index.

It would help if you described your audio setup.
Are you using AUGraph?
What AudioUnit are you calling?
Have you initialized all of the audio unit's properties and then started it, or 
is it part of a graph?
Finally, under which API is the system calling your code? Have you registered a 
callback on the Output AudioUnit? Have you registered a callback on some other 
audio unit's input element?

Brian Willoughby


On Nov 27, 2016, at 2:31 AM, Bram Bos <[email protected]> wrote:
> I'm calling an AUAudioUnit's renderblock and it's returning 
> "kAudioUnitErr_InvalidElement".
> Neither Google nor the CoreAudio documentation is clear on what this error 
> means.
> 
> Here's the offending call; parameters are simply passed through verbatim from 
> what the system passed to me through the audio render callback.
> 
> OSStatus err = myAURenderBlock( actionFlags, timestamp, frameCount, 
> outputBusNumber, ioData, nil );
> // err returns as kAudioUnitErr_InvalidElement
> 
> Anyone knows what kAudioUnitErr_InvalidElement can mean in this context?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to