• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS - Question on AUGraph in objective C / CPP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS - Question on AUGraph in objective C / CPP


  • Subject: Re: iOS - Question on AUGraph in objective C / CPP
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Mon, 29 Oct 2012 14:20:03 +0100


Le 29 oct. 2012 à 13:58, Jack Nutting <email@hidden> a écrit :

On Mon, Oct 29, 2012 at 1:20 PM, Chris Adamson <email@hidden> wrote:
* On that point, notice mow many other low-to-mid level media APIs in the world -- QuickTime, OpenGL, OpenAL, OpenMAX, etc. -- are also in C. Notice also how the high-level parts of AV Foundation are Obj-C, but the low-level stuff that gets into the nitty-gritty of data buffers is in C (the Core Media framework). Smart people developed that stuff, and I have little reason to presume I know better.

I agree with pretty much all of this, with maybe one exception: creating an audio graph. Setting up an audio graph requires a lot of really repetitive code.


That's why Apple provides a C++ wrapper for such CoreAudio API. The CoreAudio SDK provides a lot of helpful glue code that can be reused in your app.
Unfortunately, the CoreAudio SDK documentation has always been sparse and incomplete, and the provided C++ API is not always consistent (especially error handling. Sometime it uses exception, sometimes it returns error code).

About Obj-C for CoreAudio, message dispatching is usually fast, but the problem is that you cannot have any guarantee about what appends under the hood, especially when there is a method lookup cache miss. In such case, the runtime fallback to a slow code path, that can even call allocation methods, and this is something you don't want to do on a real-time thread.

That said, nothing prevent you to write High-level Obj-C wrappers for operations that do not require real-time constraints.

-- Jean-Daniel




 _______________________________________________
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

References: 
 >iOS - Question on AUGraph in objective C / CPP (From: Pier <email@hidden>)
 >Re: iOS - Question on AUGraph in objective C / CPP (From: Chris Adamson <email@hidden>)
 >Re: iOS - Question on AUGraph in objective C / CPP (From: Jack Nutting <email@hidden>)

  • Prev by Date: Re: iOS - Question on AUGraph in objective C / CPP
  • Next by Date: Re: AudioQueueNewOutput and the runloop
  • Previous by thread: Re: iOS - Question on AUGraph in objective C / CPP
  • Next by thread: Re: iOS - Question on AUGraph in objective C / CPP
  • Index(es):
    • Date
    • Thread