Re: using performSelectorOnMainThread to update the ui
Re: using performSelectorOnMainThread to update the ui
- Subject: Re: using performSelectorOnMainThread to update the ui
- From: Jeff Moore <email@hidden>
- Date: Sun, 15 Nov 2009 18:53:02 -0800
On Nov 15, 2009, at 6:18 PM, Mahboud Zabetian wrote:
> On Sun, Nov 15, 2009 at 2:25 PM, Aran Mulholland
> <email@hidden> wrote:
>> does this mean that storing your data in objC data structures is a no no?
>
> > If you are using garbage collection, correct.
>
> Any thoughts on how safe it is on the iPhone?
GC is not currently used on the iPhone, so no it won't currently be an issue. But this is still a bad habit to get into.
> That brings me to: I'm looking to do pitch recognition, similar to a chromatic tuner, on an iPhone. I noticed that many of the samples that handle audio units have their most relevent code in C++. See AurioTouch (iPhone FFT sample from Apple) as an example. Do I have to do the same? I'm much more comfortable with C and Obj C than C++.
Our examples tend to grow out of tools we write for testing or in a lot of cases from implementing the various frameworks themselves and we tend to use C++ for implementing most things.
But all of our APIs are in vanilla C. In fact, you can use any language with the Core Audio APIs that can interface with a C library. The only restraint is that when you are on the IO thread context, that you don't miss your deadlines.
The easiest way to ensure that your don't miss your deadlines is to only use constructs that don't block. That said, the important thing here is the deadline. So in point of fact, you can block for bounded amounts of time provided that you are darn sure that you are going to meet the deadline. This can be useful for apps that want to use larger buffer sizes.
> On Nov 15, 2009, at 5:31 PM, Kyle Sluder <email@hidden> wrote:
>
>> On Sun, Nov 15, 2009 at 2:25 PM, Aran Mulholland
>> <email@hidden> wrote:
>>> does this mean that storing your data in objC data structures is a no no?
>>
>> If you are using garbage collection, correct.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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