I’m looking for an easier way to manipulate audio buffers on the iPhone. Mainly I’m trying to avoid pointer issues and array count issues with C, but don’t want to be slowed down by number objects like NSNumber or NSInteger which I would have to use with NSArray.
I’ve come across CFArray which seems like it might be a nice middle ground. Am I correct in this assumption? Or am I missing something?
Not really.
CFArrayis basically the same asNSArray, you can even cast between the two, this is called toll-free bridging.CFArray(and its mutable counterpart) does allow you to specify your own callback functions for retaining and releasing the objects (pointers) in your array, which would allow you to store arbitrary pointers (not justNSObjects) in the array and implement your own memory management scheme, but I doubt that this would result in any real performance gains. For your use case, C arrays are probably the way to go.