Re: NSTimer and trackpad and mouse clicks
Re: NSTimer and trackpad and mouse clicks
- Subject: Re: NSTimer and trackpad and mouse clicks
- From: Kyle Sluder <email@hidden>
- Date: Mon, 07 Nov 2011 21:21:37 -0800
On Nov 7, 2011, at 7:56 PM, Tom Jeffries <email@hidden> wrote:
> Thanks, Brian- that's an excellent solution. I'm not totally familiar with the way run loops work on OSX, I assumed that NSTimer would automatically function on a different run loop. I was wrong.
Every thread has at most one run loop. The main thread is special in that it has a run loop by default (in Cocoa applications, at least) and its run loop is responsible for dispatching the main Grand Central Dispatch queue's operations.
Your audio engine should really be running in its own entirely separate thread (or set of threads). For best results, it should provide information to and pick up input from the UI in a synchronization-free manner.
Of course this makes the interface between your UI code and your audio engine more complicated, but it also hides that complication under a cleaner internal interface.
--Kyle Sluder _______________________________________________
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