On Jul 22, 2012, at 7:43 PM, Jay Reynolds Freeman wrote: > The "sleep" was only for instrumentation; without the sleep and the NSLog, > the code exhibits the problem described. And [NSSound play] is supposed to > run asynchronously ...
You didn't pay attention to what Fritz wrote. You need to allow flow of execution to leave your code and return to the framework, so that the framework can run the main event loop. In all probability, NSSound needs to receive an external notification or event to realize that the sound has finished playing. It probably receives that notification/event via a run-loop source scheduled on the main thread's run loop. There's no good reason for you to loop, polling for the sound's completion. Use the asynchronously-delivered delegate method, as Fritz suggested. Regards, Ken _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
