Re: kAudioUnitErr_InvalidElement
Re: kAudioUnitErr_InvalidElement
- Subject: Re: kAudioUnitErr_InvalidElement
- From: Brian Willoughby <email@hidden>
- Date: Sun, 27 Nov 2016 15:11:16 -0800
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@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden