Maybe it matters what you want to do in your callback? I'd figure Int16s are going to be faster until the callback starts doing heavy maths, right?
My question on this: I was surprised to see the new iOS effect units used floats, because I didn't think floats generally worked with Audio Units on iOS 4 and earlier (and that was why we were made to use 8.24 as the unit canonical type). So that makes me wonder if we start using floats, we'll find we have AUGraphs that work on iOS 5 but throw a '?fmt' error on iOS 4 or earlier. That would suck.
Also, since a lot of the older units default to 8.24 or Int16, I wonder if the cost of format conversion (either by using AUConverters or setting kAudioUnitStreamFormat where possible) is going to cancel out the advantages of using real floats.
Sounds like we could use some official guidance on formats and their performance considerations… maybe a nice topic for a technical Q&A or a few WWDC slides (please?)
--Chris
On Feb 14, 2012, at 8:44 AM, Morgan Packard wrote: So this means I'm better off setting up my remoteIO callback so it uses a buffer of floats rather than Int16's as it does now, correct?-m- On Tue, Feb 14, 2012 at 5:52 AM, Hari Karam Singh <email@hidden> wrote:
Thanks Gregory. I remember reading that now. I can attest to the Accelerate framework too! HKS
From: Gregory Wieber [mailto:email@hidden]
Sent: 12 February 2012 20:07 To: Hari Karam Singh Cc: email@hidden Subject: Re: sample data types (iOS)
Apple states that arm supports floating point natively. Quote: "The ARM processor in iOS devices processes floating-point instructions natively. Your application should use floating-point instead of fixed point math whenever possible. If you are porting an application that uses fixed-point operations, rewrite the code to use floating-point types."
Also, the accelerate framework makes it possible to vectorize certain operations, and gain orders of magnitude increases in performance. Just watch out for how you're getting data back and forth to the native audio format, because that can be a bottleneck.
_______________________________________________
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
-- =============== Morgan Packard cell: (720) 891-0122
aim: mpackardatwork
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
|