• 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: John Pannell <email@hidden>
  • Date: Sat, 2 Sep 2006 22:08:22 -0600

Hi all-


- (void) handletimer: (NSTimer *) bpmtimer{ NSSound *mysound = [NSSound soundNamed:@"Pop"]; [mysound play]; }

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.


HTH!

John

John Pannell
Positive Spin Media
http://www.positivespinmedia.com


_______________________________________________ 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: "I. Savant" <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>)

  • Prev by Date: Re: Question about categories
  • 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