Re: How to go about debugging transient "statics" using AudioUnit's RemoteIO
Re: How to go about debugging transient "statics" using AudioUnit's RemoteIO
- Subject: Re: How to go about debugging transient "statics" using AudioUnit's RemoteIO
- From: Gregory Wieber <email@hidden>
- Date: Sun, 15 Jan 2012 15:30:03 -0800
You should definitely dig through the mailing list archives regarding Objective-C and core audio. It's been discussed extensively, but the gist is that you need to have an extremely bare-metal understanding of Objective-C message dispatching to attempt to use it for audio callbacks. The general recommendation of the core audio mailing list (if I may) is to avoid Objective-C in render callbacks.
On Sun, Jan 15, 2012 at 3:14 PM, Jean-François Brouillet
<email@hidden> wrote:
Thanks for the idea.
I did check and couldn't find any. I use a very simple interpolation technique to weight two adjacent samples in a precomputed table and come up with an intermediate one, of the form (1-a) x1 + a x2 where I did check that neither a, x1 nor x2 could possibly be NaNs.
In the end I rewrote all the sample generation in C++ (what a pain!), ditching my ObjC code and the random statics are gone. I'm just really sad that the ObjC method dispatch is so slow in this context. If I was getting unpredictable statics when playing just one note, what's going to happen when I send my generator some chords?
Thanks for the help (but I'll stay in ObjC for everything else! :-)
> You're going to run into trouble if you try to put NSLog or printf
> statements in your callback.
>
> Have you checked to make sure you're not getting NaN values at any point in
> your calculations?
--
JFB
_______________________________________________
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
_______________________________________________
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