• 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: How to make Metronome?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make Metronome?


  • Subject: Re: How to make Metronome?
  • From: "I. Savant" <email@hidden>
  • Date: Sun, 3 Sep 2006 09:16:45 -0400


The sound is cached like an image with [NSImage imageNamed:@"foo"], which is why I didn't comment on that. :-) The problem with NSSound is that there's no "stop" so that a sound lasting more than half a second won't be "doubled" if there's a less- than-half-second gap between plays.


--
I.S.


On Sep 3, 2006, at 12:08 AM, John Pannell wrote:

I suspect that creating a new sound object every time the method is called is a bad idea (although NSSound probably caches the sound after the first load for performance). I would recommend making the sound an instance variable, loading it before the metronome starts, and playing it in the handleTimer: method.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: How to make Metronome?
      • From: Daniel Jalkut <email@hidden>
References: 
 >How to make Metronome? (From: Matt <email@hidden>)
 >Re: How to make Metronome? (From: "I. Savant" <email@hidden>)
 >Re: How to make Metronome? (From: AgentM <email@hidden>)
 >Re: How to make Metronome? (From: "I. Savant" <email@hidden>)
 >Re: How to make Metronome? (From: John Pannell <email@hidden>)

  • Prev by Date: NSKeyValueChangeSetting and change dictionary values
  • Next by Date: Re: How to make Metronome?
  • Previous by thread: Re: How to make Metronome?
  • Next by thread: Re: How to make Metronome?
  • Index(es):
    • Date
    • Thread