• 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: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm


  • Subject: Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
  • From: "Paul Sanders" <email@hidden>
  • Date: Sun, 20 Jun 2010 22:29:49 +0100

> Most importantly, objc_msgSend can block.
 
It can?  Doing what (I'm curious)?  I know from my own (somewhat superficial) investigations that the first call is slower because some kind of lookup takes place but is there something else?  MTCoreAudio uses objC calls (actually NSInvocation, if memory serves) in its IOProc, FWIW, and the overhead of a method call, on Intel, after the initial lookup, as measured by me in gdb, is about 25 instructions.  Or as Brian says, cache an IMP via -[NSObject methodForSelector:], which is then just a call through a pointer and thus slightly faster than a C++ virtual function call.  Having said all of which, I coded my audio stuff in C++.
 
One thing I did find is that malloc can sometimes be very slow (when it hits the kernel, presumably) so don't do this (or alloc any objects) in time-critical code.  If you do, your audio _will_ glitch.
 
Regards,
 
Paul Sanders.
 
 _______________________________________________
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

  • Follow-Ups:
    • Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
      • From: "Stephen F. Booth" <email@hidden>
References: 
 >Question: What is the impact of changing .cpp AudioUnitEffect source to .mm (From: Motti Shneor <email@hidden>)
 >Re: Question: What is the impact of changing .cpp AudioUnitEffect source to .mm (From: Brian Willoughby <email@hidden>)
 >Re: Question: What is the impact of changing .cpp AudioUnitEffect source to .mm (From: Kyle Sluder <email@hidden>)

  • Prev by Date: RE: Audio using USB Yeti Mic does not work on iPhone Simulator
  • Next by Date: Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
  • Previous by thread: Re: Question: What is the impact of changing .cpp AudioUnitEffect source to .mm
  • Next by thread: Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
  • Index(es):
    • Date
    • Thread