• 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: Forking and drop-outs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forking and drop-outs


  • Subject: Re: Forking and drop-outs
  • From: Ian Kemmish <email@hidden>
  • Date: Thu, 1 Nov 2007 19:43:23 +0000


On 1 Nov 2007, at 7:03 pm, Ethan Funk <email@hidden> wrote:



I noticed that my audio application consistently has short audio drop outs when it forks off a child process and executes it -the lame encoder for example. However, If I start another application from the Finder or run the lame encoder from Terminal while my application is running there are no dropouts. Is there something I should be doing, maybe a double fork or similar, to disassociate the child execution from my applications process?


I have a modular synth AU, and I have noticed that anything that involves the dynamic loader seems to cause drop-outs - the first time I load a bundle for a particular modules UI, the first time I use an OpenGL view, stuff like that. When you think about it, this is entirely understandable...


Given that (according to my understanding) running almost anything on Mac OS involves the dynamic loader, this *may* be part of your problem. If so, I would expect that it's not the fork that's the problem, but the subsequent exec. You should be able to craft a simple test to establish this. If that is the root cause, then one workaround might be to make sure that the code executed by the child process is entirely statically linked.


I've just checked the man pages to refresh my memory, and it appears that vfork() suspends the parent process while the child is using its resources (i.e. until it exits or execs). Thus, this appears to be one of the few cases where fork() is preferable to vfork() and would certainly have caught me out if I was doing what you're doing:-)


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ian Kemmish 18 Durham Close, Biggleswade, Beds SG18 8HZ
email@hidden Tel: +44 1767 601361 Mob: +44 7952 854387
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



_______________________________________________ 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: Forking and drop-outs
      • From: Herbie Robinson <email@hidden>
    • Re: Forking and drop-outs
      • From: Ethan Funk <email@hidden>
  • Prev by Date: Re: Forking and drop-outs
  • Next by Date: Re: What is the meaning of kAudioUnitParameterFlag_IsHighResolution ?
  • Previous by thread: Re: Forking and drop-outs
  • Next by thread: Re: Forking and drop-outs
  • Index(es):
    • Date
    • Thread