• 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: Design issue related to my problem with NSSound -isPlaying
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Design issue related to my problem with NSSound -isPlaying


  • Subject: Re: Design issue related to my problem with NSSound -isPlaying
  • From: Graham Cox <email@hidden>
  • Date: Mon, 23 Jul 2012 20:26:48 +1000

On 23/07/2012, at 8:10 PM, Jay Reynolds Freeman wrote:

> So: In Cocoa, is there a reasonable approach to getting things to happen quickly, that works when call-back on the main event loop isn't fast enough?  It is probably not a matter of great consequence for my situation, but it might matter more to others, and it is an interesting design challenge in any case.


The main event loop is fast enough. The problem you have is that you're scheduling work on it that isn't fast enough. Perhaps you need to move that work to a thread, or break it into chunks that can be done over several runs of the loop.

Synching sound and visual animation usually works by triggering events at the same time and arranging that they take about the same time. Core Animation includes callbacks to trigger the next step in a series of animations, and that can include sound, and sound playback includes events that can be used to trigger animations or sounds.

Used properly, Core Animation is pretty powerful, and it doesn't demand any special techniques to make it "fast enough". Its animations are done using threads anyway.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Design issue related to my problem with NSSound -isPlaying (From: Jay Reynolds Freeman <email@hidden>)

  • Prev by Date: Design issue related to my problem with NSSound -isPlaying
  • Next by Date: Re: ARC Extending Lifetime of Objects
  • Previous by thread: Design issue related to my problem with NSSound -isPlaying
  • Next by thread: Re: Design issue related to my problem with NSSound -isPlaying
  • Index(es):
    • Date
    • Thread